From efcd1a9b698be0768dcc76a96b4fc6fc02193029 Mon Sep 17 00:00:00 2001 From: Fabien POLLY Date: Fri, 8 Nov 2024 00:31:10 +0100 Subject: [PATCH] Added screen choice for the user and solved missing folders --- backup/backups/.gitkeep | 0 backup/uploads/.gitkeep | 0 config/.gitkeep | 0 config/shared_config.json | 107 +++++++++++++++++++++++++++ data/logs/.gitkeep | 0 data/output/.gitkeep | 0 data/output/crackedpwd/.gitkeep | 0 data/output/data_stolen/.gitkeep | 0 data/output/scan_results/.gitkeep | 0 data/output/vulnerabilities/.gitkeep | 0 data/output/zombies/.gitkeep | 0 install_bjorn.sh | 30 ++++++++ 12 files changed, 137 insertions(+) create mode 100644 backup/backups/.gitkeep create mode 100644 backup/uploads/.gitkeep create mode 100644 config/.gitkeep create mode 100644 config/shared_config.json create mode 100644 data/logs/.gitkeep create mode 100644 data/output/.gitkeep create mode 100644 data/output/crackedpwd/.gitkeep create mode 100644 data/output/data_stolen/.gitkeep create mode 100644 data/output/scan_results/.gitkeep create mode 100644 data/output/vulnerabilities/.gitkeep create mode 100644 data/output/zombies/.gitkeep diff --git a/backup/backups/.gitkeep b/backup/backups/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/backup/uploads/.gitkeep b/backup/uploads/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/config/.gitkeep b/config/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/config/shared_config.json b/config/shared_config.json new file mode 100644 index 0000000..9278659 --- /dev/null +++ b/config/shared_config.json @@ -0,0 +1,107 @@ +{ + "__title_Bjorn__": "Settings", + "manual_mode": false, + "websrv": true, + "web_increment ": false, + "debug_mode": true, + "scan_vuln_running": false, + "retry_success_actions": false, + "retry_failed_actions": true, + "blacklistcheck": true, + "displaying_csv": true, + "log_debug": true, + "log_info": true, + "log_warning": true, + "log_error": true, + "log_critical": true, + "startup_delay": 10, + "web_delay": 2, + "screen_delay": 1, + "comment_delaymin": 15, + "comment_delaymax": 30, + "livestatus_delay": 8, + "image_display_delaymin": 2, + "image_display_delaymax": 8, + "scan_interval": 180, + "scan_vuln_interval": 900, + "failed_retry_delay": 600, + "success_retry_delay": 900, + "ref_width": 122, + "ref_height": 250, + "epd_type": "epd2in13_V4", + "__title_lists__": "List Settings", + "portlist": [ + 20, + 21, + 22, + 23, + 25, + 53, + 69, + 80, + 110, + 111, + 135, + 137, + 139, + 143, + 161, + 162, + 389, + 443, + 445, + 512, + 513, + 514, + 587, + 636, + 993, + 995, + 1080, + 1433, + 1521, + 2049, + 3306, + 3389, + 5000, + 5001, + 5432, + 5900, + 8080, + 8443, + 9090, + 10000 + ], + "mac_scan_blacklist": [ + "00:11:32:c4:71:9b", + "00:11:32:c4:71:9a" + ], + "ip_scan_blacklist": [ + "192.168.1.1", + "192.168.1.12", + "192.168.1.38", + "192.168.1.53", + "192.168.1.40", + "192.168.1.29" + ], + "steal_file_names": [ + "ssh.csv", + "hack.txt" + ], + "steal_file_extensions": [ + ".bjorn", + ".hack", + ".flag" + ], + "__title_network__": "Network", + "nmap_scan_aggressivity": "-T2", + "portstart": 1, + "portend": 2, + "__title_timewaits__": "Time Wait Settings", + "timewait_smb": 0, + "timewait_ssh": 0, + "timewait_telnet": 0, + "timewait_ftp": 0, + "timewait_sql": 0, + "timewait_rdp": 0 +} diff --git a/data/logs/.gitkeep b/data/logs/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/data/output/.gitkeep b/data/output/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/data/output/crackedpwd/.gitkeep b/data/output/crackedpwd/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/data/output/data_stolen/.gitkeep b/data/output/data_stolen/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/data/output/scan_results/.gitkeep b/data/output/scan_results/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/data/output/vulnerabilities/.gitkeep b/data/output/vulnerabilities/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/data/output/zombies/.gitkeep b/data/output/zombies/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/install_bjorn.sh b/install_bjorn.sh index 8285451..4ca2702 100644 --- a/install_bjorn.sh +++ b/install_bjorn.sh @@ -306,6 +306,16 @@ setup_bjorn() { cd Bjorn + # Update the shared_config.json file with the selected EPD version + log "INFO" "Updating E-Paper display configuration..." + if [ -f "config/shared_config.json" ]; then + sed -i "s/\"epd_type\": \"[^\"]*\"/\"epd_type\": \"$EPD_VERSION\"/" config/shared_config.json + check_success "Updated E-Paper display configuration to $EPD_VERSION" + else + log "ERROR" "Configuration file not found: config/shared_config.json" + handle_error "E-Paper display configuration update" + fi + # Install requirements with --break-system-packages flag log "INFO" "Installing Python requirements..." @@ -515,6 +525,26 @@ main() { echo "2. Custom installation" read -p "Choose an option (1/2): " install_option + # E-Paper Display Selection + echo -e "\n${BLUE}Please select your E-Paper Display version:${NC}" + echo "1. epd2in13" + echo "2. epd2in13_V2" + echo "3. epd2in13_V3" + echo "4. epd2in13_V4" + + while true; do + read -p "Enter your choice (1-4): " epd_choice + case $epd_choice in + 1) EPD_VERSION="epd2in13"; break;; + 2) EPD_VERSION="epd2in13_V2"; break;; + 3) EPD_VERSION="epd2in13_V3"; break;; + 4) EPD_VERSION="epd2in13_V4"; break;; + *) echo -e "${RED}Invalid choice. Please select 1-4.${NC}";; + esac + done + + log "INFO" "Selected E-Paper Display version: $EPD_VERSION" + case $install_option in 1) CURRENT_STEP=1; show_progress "Checking system compatibility"