Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-10-23 13:47:58 +02:00
parent 73df9bc870
commit 82be88eaf0
2 changed files with 102 additions and 16 deletions

View File

@ -14,18 +14,88 @@
} }
], ],
"provisioners": [ "provisioners": [
{
"type": "file",
"source": "../builder/data/usr/local/bin/bettercap",
"destination": "/usr/local/bin/bettercap"
},
{
"type": "file",
"source": "../builder/data/usr/local/bin/pwngrid",
"destination": "/usr/local/bin/pwngrid"
},
{
"type": "file",
"source": "../builder/data/usr/bin/pwnlib",
"destination": "/usr/bin/pwnlib"
},
{
"type": "file",
"source": "../builder/data/usr/bin/bettercap-launcher",
"destination": "/usr/bin/bettercap-launcher"
},
{
"type": "file",
"source": "../builder/data/usr/bin/pwnagotchi-launcher",
"destination": "/usr/bin/pwnagotchi-launcher"
},
{
"type": "file",
"source": "../builder/data/usr/bin/monstop",
"destination": "/usr/bin/monstop"
},
{
"type": "file",
"source": "../builder/data/usr/bin/monstart",
"destination": "/usr/bin/monstart"
},
{
"type": "file",
"source": "../builder/data/usr/bin/hdmion",
"destination": "/usr/bin/hdmion"
},
{
"type": "file",
"source": "../builder/data/usr/bin/hdmioff",
"destination": "/usr/bin/hdmioff"
},
{
"type": "file",
"source": "../builder/data/etc/systemd/system/pwngrid-peer.service",
"destination": "/etc/systemd/system/pwngrid-peer.service"
},
{
"type": "file",
"source": "../builder/data/etc/systemd/system/pwnagotchi.service",
"destination": "/etc/systemd/system/pwnagotchi.service"
},
{
"type": "file",
"source": "../builder/data/etc/systemd/system/bettercap.service",
"destination": "/etc/systemd/system/bettercap.service"
},
{ {
"type": "shell", "type": "shell",
"inline": [ "inline": [
"mkdir -p /usr/local/src/pwnagotchi" "chmod +x /usr/bin/*"
]
},
{
"type": "shell",
"inline": [
"chmod +x /usr/local/bin/*"
] ]
}, },
{ {
"type": "file", "type": "file",
"sources": [ "source": "../builder/data/etc/update-motd.d/01-motd",
"../dist/pwnagotchi-{{user `pwn_version`}}.tar.gz" "destination": "/etc/update-motd.d/01-motd"
], },
"destination": "/usr/local/src/pwnagotchi/" {
"type": "shell",
"inline": [
"chmod +x /etc/update-motd.d/*"
]
}, },
{ {
"type": "shell", "type": "shell",

View File

@ -122,7 +122,6 @@
- libusb-1.0-0-dev - libusb-1.0-0-dev
- lsof - lsof
- make - make
- ntp
- python3-dbus - python3-dbus
- python3-flask - python3-flask
- python3-flask-cors - python3-flask-cors
@ -194,7 +193,7 @@
# Install nexmon to fix wireless scanning (takes 2.5G of space) # Install nexmon to fix wireless scanning (takes 2.5G of space)
- name: clone nexmon repository - name: clone nexmon repository
git: git:
repo: https://github.com/DrSchottky/nexmon.git repo: https://github.com/jayofelony/nexmon.git
dest: /usr/local/src/nexmon dest: /usr/local/src/nexmon
register: nexmongit register: nexmongit
@ -308,10 +307,23 @@
path: /etc/pwnagotchi/conf.d/ path: /etc/pwnagotchi/conf.d/
state: directory state: directory
- name: Install pwnagotchi from source archive - name: clone pwnagotchi repository
git:
repo: https://github.com/jayofelony/pwnagotchi.git
dest: /usr/local/src/pwnagotchi
register: pwnagotchigit
- name: build pwnagotchi wheel
command: "python3 setup.py sdist bdist_wheel"
args:
chdir: /usr/local/src/pwnagotchi
when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version)
- name: install pwnagotchi wheel and dependencies
pip: pip:
name: /usr/local/src/pwnagotchi/pwnagotchi-{{ pwnagotchi.version }}.tar.gz name: "{{ lookup('fileglob', '/usr/local/src/pwnagotchi/dist/pwnagotchi*.whl') }}"
extra_args: --verbose --prefer-binary --ignore-installed extra_args: "--no-cache-dir"
when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version)
- name: remove pwnagotchi folder - name: remove pwnagotchi folder
file: file:
@ -541,6 +553,16 @@
args: args:
executable: /bin/bash executable: /bin/bash
- name: remove /root/go folder
file:
state: absent
path: /root/go
- name: remove /usr/local/go folder
file:
state: absent
path: /usr/local/go
- name: remove pip cache - name: remove pip cache
file: file:
state: absent state: absent
@ -551,12 +573,6 @@
autoremove: yes autoremove: yes
when: removed.changed when: removed.changed
- name: set permissions
command: "chmod +x /usr/bin/*"
- name: set permissions
command: "chmod +x /usr/local/bin/*"
handlers: handlers:
- name: reload systemd services - name: reload systemd services
systemd: systemd: