V0r-T3x / Fancygotchi

The Ultimate theme manager for pwnagotchi [In development]
167 stars 7 forks source link

UI display and Web UI stops working when enabling fancygotchi #6

Closed dd900 closed 9 months ago

dd900 commented 1 year ago

Pi Zero 2 W aluminum-ice/pwnagotchi - v1.7.8

My Steps

  1. Copy fancygotchi folder and .py to custom-plugin folder
  2. Edit config.toml (fancygotchi disabled)
  3. Restart Pi
  4. Go to plugins page
  5. Enable fancygotchi (this is where everything UI related stops working.)

SSH still works Display is black after a reboot. Only reflashing the image fixes it.

config.toml

main.name = "UltraGotchi"
main.lang = "en"
main.whitelist = []
main.plugins.grid.enabled = false
main.plugins.grid.report = false
main.plugins.grid.exclude = []

main.plugins.auto-update.enabled = false
main.plugins.auto-update.install = false
main.plugins.auto-update.interval = 1

main.plugins.onlinehashcrack.enabled = true
main.plugins.onlinehashcrack.email = ""
main.plugins.onlinehashcrack.dashboard = ""
main.plugins.onlinehashcrack.single_files = true
main.plugins.onlinehashcrack.whitelist = []

main.plugins.wpa-sec.enabled = true
main.plugins.wpa-sec.api_key = ""
main.plugins.wpa-sec.api_url = "https://wpa-sec.stanev.org"
main.plugins.wpa-sec.download_results = true
main.plugins.wpa-sec.whitelist = []

main.plugins.bt-tether.enabled = true
main.plugins.bt-tether.devices.android-phone.enabled = true
main.plugins.bt-tether.devices.android-phone.search_order = 1
main.plugins.bt-tether.devices.android-phone.mac = "30:BB:7D:B3:49:A2"
main.plugins.bt-tether.devices.android-phone.ip = "192.168.44.45"
main.plugins.bt-tether.devices.android-phone.netmask = 24
main.plugins.bt-tether.devices.android-phone.interval = 1
main.plugins.bt-tether.devices.android-phone.scantime = 10
main.plugins.bt-tether.devices.android-phone.max_tries = 10
main.plugins.bt-tether.devices.android-phone.share_internet = true
main.plugins.bt-tether.devices.android-phone.priority = 1

main.plugins.bt-tether.devices.ios-phone.enabled = false
main.plugins.bt-tether.devices.ios-phone.search_order = 2
main.plugins.bt-tether.devices.ios-phone.mac = ""
main.plugins.bt-tether.devices.ios-phone.ip = "172.20.10.6"
main.plugins.bt-tether.devices.ios-phone.netmask = 24
main.plugins.bt-tether.devices.ios-phone.interval = 5
main.plugins.bt-tether.devices.ios-phone.scantime = 20
main.plugins.bt-tether.devices.ios-phone.max_tries = 0
main.plugins.bt-tether.devices.ios-phone.share_internet = false
main.plugins.bt-tether.devices.ios-phone.priority = 999

main.plugins.memtemp.enabled = true
main.plugins.memtemp.scale = "fahrenheit"
main.plugins.memtemp.orientation = "horizontal"

main.plugins.logtail.enabled = true
main.plugins.logtail.max-lines = 1000

main.plugins.session-stats.enabled = true
main.plugins.session-stats.save_directory = "/var/tmp/pwnagotchi/sessions/"

main.plugins.net-pos.enabled = false
main.plugins.net-pos.api_key = "test"

main.plugins.gps.enabled = false
main.plugins.gps.speed = 19200
main.plugins.gps.device = "/dev/ttyUSB0"

main.plugins.webgpsmap.enabled = false

main.plugins.wigle.enabled = false
main.plugins.wigle.api_key = ""
main.plugins.wigle.whitelist = []
main.plugins.wigle.donate = true

main.plugins.paw-gps.enabled = false
main.plugins.paw-gps.ip = "192.168.44.1:8080"

main.plugins.ups_lite.enabled = false
main.plugins.ups_lite.shutdown = 2

main.plugins.gpio_buttons.enabled = false

main.plugins.led.enabled = true
main.plugins.led.led = 0
main.plugins.led.delay = 200
main.plugins.led.patterns.loaded = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.updating = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.unread_inbox = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.ready = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.ai_ready = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.ai_training_start = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.ai_best_reward = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.ai_worst_reward = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.bored = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.sad = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.excited = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.lonely = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.rebooting = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.wait = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.sleep = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.wifi_update = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.association = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.deauthentication = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.handshake = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.epoch = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.peer_detected = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.peer_lost = "oo  oo  oo oo  oo  oo  oo"

main.plugins.webcfg.enabled = true

main.plugins.clock.enabled = false

main.plugins.display-password.enabled = false
main.plugins.display-password.orientation = "horizontal"

