From ee594aaf527bb336385cc8314ca5e7f97ada91b6 Mon Sep 17 00:00:00 2001 From: MaMe82 Date: Wed, 21 Nov 2018 08:54:52 +0100 Subject: [PATCH] Fixed init DB for startup template, removed unneeded files --- Makefile.old | 31 -------------------- ToDo.txt | 74 ------------------------------------------------ dependencies.sh | 32 --------------------- dist/db/init.db | Bin 1319 -> 1359 bytes examples.sh | 37 ------------------------ rbuild.sh | 11 ------- 6 files changed, 185 deletions(-) delete mode 100644 Makefile.old delete mode 100644 ToDo.txt delete mode 100755 dependencies.sh delete mode 100644 examples.sh delete mode 100755 rbuild.sh diff --git a/Makefile.old b/Makefile.old deleted file mode 100644 index b3f0ebd..0000000 --- a/Makefile.old +++ /dev/null @@ -1,31 +0,0 @@ -all: build - -build: - go build P4wnP1_service.go - go build P4wnP1_cli.go - -install: - cp P4wnP1_service /usr/local/bin/ - cp P4wnP1_cli /usr/local/bin/ - cp P4wnP1.service /etc/systemd/system/P4wnP1.service - mkdir /usr/local/P4wnP1 - cp -R keymaps /usr/local/P4wnP1/ - cp -R scripts /usr/local/P4wnP1/ - # reinit service daemon - systemctl daemon-reload - # enable service - systemctl enable P4wnP1.service - # start service - service P4wnP1 start - -remove: - # stop service - service P4wnP1 stop - # disable service - systemctl disable P4wnP1.service - rm -f /usr/local/bin/P4wnP1_service - rm -f /usr/local/bin/P4wnP1_cli - rm -f /etc/systemd/system/P4wnP1.service - rm -R /usr/local/P4wnP1/ - # reinit service daemon - systemctl daemon-reload diff --git a/ToDo.txt b/ToDo.txt deleted file mode 100644 index fd5fbd7..0000000 --- a/ToDo.txt +++ /dev/null @@ -1,74 +0,0 @@ -CLI -- add config caps for missing USB settings (serial, vid, pid ...) -- DONE: add functionality to issue HIDScripts - - DEONE: run async scripts - - DONE: proper job management and cancelation -- retrieve log output of scripts - !LOGGING HAS TO BE REWORKED COMPLETELY, TONS OF DEBUG OUT RIGHT NOW, MIXED -USE OF STDOUT/STDERR!! -- function to retrieve running HIDScript background jobs + function to interrupt all jobs - -BOOT -- WON'T BE IMPLEMENTED: deploy a default boot payload/configuration (Post Run in systemd service ??, config via /etc/P4wnP1/settings) -- DONE: start a default bash script on service start, doing initial configuration by utilizing the CLI client - -USB -- DONE: add functionality to fetch target devices for HID (e.g. keyboard could be at /dev/hidg0..n depending on USB config) -- DONE: init HIDController - -HID -- add additional keyboard layouts (not for first release) -- add function to retrieve LED state (currently changes only) -- DONE: fix absolute mouse movement -- DONE: avoid memory leak on re-init of HIDController (re-use of memory leaking VMs + limited VM pool size, to keep -impact reasonable) -- DONE: implement job management -- DONE: implement context for cancellation and cancellation propagation -- DONE: interrupt blocking JavaScript to Go callbacks (waitLED, delay, waitLEDRepeated) by consuming VM IRQ channel - -WIFI -- implement connection to OPEN-AUTH network as STA -- implement nexmon firmware support (not for first release) -- implement failover from STA to AP (if connection fails) -- add Option to reconfigure Wifi Ethernet Interface settings to DHCP client mode, when WiFi mode is station -- fall back to old settings, if deployment of WiFi settings fails - -BLUETOOTH: -- configuration cpabilities for BNEP/NAP on server, keep in mind BLE use cases (idea of stand-alone proxy) -- gRPC implementation -- CLI client support - -FILESYSTEM (not for first release) -- remote pwd, cd, download, upload (up and download already implemented for HID script transfer) - -DOCUMENTATION (not on first release ... yes, I know, anyway) -- HIDScript docu (basically ES5 with some additional commands) -- CLI docu (let's rely on the built-in help screens, for now. They need to be reworked themselves) -- folder structure of resources/configuration files -- language map format ---> Lesson learned: Documenting, by providing example payloads didn't worked out for the P4wnP1 community (nearly no -external payload contributions) - -LOGGING: -- consistent logging (no mix between STDOUT/STDERR) -- reduce logging of gadget setting changes (only if settings are deployed) - -Events: -- remove debug out -- Done: proper unregister of event listeners from web app - -OTHER: -- Done: extend installer to move HIDScripts to a fixed absolute path -- Not possible (status isn't working here) proper error extraction from gRPC calls -- set date from Browser -- Load&Store runtime configuration from/to templates (accessible via web client) -- Network events (interface down, DHCP lease/release) -- add classes to all html elements of web client, to allow styling by sbd. who's able to do it better than me -- add reboot/shutdown option accessible from webclient - -TO FIX: -- remove dependencies of CLI client on service package -- debug out of HIDScript puts way to much CPU load on journaling daemon (floods logs) -- Done: allow gRPC server to abort Running HID scripts on context.Done() -> possible, testing needed -- jobs aren't deleted from global job list, unless result is fetched with waitResult. This affects interrupted -jobs (f.e. timeout) and jobs run as background job --> cancelled jobs need a way to communicate back to the controller, -that they could be deleted (Solution: goroutine listening for context.Done() per job in controller) diff --git a/dependencies.sh b/dependencies.sh deleted file mode 100755 index 1268b47..0000000 --- a/dependencies.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -# install dependencies -# - dnsmasq for DHCP / DNS server -# - bridge-utils for bonding CDC ECM + RNDIS interface toa single bridge -# - hostapd for AP deployment -# - screen to attach interactive processes to a detachable tty -# - autossh for "reachback" SSH connections -# - bluez (bluez-bleutooth, policykit-1) for access to Bluetooth / BLE stack (depends on DBUS systemd service) -# - haveged as entropy daemon to get enough entropy for hostapd AP with WPA2 -# - iodine for DNS tunnel capbilities -# - genisoimage to allow on-the-fly CD-Rom image creation for CD emulation - -sudo apt-get -y install git screen hostapd autossh bluez bluez-tools bridge-utils policykit-1 genisoimage iodine haveged -sudo apt-get -y install tcpdump -sudo apt-get -y install python-pip python-dev - -# before installing dnsmasq, the nameserver from /etc/resolv.conf should be saved -# to restore after install (gets overwritten by dnsmasq package) -cp /etc/resolv.conf /tmp/backup_resolv.conf -sudo apt-get -y install dnsmasq -sudo /bin/bash -c 'cat /tmp/backup_resolv.conf > /etc/resolv.conf' - - - -# python dependencies for HIDbackdoor -sudo pip install pycrypto # already present on stretch -sudo pip install pydispatcher - - -sudo update-rc.d dhcpcd disable -sudo update-rc.d dnsmasq disable diff --git a/dist/db/init.db b/dist/db/init.db index 4e86b429ab149c6cb3572c463f62d180493593d9..1b4b0338fcb1521fc17a8d674487bc47de923fab 100644 GIT binary patch delta 53 zcmZ3^b)IWOGqZ*Q0|apK6_+Fym6R65=Oz}Hq!tNra