-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from justin-p/switch_away_from_docker
- Loading branch information
Showing
7 changed files
with
57 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
--- | ||
# defaults file for evilginx2 | ||
evilginx2_path: /opt/evilginx2 | ||
evilginx2_repo_url: https://github.com/kgretzky/evilginx2 | ||
evilginx2_repo_tag: 2.4.0 | ||
evilginx2_version: 2.4.0 | ||
evilginx2_platform: linux | ||
evilginx2_arch: amd64 | ||
evilginx2_sha256: sha256:595a77ddfb6f674bd5bc1c297ae912f5ebf6ba218a2f857ff46b7b37d1a9678b | ||
evilginx2_download_destination: "/tmp/evilginx2-{{ evilginx2_version }}-{{ evilginx2_platform }}-{{ evilginx2_arch }}.tar.gz" | ||
evilginx2_install_destination: /opt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,3 @@ | |
pip_package: python3-pip | ||
pip_install_packages: | ||
- name: docker | ||
- role: igor_mukhin.bash_aliases | ||
version: v1.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
- name: Install dependencies from apt | ||
ansible.builtin.package: | ||
name: "{{ evilginx2_packages }}" | ||
state: present | ||
|
||
- name: "Ensure the {{ evilginx2_install_destination }} directory exists" | ||
file: | ||
path: "{{ evilginx2_install_destination }}" | ||
state: directory | ||
owner: root | ||
group: root | ||
mode: "0750" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
- name: Check if we already downloaded the zip. | ||
stat: | ||
path: "{{ evilginx2_download_destination }}" | ||
register: tar | ||
|
||
- name: "Downloading evilginx-{{ evilginx2_platform }}-{{ evilginx2_arch }}.tar.gz" | ||
get_url: | ||
validate_certs: True | ||
url: "{{ evilginx2_url }}" | ||
checksum: "{{ evilginx2_sha256 }}" | ||
dest: "{{ evilginx2_download_destination }}" | ||
when: not tar.stat.exists | ||
|
||
- name: Unzip evilginx-{{ evilginx2_platform }}-{{ evilginx2_arch }}.tar.gz | ||
unarchive: | ||
src: "{{ evilginx2_download_destination }}" | ||
dest: "{{ evilginx2_install_destination }}" | ||
remote_src: yes | ||
mode: 0740 | ||
when: not tar.stat.exists | ||
|
||
- name: Run evilginx2 in tmux session # noqa 305 | ||
shell: "{{ item }}" | ||
with_items: | ||
- tmux new-session -d -s "start_tmux_server" | ||
- tmux kill-server | ||
- tmux new-session -d -s "evilginx2" | ||
- tmux send-keys -t evilginx2.0 'cd {{ evilginx2_install_destination }}/evilginx' ENTER | ||
- tmux send-keys -t evilginx2.0 'sudo ./evilginx' ENTER | ||
changed_when: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,6 @@ | ||
--- | ||
# tasks file for evilginx2- include_role: | ||
- name: Install git and tmux are installed | ||
ansible.builtin.package: | ||
name: "{{ evilginx2_packages }}" | ||
state: present | ||
|
||
- name: Ensure the "{{ evilginx2_path }}" directory exists | ||
file: | ||
path: "{{ evilginx2_path }}" | ||
state: directory | ||
owner: root | ||
group: root | ||
mode: "0750" | ||
|
||
- name: Clone evilginx2 using the "{{ evilginx2_repo_tag }}" | ||
git: | ||
repo: "{{ evilginx2_repo_url }}" | ||
dest: "{{ evilginx2_path }}" | ||
version: "{{ evilginx2_repo_tag }}" | ||
|
||
- name: Build docker image for evilginx2 | ||
docker_image: | ||
name: evilginx2 | ||
build: | ||
pull: no | ||
path: "{{ evilginx2_path }}" | ||
source: build | ||
|
||
- name: Run evilginx2 container in tmux session # noqa 305 | ||
shell: "{{ item }}" | ||
with_items: | ||
- tmux new-session -d -s "start_tmux_server" | ||
- tmux kill-server | ||
- tmux new-session -d -s "evilginx2" | ||
- tmux send-keys -t evilginx2.0 start_evilginx2 ENTER | ||
changed_when: false | ||
# tasks file for evilginx2 | ||
- block: | ||
- import_tasks: dependencies.yml | ||
- import_tasks: evilginx2.yml | ||
become: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
# vars file for evilginx2 | ||
evilginx2_url: "https://github.com/kgretzky/evilginx2/releases/download/{{ evilginx2_version }}/evilginx-{{ evilginx2_platform }}-{{ evilginx2_arch }}.tar.gz" | ||
evilginx2_packages: | ||
- git | ||
- tmux |