main.plugins.exp.enabled = false
main.plugins.exp.lvl_x_coord = 5
main.plugins.exp.lvl_y_coord = 30
main.plugins.exp.exp_x_coord = 1
main.plugins.exp.exp_y_coord = 96
main.plugins.exp.bar_symbols_count = 16

main.plugins.age.enabled = false
main.plugins.age.age_x_coord = 1
main.plugins.age.age_y_coord = 86
main.plugins.age.str_x_coord = 57
main.plugins.age.str_y_coord = 86

main.plugins.deauth.enabled = true

main.plugins.aircrackonly.enabled = true
main.plugins.aircrackonly.face = "(>.<)"

main.plugins.quickdic.enabled = true
main.plugins.quickdic.face = "(·ω·)"

main.plugins.memtempcustom.enabled = false
main.plugins.memtempcustom.scale = "fahrenheit"
main.plugins.memtempcustom.orientation = "horizontal"

main.plugins.auto_backup.enabled = false

main.plugins.fancygotchi.enabled = true
main.plugins.fancygotchi.theme = ""
main.plugins.fancygotchi.rotation = 0

main.custom_plugins = "/home/pi/custom-plugins"
main.confd = "/etc/pwnagotchi/conf.d/"
main.custom_plugin_repos = [ "https://github.com/evilsocket/pwnagotchi-plugins-contrib/archive/master.zip",]
main.iface = "mon0"
main.mon_start_cmd = "/usr/bin/monstart"
main.mon_stop_cmd = "/usr/bin/monstop"
main.mon_max_blind_epochs = 50
main.no_restart = false
main.filter = ""
main.log.path = "/var/log/pwnagotchi.log"
main.log.rotation.enabled = true
main.log.rotation.size = "10M"

ui.display.enabled = true
ui.display.type = "displayhatmini"
ui.display.color = "black"
ui.display.rotation = 0

ui.fps = 1
ui.font.name = "DejaVuSansMono"
ui.font.size_offset = 0

ui.faces.look_r = "( ⚆_⚆)"
ui.faces.look_l = "(☉_☉ )"
ui.faces.look_r_happy = "( ◕‿◕)"
ui.faces.look_l_happy = "(◕‿◕ )"
ui.faces.sleep = "(⇀‿‿↼)"
ui.faces.sleep2 = "(≖‿‿≖)"
ui.faces.awake = "(◕‿‿◕)"
ui.faces.bored = "(-__-)"
ui.faces.intense = "(°▃▃°)"
ui.faces.cool = "(⌐■_■)"
ui.faces.happy = "(•‿‿•)"
ui.faces.excited = "(ᵔ◡◡ᵔ)"
ui.faces.grateful = "(^‿‿^)"
ui.faces.motivated = "(☼‿‿☼)"
ui.faces.demotivated = "(≖__≖)"
ui.faces.smart = "(✜‿‿✜)"
ui.faces.lonely = "(ب__ب)"
ui.faces.sad = "(╥☁╥ )"
ui.faces.angry = "(-_-')"
ui.faces.friend = "(♥‿‿♥)"
ui.faces.broken = "(☓‿‿☓)"
ui.faces.debug = "(#__#)"
ui.faces.upload = "(1__0)"
ui.faces.upload1 = "(1__1)"
ui.faces.upload2 = "(0__1)"

ui.web.enabled = true
ui.web.address = "0.0.0.0"
ui.web.username = ""
ui.web.password = ""
ui.web.origin = ""
ui.web.port = 8080
ui.web.on_frame = ""

fs.memory.enabled = true
fs.memory.mounts.log.enabled = true
fs.memory.mounts.log.mount = "/var/log"
fs.memory.mounts.log.size = "50M"
fs.memory.mounts.log.sync = 60
fs.memory.mounts.log.zram = true
fs.memory.mounts.log.rsync = true

fs.memory.mounts.data.enabled = true
fs.memory.mounts.data.mount = "/var/tmp/pwnagotchi"
fs.memory.mounts.data.size = "10M"
fs.memory.mounts.data.sync = 3600
fs.memory.mounts.data.zram = true
fs.memory.mounts.data.rsync = true

ai.enabled = true
ai.path = "/root/brain.nn"
ai.laziness = 0.1
ai.epochs_per_episode = 50
ai.params.gamma = 0.99
ai.params.n_steps = 1
ai.params.vf_coef = 0.25
ai.params.ent_coef = 0.01
ai.params.max_grad_norm = 0.5
ai.params.learning_rate = 0.001
ai.params.alpha = 0.99
ai.params.epsilon = 1e-5
ai.params.verbose = 1
ai.params.lr_schedule = "constant"

