# Pwnagotchi ###### tags: `Raspberry Pi`, `Zero`, `linux` ## [pwnagotchi.ai](https://pwnagotchi.ai/) ![](https://i.imgur.com/H6c8akB.png) ## 目前設定 1. 開機後一分鐘,顯示狀態 ``` config= crontab -e @reboot sleep 60; /bin/bash /root/show.sh ``` ``` bash= #!/bin/sh # /root/show.sh # 下載狀態圖片 wget 0.0.0.0:8080/ui?1673341904360 --user 123 --password 123 -O /tmp/black.png #convert /tmp/black.png -resize 212X104 /tmp/black.png # 顯示 cp ~/display/blank.png /tmp/red.png python3 ~/display/show.py ``` 2. 開機後 3 分鐘, 顯示自製UI 每 5 分鐘執行 zeroPwnagotchi_zero zeroPwnagotchi_zero: 顯示 /root/handshakes 檔案數量 ``` config= crontab -e @reboot sleep 180; echo 1 > /root/zeroPwnagotchi/handshake_counts.log && /root/zeroPwnagotchi/zeroPwnagotchi_zero ``` ``` config= */5 * * * * root /root/zeroPwnagotchi/zeroPwnagotchi_zero # zeroPwnagotchi_zero 監控 /root/handshakes 數量變化 ls -l /root/handshakes/ | wc -l ``` ## 安裝設定 ### sd卡 /boot/config.toml 1. /etc/pwnagotchi/config.toml 1. /etc/pwnagotchi/default.toml ``` config= ##### config.toml main.name = "icps" main.whitelist = [ "wifi", ] #ui.display.enabled = false ui.display.type = "waveshare_1" #https://github.com/evilsocket/pwnagotchi/blob/master/pwnagotchi/ui/hw/waveshare1.py #若設定 black #螢幕長寬會變成 250 122 #ui.display.color = "black" ui.display.color = "auto" ui.web.username = "123" ui.web.password = "123" ``` ### USB 連接 1. 安裝 `USB連接PC的驅動` 2. 設定usb網卡 10.0.0.1 3. ssh pi@10.0.0.2 / raspberry ### 服務 ``` bash= /usr/bin/python3 /usr/local/bin/pwnagotchi touch /root/.pwnagotchi-aut0 && systemctl restart pwnagotchi ``` ### 對時 [ntp](https://hackmd.io/@icps0610/rKYutyveQLyyS8Tc5cuGSQ) ### 設定藍芽 [Bluetooth](https://hackmd.io/@icps0610/Bk0_T8Mji) ### 已知問題 1. 啟動AI有問題 更新 numpy `apt-get install python3-numpy`