personality.advertise = true
personality.deauth = true
personality.associate = true
personality.channels = [
 1,
 2,
 6,
 7,
 11,
 12,
 13,
]
personality.min_rssi = -155
personality.ap_ttl = 172
personality.sta_ttl = 258
personality.recon_time = 36
personality.max_inactive_scale = 5
personality.recon_inactive_multiplier = 3
personality.hop_recon_time = 59
personality.min_recon_time = 24
personality.max_interactions = 12
personality.max_misses_for_recon = 9
personality.excited_num_epochs = 17
personality.bored_num_epochs = 11
personality.sad_num_epochs = 28
personality.bond_encounters_factor = 20000

bettercap.scheme = "http"
bettercap.hostname = "localhost"
bettercap.port = 8081
bettercap.username = "pwnagotchi"
bettercap.password = "pwnagotchi"
bettercap.handshakes = "/root/handshakes"
bettercap.silence = [
 "ble.device.new",
 "ble.device.lost",
 "ble.device.disconnected",
 "ble.device.connected",
 "ble.device.service.discovered",
 "ble.device.characteristic.discovered",
 "wifi.client.new",
 "wifi.client.lost",
 "wifi.client.probe",
 "wifi.ap.new",
 "wifi.ap.lost",
 "mod.started",
]

pwnagotchi.log (relevant lines)

[2023-09-19 01:36:16,193] [INFO] [FANCYGOTCHI] Beginning Fancygotchi load
[2023-09-19 01:36:16,256] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,279] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,303] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,328] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,353] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,377] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,402] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,424] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,447] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,477] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,502] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,553] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,588] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,668] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,693] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,711] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,729] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,746] [WARNING] [FANCYGOTCHI] special command: 
[2023-09-19 01:36:16,764] [WARNING] [FANCYGOTCHI] special command: chmod +x /root/pwny-restart.sh
[2023-09-19 01:36:16,783] [WARNING] [FANCYGOTCHI] special command: chmod +x /root/pwny-restart2.sh
[2023-09-19 01:36:16,803] [WARNING] [FANCYGOTCHI] special command: sudo systemctl enable pwny-restart pwny-restart2
[2023-09-19 01:36:17,695] [WARNING] [FANCYGOTCHI] special command: sudo systemctl start pwny-restart pwny-restart2
V0r-T3x commented 1 year ago

I'm actually working on all of thoses problems. I'm embedded Fancygotchi inside the pwnagotchi core to make it possible to be compatible with all the new upgraded images.

Thanks for the feedback about this issue. I will put a disclaimer about this situation on the top of the ReadMe file.

I am in contact with Aluminum-ice, jayofelony, WPA2, Nursejackass. I will make my best to fix the issue and make a better version of Fancygotchi.

V0r-T3x commented 1 year ago

I just released a fixed version (2023.09.1) for xbits and aluminum-ice image. You can try it and give me your feedback if it's working for you.

https://github.com/V0r-T3x/fancygotchi/releases/tag/2023.09.1

dd900 commented 1 year ago

This seems to be working ok.

  1. The pwnachu theme looks good on the web ui but there is no color on the displayhatmini

  2. I really like the cyber theme, but the default config does not look good. Has something to do with the font_awesome icons. You can see what I mean in the image below.

    [theme.plugin_elements.bluetooth]
    icon = true
    f_awesome = true
    f_awesome_size = 40

    [theme.main_elements.aps]
    icon = true
    f_awesome = true
    f_awesome_size = 20
  1. In the plugin page maybe change uninstall fancygotchi to disable fancygotchi. It's not immediately clear that that is the ONLY way to disable the fancygotchi plugin.

  2. After disabling fancygotchi from the plugin page everything goes back to normal as it should. But upon reenabling it I get the same issue as I had before with the webui not being accessible and the displayhat no longer updating. This persists after a reboot.

  3. Thank you for your work on this project...

Edit FYI: I left memtemp enabled so I could keep an eye on things while I tested so the memtemp data in the lower right has nothing to do with your plugin :)

pwnachu pwnachu

cyber cyber

V0r-T3x commented 1 year ago

yeah, themes are unfinished, I'm missing time for adjusting all of them on all resolution. It's a huge WIP.

1- in the .../plugins_folder/fancygotchi/themes/cyber/???x???/config-h.conf/ you will have an option display_color=, maybe it set to 2 (it's generating a 1bit image ouput). exemple config

2-Yes this just put the icont= option to false, and change the label= value to custom the label text.

3- Fancygotchi is a mod, and its really an uninstall, its can respect the disabling proces. It's one of the reason why I'm actually coding it again in a proper way. At the origin, this was not intended to become so big.

4- Fancygotchi can react if this install/unstalled/installed too fast. if you check inside the .../pwnagotchi/ui/... do you see some hidden *.origin files? maybe some files didnt be installed properly. the list of files modified by fancygotchi are inside /fancygotchi/sys/files.csv. every files replaced by fancygotchi. Or maybe the patch inside the /usr/local/bin/pwnagotchi file are not added properly. You can search for load_theme inside it. the call is needed to start fancygotchi.

the memtemp plugin should be set to vertical and not horizontal inside the /etc/pwnagotchi/config.toml.