diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..478c616 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,115 @@ +Changelog +============== + +[v2.4](https://github.com/xtr4nge/FruityWifi/releases/tag/v2.4) +---------------- +- Utils have been added (replaces `ifconfig -a`) +- Kali Linux Rolling compatibility issue has been fixed + + +[v2.3](https://github.com/xtr4nge/FruityWifi/releases/tag/v2.3) +---------------- +- Monitor mode (mon0) has been fixed (new airmon-ng compatibility issue) + + +[v2.2](https://github.com/xtr4nge/FruityWifi/releases/tag/v2.2) +---------------- +- Wireless service has been replaced by AP module +- Mobile support has been added +- Bootstrap support has been added +- Token auth has been added +- Minor fix + + +[v2.1](https://github.com/xtr4nge/FruityWifi/releases/tag/v2.1.3) +---------------- +- Hostapd Mana support has been added +- Phishing service has been replaced by phishing module +- Karma service has been replaced by karma module +- Sudo has been implemented (replacement for danger) +- Logs path can be changed +- Squid dependencies have been removed from FruityWifi installer +- Phishing dependencies have been removed from FruityWifi installer +- New AP options available: hostapd, hostapd-mana, hostapd-karma, airmon-ng +- Domain name can be changed from config panel +- New install options have been added to install-FruityWifi.sh +- Install/Remove have been updated + + +[v2.0 (alpha)](https://github.com/xtr4nge/FruityWifi/releases/tag/v2.0) +---------------- +- Web-Interface has been changed (new look and feel, new options). +- Nginx has replaced Apache2 as default webserver. +- Installation script has been updated. +- Config panel has been changed. +- Network interfaces structure has been changed and renamed. +- It is possible to use FruityWifi combining multiple networks and setups. +- Supplicant mode has been added as a module. +- 3G/4G Broadband Mobile has been added as a module. +- FruityWifi HTTP webinterface on port 8000 +- FruityWifi HTTPS webinterface on port 8443 + + +v1.9 +---------------- +- Service Karma has been replaced by Karma module +- Service Supplicant has been replaced by nmcli module +- Config page has been updated +- Supplicant config has been changed (nmcli module is required) +- dnspoof host file has been removed from config page (dnsspoof module is required) +- Logs page has been updated +- WSDL has been updated +- Hostapd/Karma has been removed from installer (replaced by Karma module) +- NetworkManager has been removed from installer (replaced by nmcli module) +- install-modules.py has been added (install all modules from console) + + +v1.8 +---------------- +- WSDL has been added +- New status page has been added +- Logs can follow in realtime using the new status page (wsdl) + + +v1.6 +---------------- +- Dependencies can be installed from module windows +- Minor fix + + +v1.5 +---------------- +- New functions has been added +- Source code has been changed (open file function) +- Minor fix + + +v1.4 +---------------- +- New functions has been added (monitor mode) +- Config page has been changed +- Minor fix + + +v1.3 +---------------- +- Directory structure has been changed +- Minor fix + + +v1.2 +---------------- +- Installation script has been updated +- SSLstrip fork (@xtr4nge) has been added (Inject + Tamperer options) +- Minor fix + + +v1.1 +---------------- +- External modules can be installed from modules page +- Minor fix + + +v1.0 +---------------- +- Init diff --git a/FruityWifi/conf/dnsmasq.conf b/FruityWiFi/conf/dnsmasq.conf similarity index 100% rename from FruityWifi/conf/dnsmasq.conf rename to FruityWiFi/conf/dnsmasq.conf diff --git a/FruityWifi/conf/hostapd-secure.conf b/FruityWiFi/conf/hostapd-secure.conf similarity index 90% rename from FruityWifi/conf/hostapd-secure.conf rename to FruityWiFi/conf/hostapd-secure.conf index 149e340..3e5f41a 100644 --- a/FruityWifi/conf/hostapd-secure.conf +++ b/FruityWiFi/conf/hostapd-secure.conf @@ -1,4 +1,5 @@ -ctrl_interface=/var/run/hostapd-phy0 +ctrl_interface=/var/run/hostapd + driver=nl80211 wmm_ac_bk_cwmin=4 wmm_ac_bk_cwmax=10 @@ -39,9 +40,6 @@ tx_queue_data0_burst=1.5 hw_mode=g channel=6 - - - logger_syslog=127 logger_syslog_level=2 logger_stdout=127 @@ -50,11 +48,10 @@ logger_stdout_level=2 #ht_capab=[HT20][SHORT-GI-20][SHORT-GI-40][RX-STBC1][DSSS_CCK-40] interface=wlan0 -ctrl_interface=/var/run/hostapd-phy0 disassoc_low_ack=1 auth_algs=1 #wpa=0 -ssid=FruityWifi +ssid=FruityWiFi #bridge=br-lan wmm_enabled=1 bssid=00:00:00:00:00:00 @@ -65,7 +62,7 @@ macaddr_acl=0 auth_algs=1 #ignore_broadcast_ssid=0 wpa=2 -wpa_passphrase=RaspberryWifi +wpa_passphrase=FruityWiFi wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP diff --git a/FruityWifi/conf/hostapd.conf b/FruityWiFi/conf/hostapd.conf similarity index 91% rename from FruityWifi/conf/hostapd.conf rename to FruityWiFi/conf/hostapd.conf index 233e178..9535295 100644 --- a/FruityWifi/conf/hostapd.conf +++ b/FruityWiFi/conf/hostapd.conf @@ -1,4 +1,5 @@ -ctrl_interface=/var/run/hostapd-phy0 +ctrl_interface=/var/run/hostapd + driver=nl80211 wmm_ac_bk_cwmin=4 wmm_ac_bk_cwmax=10 @@ -39,9 +40,6 @@ tx_queue_data0_burst=1.5 hw_mode=g channel=6 - - - logger_syslog=127 logger_syslog_level=2 logger_stdout=127 @@ -50,15 +48,11 @@ logger_stdout_level=2 #ht_capab=[HT20][SHORT-GI-20][SHORT-GI-40][RX-STBC1][DSSS_CCK-40] interface=wlan0 -ctrl_interface=/var/run/hostapd-phy0 disassoc_low_ack=1 auth_algs=1 wpa=0 -ssid=FruityWifi +ssid=FruityWiFi #bridge=br-lan wmm_enabled=1 bssid=00:00:00:00:00:00 ignore_broadcast_ssid=0 - - - diff --git a/FruityWifi/logs/dhcp.leases b/FruityWiFi/conf/pool-ssid.conf similarity index 100% rename from FruityWifi/logs/dhcp.leases rename to FruityWiFi/conf/pool-ssid.conf diff --git a/FruityWifi/logs/dnsmasq.log b/FruityWiFi/conf/pool-station.conf similarity index 100% rename from FruityWifi/logs/dnsmasq.log rename to FruityWiFi/conf/pool-station.conf diff --git a/FruityWifi/conf/spoofhost.conf b/FruityWiFi/conf/spoofhost.conf similarity index 100% rename from FruityWifi/conf/spoofhost.conf rename to FruityWiFi/conf/spoofhost.conf diff --git a/FruityWifi/logs/dnsspoof.log b/FruityWiFi/conf/ssid.conf similarity index 100% rename from FruityWifi/logs/dnsspoof.log rename to FruityWiFi/conf/ssid.conf diff --git a/FruityWifi/conf/wpa_supplicant.conf b/FruityWiFi/conf/wpa_supplicant.conf similarity index 100% rename from FruityWifi/conf/wpa_supplicant.conf rename to FruityWiFi/conf/wpa_supplicant.conf diff --git a/FruityWifi/logs/sslstrip.log b/FruityWiFi/logs/dhcp.leases similarity index 100% rename from FruityWifi/logs/sslstrip.log rename to FruityWiFi/logs/dhcp.leases diff --git a/FruityWiFi/logs/dnsmasq.log b/FruityWiFi/logs/dnsmasq.log new file mode 100644 index 0000000..e69de29 diff --git a/FruityWiFi/logs/dnsspoof.log b/FruityWiFi/logs/dnsspoof.log new file mode 100644 index 0000000..e69de29 diff --git a/FruityWiFi/logs/sslstrip.log b/FruityWiFi/logs/sslstrip.log new file mode 100644 index 0000000..e69de29 diff --git a/FruityWifi/logs/urlsnarf.log b/FruityWiFi/logs/urlsnarf.log similarity index 100% rename from FruityWifi/logs/urlsnarf.log rename to FruityWiFi/logs/urlsnarf.log diff --git a/FruityWiFi/utils/network.py b/FruityWiFi/utils/network.py new file mode 100755 index 0000000..04da294 --- /dev/null +++ b/FruityWiFi/utils/network.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python + +import os, sys +import getopt +import netifaces + +def usage(): + print ("\nFruityWiFi utils v1.1 (@xtr4nge)") + + print ("Usage: network.py \n") + print ("Options:") + print ("-t , --type= TYPE") + print ("-i , --iface= INTERFACE") + print ("") + print ("Author: @xtr4nge") + print ("") + +def parseOptions(argv): + TYPE = "" + IFACE = "" + + try: + opts, args = getopt.getopt(argv, "ht:i:", + ["help", "type=", "iface="]) + + for opt, arg in opts: + if opt in ("-h", "--help"): + usage() + sys.exit() + elif opt in ("-t", "--type"): + TYPE = arg + elif opt in ("-i", "--iface"): + IFACE = arg + + if TYPE == "": + usage() + print + print ("[Required] \n -t (TYPE: getiface) \n") + print + + sys.exit(1) + + return (TYPE, IFACE) + + except getopt.GetoptError: + usage() + sys.exit(2) + +def getIface(): + for i in netifaces.interfaces(): + try: MAC = netifaces.ifaddresses(i)[netifaces.AF_LINK][0]["addr"] + except: MAC = "" + try: IP = netifaces.ifaddresses(i)[netifaces.AF_INET][0]["addr"] + except: IP = "" + print (str(i)+"|"+str(IP)+"|"+str(MAC)) + +def getIfaceNAME(): + for i in netifaces.interfaces(): + print (i) + +def getIfaceIP(iface): + try: IP = netifaces.ifaddresses(iface)[netifaces.AF_INET][0]["addr"] + except: IP = "" + print (IP) + +def getIfaceMAC(iface): + try: MAC = netifaces.ifaddresses(iface)[netifaces.AF_LINK][0]["addr"] + except: MAC = "" + print (MAC) + +def main(argv): + (TYPE, IFACE) = parseOptions(argv) + + if TYPE == "getiface": + getIface() + if TYPE == "getifacename": + getIfaceNAME() + if TYPE == "getifaceip" and IFACE != "": + getIfaceIP(IFACE) + if TYPE == "getifacemac" and IFACE != "": + getIfaceMAC(IFACE) + +if __name__ == "__main__": + main(sys.argv[1:]) diff --git a/FruityWifi/www/action.php b/FruityWiFi/www/action.php similarity index 100% rename from FruityWifi/www/action.php rename to FruityWiFi/www/action.php diff --git a/FruityWifi/www/config/config.php b/FruityWiFi/www/config/config.php similarity index 97% rename from FruityWifi/www/config/config.php rename to FruityWiFi/www/config/config.php index ccb9f4e..d5b610f 100644 --- a/FruityWifi/www/config/config.php +++ b/FruityWiFi/www/config/config.php @@ -1,5 +1,5 @@ > web interface input validation. $regex_extra=" _-.[]*"; // extra characters allowed (input validation). $log_path="/usr/share/fruitywifi/logs"; diff --git a/FruityWifi/www/css/bootstrap-menu.css b/FruityWiFi/www/css/bootstrap-menu.css similarity index 100% rename from FruityWifi/www/css/bootstrap-menu.css rename to FruityWiFi/www/css/bootstrap-menu.css diff --git a/FruityWifi/www/css/bootstrap-switch.css b/FruityWiFi/www/css/bootstrap-switch.css similarity index 100% rename from FruityWifi/www/css/bootstrap-switch.css rename to FruityWiFi/www/css/bootstrap-switch.css diff --git a/FruityWifi/www/css/bootstrap.css b/FruityWiFi/www/css/bootstrap.css similarity index 100% rename from FruityWifi/www/css/bootstrap.css rename to FruityWiFi/www/css/bootstrap.css diff --git a/FruityWifi/www/css/jquery-ui.css b/FruityWiFi/www/css/jquery-ui.css similarity index 100% rename from FruityWifi/www/css/jquery-ui.css rename to FruityWiFi/www/css/jquery-ui.css diff --git a/FruityWiFi/www/functions.php b/FruityWiFi/www/functions.php new file mode 100644 index 0000000..6501637 --- /dev/null +++ b/FruityWiFi/www/functions.php @@ -0,0 +1,256 @@ +. +*/ +?> + [a-z0-9-_. ] ] +function regex_standard($var, $url, $regex_extra) { + + $regex_extra = implode("\\", str_split($regex_extra)); + + $regex = "/(?i)(^[a-z0-9 $regex_extra]{1,20})|(^$)/"; + //$regex = "/(?i)(^[a-z0-9]{1,20}$)|(^$)/"; + + //$referer = $_SERVER['HTTP_REFERER']; + + if (preg_match($regex, $var) == 0) { + + //header("Location: ".$referer."?error=1"); + echo ""; + //echo ""; + + exit; + + } + +} + +function exec_fruitywifi($exec) { + + $exec_mode = "sudo"; + + if ($exec_mode == "danger") { + + $bin_exec = "/usr/share/fruitywifi/bin/danger"; + exec("$bin_exec \"" . $exec . "\"", $output); + return $output; + + } else if ($exec_mode == "sudo") { + + $bin_exec = "/usr/bin/sudo"; + exec("$bin_exec sh -c \"$exec\"", $output); + return $output; + + } else { + return false; + } + +} + +function exec_fruitywifi_env($exec) { + + # Construct our new PATH. + $RBENV_ROOT="/root/.rbenv"; + $ROOT_PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"; + $ROOT_PATH="$RBENV_ROOT/shims:$RBENV_ROOT/bin:$ROOT_PATH"; + + $exec_mode = "sudo"; + + if ($exec_mode == "danger") { + + $bin_exec = "/usr/share/fruitywifi/bin/danger"; + exec("$bin_exec \"" . $exec . "\"", $output); + return $output; + + } else if ($exec_mode == "sudo") { + + $bin_exec = "/usr/bin/sudo"; + exec("$bin_exec env PATH=\"$ROOT_PATH\" sh -c \"$exec\"", $output); + return $output; + + } else { + return false; + } + +} + +function setToken() { + $token = sha1(microtime(true).mt_rand(10000,90000)); + return $token; +} + +function module_deb($mod_name) { + $module="fruitywifi-module-$mod_name"; + + $exec = "apt-cache policy $module"; + exec($exec, $output); + + //print_r($output); + + if(empty($output)) { + //echo "none..."; + return 0; + } else { + + $installed = explode(" ", trim($output[1])); + $candidate = explode(" ", trim($output[2])); + + if( $installed[1] == $candidate[1] ) { + //echo "installed..."; + return 1; + } else if( $installed[1] == "(none)" ) { + //echo "install..."; + return 2; + } else { + //echo "upgrade..."; + return 3; + } + + } +} + +function start_monitor_mode($iface) { + // START MONITOR MODE (mon0) + //$iface_mon0 = exec("/sbin/ifconfig |grep mon0"); + + stop_monitor_mode($iface); + + //if ($iface_mon0 == "") { + //$exec = "/usr/sbin/airmon-ng start $iface"; + + $exec = "rfkill unblock wifi; sudo rfkill unblock all"; + exec_fruitywifi($exec); + + $exec = "ifconfig $iface down"; + exec_fruitywifi($exec); + + $phy = getPHY($iface); + $exec = "iw phy $phy interface add mon0 type monitor"; + exec_fruitywifi($exec); + + sleep(1); + + $exec = "ifconfig mon0 down"; + exec_fruitywifi($exec); + + $exec = "iwconfig mon0 mode monitor"; + exec_fruitywifi($exec); + + $exec = "ifconfig mon0 up"; + exec_fruitywifi($exec); + + //} +} + +function stop_monitor_mode($iface) { + // STOP MONITOR MODE (mon0) + $iface_mon0 = exec("/sbin/ifconfig |grep mon0"); + if ($iface_mon0 != "") { + $exec = "/usr/sbin/airmon-ng stop mon0"; + exec_fruitywifi($exec); + } +} + +function getPHY($iface) { + $exec = "iw dev | egrep 'phy|Interface' | tr '\\\n' '|' | tr '\\\t' ' ' | sed 's/| Interface//g'"; + exec($exec, $output); + $temp = explode("|", $output[0]); + for ($i=0; $i < count($temp); $i++) { + $sub = explode(" ", $temp[$i]); + if ($sub[1] == $iface) return trim(str_replace("#","",$sub[0])); + } + return "-"; +} + +function open_file($filename) { + + if ( file_exists($filename) ) { + if ( 0 < filesize( $filename ) ) { + $fh = fopen($filename, "r"); // or die("Could not open file."); + $data = fread($fh, filesize($filename)); // or die("Could not read file."); + fclose($fh); + return $data; + } + } + +} + +function start_iface($iface, $ip, $gw) { + + $bin_danger = "/usr/share/fruitywifi/bin/danger"; + + // START MONITOR MODE (mon0) + $iface_mon0 = exec("/sbin/ifconfig |grep mon0"); + //if ($iface_mon0 == "") { + $exec = "/usr/bin/sudo /sbin/ifconfig $iface $ip"; + //exec("$bin_danger \"" . $exec . "\"", $output); //DEPRECATED + exec_fruitywifi($exec); + //} + + if (trim($gw) != "") { + $exec = "/usr/bin/sudo /sbin/route add default gw $gw"; + //exec("$bin_danger \"" . $exec . "\"", $output); //DEPRECATED + exec_fruitywifi($exec); + } + +} + +function stop_iface($iface, $ip, $gw) { + + $bin_danger = "/usr/share/fruitywifi/bin/danger"; + + // START MONITOR MODE (mon0) + $iface_mon0 = exec("/sbin/ifconfig |grep mon0"); + //if ($iface_mon0 != "") { + $exec = "/usr/bin/sudo /sbin/ifconfig $iface 0.0.0.0"; + //exec("$bin_danger \"" . $exec . "\"", $output); //DEPRECATED + exec_fruitywifi($exec); + //} + +} + +function getIfaceNAME() { + /* + $ifaces = exec("/sbin/ifconfig -a | cut -c 1-8 | sort | uniq -u |grep -v lo|sed ':a;N;$!ba;s/\\n/|/g'"); + $ifaces = str_replace(" ","",$ifaces); + $ifaces = explode("|", $ifaces); + */ + + $exec = "/usr/bin/python3 /usr/share/fruitywifi/utils/network.py -t getifacename | grep -v lo"; + unset($output); + exec($exec, $output); + return $output; +} + +function getIfaceIP($iface) { + //$tmp_ip = exec("/sbin/ifconfig $io_in_iface | grep 'inet addr:' | cut -d: -f2 |awk '{print $1}'"); + //$ip = exec("/sbin/ifconfig $ifaces[$i] | grep 'inet addr:' | cut -d: -f2 |awk '{print $1}'"); + $exec = "/usr/bin/python3 /usr/share/fruitywifi/utils/network.py -t getifaceip -i $iface"; + unset($output); + exec($exec, $output); + return $output[0]; +} + +function getIfaceMAC($iface) { + $exec = "/usr/bin/python3 /usr/share/fruitywifi/utils/network.py -t getifacemac -i $iface"; + unset($output); + exec($exec, $output); + return $output[0]; +} + +?> diff --git a/FruityWifi/www/header.php b/FruityWiFi/www/header.php similarity index 100% rename from FruityWifi/www/header.php rename to FruityWiFi/www/header.php diff --git a/FruityWifi/www/img/favicon.ico b/FruityWiFi/www/img/favicon.ico similarity index 100% rename from FruityWifi/www/img/favicon.ico rename to FruityWiFi/www/img/favicon.ico diff --git a/FruityWifi/www/img/glyphicons-195-circle-question-mark.png b/FruityWiFi/www/img/glyphicons-195-circle-question-mark.png similarity index 100% rename from FruityWifi/www/img/glyphicons-195-circle-question-mark.png rename to FruityWiFi/www/img/glyphicons-195-circle-question-mark.png diff --git a/FruityWifi/www/img/help-browser.png b/FruityWiFi/www/img/help-browser.png similarity index 100% rename from FruityWifi/www/img/help-browser.png rename to FruityWiFi/www/img/help-browser.png diff --git a/FruityWifi/www/img/loader-wide.gif b/FruityWiFi/www/img/loader-wide.gif similarity index 100% rename from FruityWifi/www/img/loader-wide.gif rename to FruityWiFi/www/img/loader-wide.gif diff --git a/FruityWifi/www/img/loading.gif b/FruityWiFi/www/img/loading.gif similarity index 100% rename from FruityWifi/www/img/loading.gif rename to FruityWiFi/www/img/loading.gif diff --git a/FruityWifi/www/img/logo-fw.png b/FruityWiFi/www/img/logo-fw.png similarity index 100% rename from FruityWifi/www/img/logo-fw.png rename to FruityWiFi/www/img/logo-fw.png diff --git a/FruityWifi/www/img/logo.png b/FruityWiFi/www/img/logo.png similarity index 100% rename from FruityWifi/www/img/logo.png rename to FruityWiFi/www/img/logo.png diff --git a/FruityWifi/www/index.php b/FruityWiFi/www/index.php similarity index 100% rename from FruityWifi/www/index.php rename to FruityWiFi/www/index.php diff --git a/FruityWifi/www/js/bootstrap-switch.js b/FruityWiFi/www/js/bootstrap-switch.js similarity index 100% rename from FruityWifi/www/js/bootstrap-switch.js rename to FruityWiFi/www/js/bootstrap-switch.js diff --git a/FruityWifi/www/js/bootstrap.js b/FruityWiFi/www/js/bootstrap.js similarity index 100% rename from FruityWifi/www/js/bootstrap.js rename to FruityWiFi/www/js/bootstrap.js diff --git a/FruityWifi/www/js/highlight.js b/FruityWiFi/www/js/highlight.js similarity index 100% rename from FruityWifi/www/js/highlight.js rename to FruityWiFi/www/js/highlight.js diff --git a/FruityWifi/www/js/jquery-ui.js b/FruityWiFi/www/js/jquery-ui.js similarity index 100% rename from FruityWifi/www/js/jquery-ui.js rename to FruityWiFi/www/js/jquery-ui.js diff --git a/FruityWifi/www/js/jquery.js b/FruityWiFi/www/js/jquery.js similarity index 100% rename from FruityWifi/www/js/jquery.js rename to FruityWiFi/www/js/jquery.js diff --git a/FruityWifi/www/js/main.js b/FruityWiFi/www/js/main.js similarity index 100% rename from FruityWifi/www/js/main.js rename to FruityWiFi/www/js/main.js diff --git a/FruityWifi/www/login.php b/FruityWiFi/www/login.php similarity index 100% rename from FruityWifi/www/login.php rename to FruityWiFi/www/login.php diff --git a/FruityWifi/www/login_check.php b/FruityWiFi/www/login_check.php similarity index 100% rename from FruityWifi/www/login_check.php rename to FruityWiFi/www/login_check.php diff --git a/FruityWifi/www/logout.php b/FruityWiFi/www/logout.php similarity index 100% rename from FruityWifi/www/logout.php rename to FruityWiFi/www/logout.php diff --git a/FruityWifi/www/menu.php b/FruityWiFi/www/menu.php similarity index 100% rename from FruityWifi/www/menu.php rename to FruityWiFi/www/menu.php diff --git a/FruityWifi/www/modules/action.php b/FruityWiFi/www/modules/action.php similarity index 100% rename from FruityWifi/www/modules/action.php rename to FruityWiFi/www/modules/action.php diff --git a/FruityWifi/www/modules/css/jquery-ui.css b/FruityWiFi/www/modules/css/jquery-ui.css similarity index 100% rename from FruityWifi/www/modules/css/jquery-ui.css rename to FruityWiFi/www/modules/css/jquery-ui.css diff --git a/FruityWifi/www/modules/css/style.css b/FruityWiFi/www/modules/css/style.css similarity index 100% rename from FruityWifi/www/modules/css/style.css rename to FruityWiFi/www/modules/css/style.css diff --git a/FruityWifi/www/modules/index.php b/FruityWiFi/www/modules/index.php similarity index 100% rename from FruityWifi/www/modules/index.php rename to FruityWiFi/www/modules/index.php diff --git a/FruityWifi/www/modules/install.php b/FruityWiFi/www/modules/install.php similarity index 100% rename from FruityWifi/www/modules/install.php rename to FruityWiFi/www/modules/install.php diff --git a/FruityWifi/www/modules/js/jquery-ui.js b/FruityWiFi/www/modules/js/jquery-ui.js similarity index 100% rename from FruityWifi/www/modules/js/jquery-ui.js rename to FruityWiFi/www/modules/js/jquery-ui.js diff --git a/FruityWifi/www/modules/js/jquery.js b/FruityWiFi/www/modules/js/jquery.js similarity index 100% rename from FruityWifi/www/modules/js/jquery.js rename to FruityWiFi/www/modules/js/jquery.js diff --git a/FruityWifi/www/modules/menu.php b/FruityWiFi/www/modules/menu.php similarity index 100% rename from FruityWifi/www/modules/menu.php rename to FruityWiFi/www/modules/menu.php diff --git a/FruityWifi/www/modules/save.php b/FruityWiFi/www/modules/save.php similarity index 98% rename from FruityWifi/www/modules/save.php rename to FruityWiFi/www/modules/save.php index d4216c8..415f480 100644 --- a/FruityWifi/www/modules/save.php +++ b/FruityWiFi/www/modules/save.php @@ -18,6 +18,7 @@ ?> \ No newline at end of file +?> diff --git a/FruityWifi/www/modules/wait.php b/FruityWiFi/www/modules/wait.php similarity index 100% rename from FruityWifi/www/modules/wait.php rename to FruityWiFi/www/modules/wait.php diff --git a/FruityWifi/www/msg.php b/FruityWiFi/www/msg.php similarity index 100% rename from FruityWifi/www/msg.php rename to FruityWiFi/www/msg.php diff --git a/FruityWifi/www/page_config_adv.php b/FruityWiFi/www/page_config_adv.php similarity index 51% rename from FruityWifi/www/page_config_adv.php rename to FruityWiFi/www/page_config_adv.php index 38022cc..9ecde72 100644 --- a/FruityWifi/www/page_config_adv.php +++ b/FruityWiFi/www/page_config_adv.php @@ -1,6 +1,6 @@
"; -} -*/ ?> - -
@@ -227,125 +205,126 @@ - - + +
-
- Mode - -
- -
- -
-  [AP] - -
-
+
+ Mode + +
+ +
+ +
+  [AP] + +
+

-
- -
> - - - - - - - - + + + + + + + + + + + + > + + + + > + + + + > + + + + > + + + + +
- IN + + +
> + + + + - - + + + - - - - > - - - - > - - - - > - - - - > - - - - -
+ IN
-
+
"; + if($io_in_set == "0") { + // Get interface IP + $tmp_ip = getIfaceIP($io_in_iface); + echo ""; } ?> -
- - stop [on]"; - } else { - echo "start [-]"; - } - - ?> -
-
-
- -
> - - - - + + + > + + + + > + + + + > + + + + > + + + + +
- OUT +
+ + stop [on]"; + } else { + echo "start [-]"; + } + + ?> +
+
+
+ +
> + + + + - - - - - - - > - - - - > - - - - > - - - - > - - - - -
+ OUT
-
-
- -
- "; - } - ?> -
- - stop [on]"; - } else { - echo "start [-]"; - } - - ?> -
-
-
+
+ +
+ "; + } + ?> +
+ + stop [on]"; + } else { + echo "start [-]"; + } + + ?> +
+
+
@@ -419,19 +399,19 @@
+ [sniff|inject]
@@ -441,20 +421,20 @@
- + -
Additional Interfaces
+
Monitor Interface
- + onchange="this.form.submit()"> Secure onchange="this.form.submit()"> - -
- +
+ - - -
- + --> + + +
+
@@ -504,8 +484,8 @@
Domain Setup
- - + +
@@ -516,17 +496,17 @@
Password
- - - - -           "; - if ($pass_msg == 1) echo "password changed"; - if ($pass_msg == 2) echo "password error"; - } - ?> + + + + +           "; + if ($pass_msg == 1) echo "password changed"; + if ($pass_msg == 2) echo "password error"; + } + ?>
@@ -537,8 +517,8 @@
Token
- - + +
diff --git a/FruityWifi/www/page_logs.php b/FruityWiFi/www/page_logs.php similarity index 100% rename from FruityWifi/www/page_logs.php rename to FruityWiFi/www/page_logs.php diff --git a/FruityWifi/www/page_modules.php b/FruityWiFi/www/page_modules.php similarity index 100% rename from FruityWifi/www/page_modules.php rename to FruityWiFi/www/page_modules.php diff --git a/FruityWifi/www/page_status.php b/FruityWiFi/www/page_status.php similarity index 98% rename from FruityWifi/www/page_status.php rename to FruityWiFi/www/page_status.php index 09fde58..367ca3b 100644 --- a/FruityWifi/www/page_status.php +++ b/FruityWiFi/www/page_status.php @@ -382,15 +382,13 @@ function addDivs($service, $alias, $edit, $path)
Interfaces/IP
"; } } diff --git a/FruityWifi/www/page_status_ws.php b/FruityWiFi/www/page_status_ws.php similarity index 99% rename from FruityWifi/www/page_status_ws.php rename to FruityWiFi/www/page_status_ws.php index fa8e70d..84bc106 100644 --- a/FruityWifi/www/page_status_ws.php +++ b/FruityWiFi/www/page_status_ws.php @@ -713,15 +713,13 @@ function addDivs($service, $alias, $edit, $path, $mod_logs_panel)
Interfaces/IP
"; } } diff --git a/FruityWifi/www/page_status_wsdl.php b/FruityWiFi/www/page_status_wsdl.php similarity index 99% rename from FruityWifi/www/page_status_wsdl.php rename to FruityWiFi/www/page_status_wsdl.php index 0f56bad..f9495d1 100644 --- a/FruityWifi/www/page_status_wsdl.php +++ b/FruityWiFi/www/page_status_wsdl.php @@ -1,6 +1,6 @@ Interfaces/IP
> $mod_logs &"; @@ -467,13 +458,10 @@ function killRegex($regex){ //EXTRACT MACADDRESS unset($output); - $exec = "$bin_ifconfig -a $io_in_iface |grep HWaddr"; - $output = exec_fruitywifi($exec); - $output = preg_replace('/\s+/', ' ',$output[0]); - $output = explode(" ",$output); + $output = getIfaceMAC($io_in_iface); //REPLACE MAC - $exec = "$bin_sed -i 's/^bssid=.*/bssid=".$output[4]."/g' $mod_path/includes/conf/hostapd.conf"; + $exec = "$bin_sed -i 's/^bssid=.*/bssid=".$output."/g' $mod_path/includes/conf/hostapd.conf"; exec_fruitywifi($exec); $exec = "$bin_hostapd $mod_path/includes/conf/hostapd.conf >> $mod_logs &"; @@ -619,13 +607,10 @@ function killRegex($regex){ //EXTRACT MACADDRESS unset($output); - $exec = "$bin_ifconfig -a $io_in_iface |grep HWaddr"; - $output = exec_fruitywifi($exec); - $output = preg_replace('/\s+/', ' ',$output[0]); - $output = explode(" ",$output); + $output = getIfaceMAC($io_in_iface); //REPLACE MAC - $exec = "$bin_sed -i 's/^bssid=.*/bssid=".$output[4]."/g' $mod_path/includes/conf/hostapd-secure.conf"; + $exec = "$bin_sed -i 's/^bssid=.*/bssid=".$output."/g' $mod_path/includes/conf/hostapd-secure.conf"; exec_fruitywifi($exec); $exec = "$bin_hostapd $mod_path/includes/conf/hostapd-secure.conf >> $mod_logs &"; @@ -648,13 +633,10 @@ function killRegex($regex){ //EXTRACT MACADDRESS unset($output); - $exec = "$bin_ifconfig -a $io_in_iface |grep HWaddr"; - $output = exec_fruitywifi($exec); - $output = preg_replace('/\s+/', ' ',$output[0]); - $output = explode(" ",$output); + $output = getIfaceMAC($io_in_iface); //REPLACE MAC - $exec = "$bin_sed -i 's/^bssid=.*/bssid=".$output[4]."/g' $mod_path/includes/conf/hostapd.conf"; + $exec = "$bin_sed -i 's/^bssid=.*/bssid=".$output."/g' $mod_path/includes/conf/hostapd.conf"; exec_fruitywifi($exec); $exec = "$bin_hostapd $mod_path/includes/conf/hostapd.conf >> $mod_logs &"; diff --git a/FruityWifi/www/scripts/switch_status.php b/FruityWiFi/www/scripts/switch_status.php similarity index 100% rename from FruityWifi/www/scripts/switch_status.php rename to FruityWiFi/www/scripts/switch_status.php diff --git a/FruityWifi/www/scripts/view_log.php b/FruityWiFi/www/scripts/view_log.php similarity index 100% rename from FruityWifi/www/scripts/view_log.php rename to FruityWiFi/www/scripts/view_log.php diff --git a/FruityWifi/www/scripts/ws.php b/FruityWiFi/www/scripts/ws.php similarity index 100% rename from FruityWifi/www/scripts/ws.php rename to FruityWiFi/www/scripts/ws.php diff --git a/FruityWifi/www/style.css b/FruityWiFi/www/style.css similarity index 100% rename from FruityWifi/www/style.css rename to FruityWiFi/www/style.css diff --git a/FruityWifi/www/users.php b/FruityWiFi/www/users.php similarity index 100% rename from FruityWifi/www/users.php rename to FruityWiFi/www/users.php diff --git a/FruityWifi/www/wait.php b/FruityWiFi/www/wait.php similarity index 100% rename from FruityWifi/www/wait.php rename to FruityWiFi/www/wait.php diff --git a/FruityWifi/www/wait_fruit.php b/FruityWiFi/www/wait_fruit.php similarity index 100% rename from FruityWifi/www/wait_fruit.php rename to FruityWiFi/www/wait_fruit.php diff --git a/FruityWifi/www/wsdl/FruityWifi.php b/FruityWiFi/www/wsdl/FruityWifi.php similarity index 100% rename from FruityWifi/www/wsdl/FruityWifi.php rename to FruityWiFi/www/wsdl/FruityWifi.php diff --git a/FruityWifi/www/wsdl/FruityWifi_client.php b/FruityWiFi/www/wsdl/FruityWifi_client.php similarity index 100% rename from FruityWifi/www/wsdl/FruityWifi_client.php rename to FruityWiFi/www/wsdl/FruityWifi_client.php diff --git a/FruityWifi/www/wsdl/lib/changelog b/FruityWiFi/www/wsdl/lib/changelog similarity index 100% rename from FruityWifi/www/wsdl/lib/changelog rename to FruityWiFi/www/wsdl/lib/changelog diff --git a/FruityWifi/www/wsdl/lib/class.nusoap_base.php b/FruityWiFi/www/wsdl/lib/class.nusoap_base.php similarity index 100% rename from FruityWifi/www/wsdl/lib/class.nusoap_base.php rename to FruityWiFi/www/wsdl/lib/class.nusoap_base.php diff --git a/FruityWifi/www/wsdl/lib/class.soap_fault.php b/FruityWiFi/www/wsdl/lib/class.soap_fault.php similarity index 100% rename from FruityWifi/www/wsdl/lib/class.soap_fault.php rename to FruityWiFi/www/wsdl/lib/class.soap_fault.php diff --git a/FruityWifi/www/wsdl/lib/class.soap_parser.php b/FruityWiFi/www/wsdl/lib/class.soap_parser.php similarity index 100% rename from FruityWifi/www/wsdl/lib/class.soap_parser.php rename to FruityWiFi/www/wsdl/lib/class.soap_parser.php diff --git a/FruityWifi/www/wsdl/lib/class.soap_server.php b/FruityWiFi/www/wsdl/lib/class.soap_server.php similarity index 100% rename from FruityWifi/www/wsdl/lib/class.soap_server.php rename to FruityWiFi/www/wsdl/lib/class.soap_server.php diff --git a/FruityWifi/www/wsdl/lib/class.soap_transport_http.php b/FruityWiFi/www/wsdl/lib/class.soap_transport_http.php similarity index 100% rename from FruityWifi/www/wsdl/lib/class.soap_transport_http.php rename to FruityWiFi/www/wsdl/lib/class.soap_transport_http.php diff --git a/FruityWifi/www/wsdl/lib/class.soap_val.php b/FruityWiFi/www/wsdl/lib/class.soap_val.php similarity index 100% rename from FruityWifi/www/wsdl/lib/class.soap_val.php rename to FruityWiFi/www/wsdl/lib/class.soap_val.php diff --git a/FruityWifi/www/wsdl/lib/class.soapclient.php b/FruityWiFi/www/wsdl/lib/class.soapclient.php similarity index 100% rename from FruityWifi/www/wsdl/lib/class.soapclient.php rename to FruityWiFi/www/wsdl/lib/class.soapclient.php diff --git a/FruityWifi/www/wsdl/lib/class.wsdl.php b/FruityWiFi/www/wsdl/lib/class.wsdl.php similarity index 100% rename from FruityWifi/www/wsdl/lib/class.wsdl.php rename to FruityWiFi/www/wsdl/lib/class.wsdl.php diff --git a/FruityWifi/www/wsdl/lib/class.wsdlcache.php b/FruityWiFi/www/wsdl/lib/class.wsdlcache.php similarity index 100% rename from FruityWifi/www/wsdl/lib/class.wsdlcache.php rename to FruityWiFi/www/wsdl/lib/class.wsdlcache.php diff --git a/FruityWifi/www/wsdl/lib/class.xmlschema.php b/FruityWiFi/www/wsdl/lib/class.xmlschema.php similarity index 100% rename from FruityWifi/www/wsdl/lib/class.xmlschema.php rename to FruityWiFi/www/wsdl/lib/class.xmlschema.php diff --git a/FruityWifi/www/wsdl/lib/nusoap.php b/FruityWiFi/www/wsdl/lib/nusoap.php similarity index 100% rename from FruityWifi/www/wsdl/lib/nusoap.php rename to FruityWiFi/www/wsdl/lib/nusoap.php diff --git a/FruityWifi/www/wsdl/lib/nusoapmime.php b/FruityWiFi/www/wsdl/lib/nusoapmime.php similarity index 100% rename from FruityWifi/www/wsdl/lib/nusoapmime.php rename to FruityWiFi/www/wsdl/lib/nusoapmime.php diff --git a/FruityWifi/bin/danger.c b/FruityWifi/bin/danger.c deleted file mode 100644 index 3953653..0000000 --- a/FruityWifi/bin/danger.c +++ /dev/null @@ -1,14 +0,0 @@ -#include - #include - #include - - int - main (int argc, char *argv[]) - { - - setuid (0); - system(argv[1]); - - return 0; - - } \ No newline at end of file diff --git a/FruityWifi/www/functions.php b/FruityWifi/www/functions.php deleted file mode 100644 index 730c7b3..0000000 --- a/FruityWifi/www/functions.php +++ /dev/null @@ -1,202 +0,0 @@ -. -*/ -?> - [a-z0-9-_. ] ] -function regex_standard($var, $url, $regex_extra) { - - $regex_extra = implode("\\", str_split($regex_extra)); - - $regex = "/(?i)(^[a-z0-9 $regex_extra]{1,20})|(^$)/"; - //$regex = "/(?i)(^[a-z0-9]{1,20}$)|(^$)/"; - - //$referer = $_SERVER['HTTP_REFERER']; - - if (preg_match($regex, $var) == 0) { - - //header("Location: ".$referer."?error=1"); - echo ""; - //echo ""; - - exit; - - } - -} - -function exec_fruitywifi($exec) { - - $exec_mode = "sudo"; - - if ($exec_mode == "danger") { - - $bin_exec = "/usr/share/fruitywifi/bin/danger"; - exec("$bin_exec \"" . $exec . "\"", $output); - return $output; - - } else if ($exec_mode == "sudo") { - - $bin_exec = "/usr/bin/sudo"; - exec("$bin_exec sh -c \"$exec\"", $output); - return $output; - - } else { - return false; - } - -} - -function exec_fruitywifi_env($exec) { - - # Construct our new PATH. - $RBENV_ROOT="/root/.rbenv"; - $ROOT_PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"; - $ROOT_PATH="$RBENV_ROOT/shims:$RBENV_ROOT/bin:$ROOT_PATH"; - - $exec_mode = "sudo"; - - if ($exec_mode == "danger") { - - $bin_exec = "/usr/share/fruitywifi/bin/danger"; - exec("$bin_exec \"" . $exec . "\"", $output); - return $output; - - } else if ($exec_mode == "sudo") { - - $bin_exec = "/usr/bin/sudo"; - exec("$bin_exec env PATH=\"$ROOT_PATH\" sh -c \"$exec\"", $output); - return $output; - - } else { - return false; - } - -} - -function setToken() { - $token = sha1(microtime(true).mt_rand(10000,90000)); - return $token; -} - -function module_deb($mod_name) { - $module="fruitywifi-module-$mod_name"; - - $exec = "apt-cache policy $module"; - exec($exec, $output); - - //print_r($output); - - if(empty($output)) { - //echo "none..."; - return 0; - } else { - - $installed = explode(" ", trim($output[1])); - $candidate = explode(" ", trim($output[2])); - - if( $installed[1] == $candidate[1] ) { - //echo "installed..."; - return 1; - } else if( $installed[1] == "(none)" ) { - //echo "install..."; - return 2; - } else { - //echo "upgrade..."; - return 3; - } - - } -} - -function start_monitor_mode($iface) { - - $bin_danger = "/usr/share/fruitywifi/bin/danger"; - - // START MONITOR MODE (mon0) - $iface_mon0 = exec("/sbin/ifconfig |grep mon0"); - if ($iface_mon0 == "") { - $exec = "/usr/bin/sudo /usr/sbin/airmon-ng start $iface"; - //exec("$bin_danger \"" . $exec . "\"", $output); //DEPRECATED - exec_fruitywifi($exec); - } - -} - -function stop_monitor_mode($iface) { - - $bin_danger = "/usr/share/fruitywifi/bin/danger"; - - // START MONITOR MODE (mon0) - $iface_mon0 = exec("/sbin/ifconfig |grep mon0"); - if ($iface_mon0 != "") { - $exec = "/usr/bin/sudo /usr/sbin/airmon-ng stop mon0"; - //exec("$bin_danger \"" . $exec . "\"", $output); //DEPRECATED - exec_fruitywifi($exec); - } - -} - -function open_file($filename) { - - if ( file_exists($filename) ) { - if ( 0 < filesize( $filename ) ) { - $fh = fopen($filename, "r"); // or die("Could not open file."); - $data = fread($fh, filesize($filename)); // or die("Could not read file."); - fclose($fh); - return $data; - } - } - -} - -function start_iface($iface, $ip, $gw) { - - $bin_danger = "/usr/share/fruitywifi/bin/danger"; - - // START MONITOR MODE (mon0) - $iface_mon0 = exec("/sbin/ifconfig |grep mon0"); - //if ($iface_mon0 == "") { - $exec = "/usr/bin/sudo /sbin/ifconfig $iface $ip"; - //exec("$bin_danger \"" . $exec . "\"", $output); //DEPRECATED - exec_fruitywifi($exec); - //} - - if (trim($gw) != "") { - $exec = "/usr/bin/sudo /sbin/route add default gw $gw"; - //exec("$bin_danger \"" . $exec . "\"", $output); //DEPRECATED - exec_fruitywifi($exec); - } - -} - -function stop_iface($iface, $ip, $gw) { - - $bin_danger = "/usr/share/fruitywifi/bin/danger"; - - // START MONITOR MODE (mon0) - $iface_mon0 = exec("/sbin/ifconfig |grep mon0"); - //if ($iface_mon0 != "") { - $exec = "/usr/bin/sudo /sbin/ifconfig $iface 0.0.0.0"; - //exec("$bin_danger \"" . $exec . "\"", $output); //DEPRECATED - exec_fruitywifi($exec); - //} - -} - -?> \ No newline at end of file diff --git a/FruityWifi/www/page_kismet.php b/FruityWifi/www/page_kismet.php deleted file mode 100644 index b0ba1e0..0000000 --- a/FruityWifi/www/page_kismet.php +++ /dev/null @@ -1,80 +0,0 @@ -. -*/ -?> - - -
- -
Kismet Setup
-
- enabled.  | stop
"; - //echo "   Kismet enabled.  | stop
"; - echo "   Kismet enabled.  | stop
"; - } else { - //echo "   Kismet disabled. | start
"; - //echo "   Kismet disabled. | start
"; - echo "   Kismet disabled. | start
"; - } - ?> - enabled.  | stop
"; - } else { - echo "     GPSD disabled. | start
"; - } - ?> - connected.
"; - } else { - echo "  ttyUSB0 disconnected.
"; - } - ?> - - -
- -
-export all -
- -x "; - echo $filename . " | "; - echo "export | "; - if (file_exists("logs/kismet/output_$filename.kml")) { - echo "download"; - } - echo "
"; -} -?> diff --git a/FruityWifi/www/page_squid.php b/FruityWifi/www/page_squid.php deleted file mode 100644 index bd5fc56..0000000 --- a/FruityWifi/www/page_squid.php +++ /dev/null @@ -1,84 +0,0 @@ -. -*/ -?> - - - - -
-
Squid Setup
-
- enabled.  | stop
"; - } else { - echo "    Squid disabled. | start
"; - } - - ?> - enabled.  | stop
"; - } else { - echo "   Inject disabled. | start
"; - } - - ?> - enabled.  | stop
"; - } else { - echo " Iptables disabled. | start
"; - } - - ?> -
- -
- -
Inject Script
-
-x "; - //echo $filename . " | "; - if ($filename != "pasarela") { - if ("$filename.js" == $url_rewrite_program) echo "+ "; - echo "$filename"; - //echo $filename; - //echo "view"; - //echo "view"; - echo "
"; - } -} -?> -
diff --git a/FruityWifi/www/page_sslstrip.php b/FruityWifi/www/page_sslstrip.php deleted file mode 100644 index 3636a55..0000000 --- a/FruityWifi/www/page_sslstrip.php +++ /dev/null @@ -1,56 +0,0 @@ -. -*/ -?> - - - -
- -
sslstrip Setup
-
- enabled.  | stop
"; - echo " sslstrip enabled.  | stop
"; - } else { - #echo " Wireless disabled. | start
"; - echo " sslstrip disabled. | start
"; - } - ?> -
- -
- -x "; - echo $filename . " | "; - //echo "view"; - echo "view"; - echo "
"; -} -?> diff --git a/README.md b/README.md index 5d4977e..b2ef6e5 100644 --- a/README.md +++ b/README.md @@ -1,107 +1,87 @@ -FruityWifi -============== - -FruityWifi is a wireless network auditing tool. The application can be installed in any Debian based system adding the extra packages. Tested in Debian, Kali Linux, Kali Linux ARM (Raspberry Pi), Raspbian (Raspberry Pi), Pwnpi (Raspberry Pi), Bugtraq. - - -v2.2 ----------------- -- Wireless service has been replaced by AP module -- Mobile support has been added -- Bootstrap support has been added -- Token auth has been added -- minor fix - - -v2.1 ----------------- -- Hostapd Mana support has been added -- Phishing service has been replaced by phishing module -- Karma service has been replaced by karma module -- Sudo has been implemented (replacement for danger) -- Logs path can be changed -- Squid dependencies have been removed from FruityWifi installer -- Phishing dependencies have been removed from FruityWifi installer -- New AP options available: hostapd, hostapd-mana, hostapd-karma, airmon-ng -- Domain name can be changed from config panel -- New install options have been added to install-FruityWifi.sh -- Install/Remove have been updated - - -v2.0 (alpha) ----------------- -- Web-Interface has been changed (new look and feel, new options). -- Nginx has replaced Apache2 as default webserver. -- Installation script has been updated. -- Config panel has been changed. -- Network interfaces structure has been changed and renamed. -- It is possible to use FruityWifi combining multiple networks and setups. -- Supplicant mode has been added as a module. -- 3G/4G Broadband Mobile has been added as a module. -- FruityWifi HTTP webinterface on port 8000 -- FruityWifi HTTPS webinterface on port 8443 - - -v1.9 ----------------- -- Service Karma has been replaced by Karma module -- Service Supplicant has been replaced by nmcli module -- Config page has been updated -- Supplicant config has been changed (nmcli module is required) -- dnspoof host file has been removed from config page (dnsspoof module is required) -- Logs page has been updated -- WSDL has been updated -- Hostapd/Karma has been removed from installer (replaced by Karma module) -- NetworkManager has been removed from installer (replaced by nmcli module) -- install-modules.py has been added (install all modules from console) - - -v1.8 ----------------- -- WSDL has been added -- new status page has been added -- logs can follow in realtime using the new status page (wsdl) - - -v1.6 ----------------- -- Dependencies can be installed from module windows -- minor fix - - -v1.5 ----------------- -- New functions has been added -- Source code has been changed (open file function) -- minor fix - - -v1.4 ----------------- -- New functions has been added (monitor mode) -- config page has been changed -- minor fix - - -v1.3 ----------------- -- Directory structure has been changed -- minor fix - - -v1.2 ----------------- -- Installation script has been updated -- SSLstrip fork (@xtr4nge) has been added (Inject + Tamperer options) -- minor fix - - -v1.1 ----------------- -- External modules can be installed from modules page -- minor fix - - -v1.0 ----------------- -- init +# FruityWiFi +###### Wireless network auditing tool http://www.fruitywifi.com/ + +## Important Note (Debian 11 Bullseye): +Please use Use **Debian 11 Bullseye** based systems. The Installer has been updated for resolving issues with old version. +
+**Note**: Some modules will not work until they are upgraded to Python3 +

+ +FruityWiFi is an open source tool to audit wireless networks. It allows the user to deploy advanced attacks by directly using the web interface or by sending messages to it. + +Initialy the application was created to be used with the Raspberry-Pi, but it can be installed on any Debian based system. + +![Status](http://www.fruitywifi.com/img/001.png) + +A more flexible control panel. Now it is possible to use FruityWifi combining multiple networks and setups: + +Within the new options on the control panel we can change the AP mode between Hostapd or Airmon-ng allowing to use more chipsets like Realtek. + +It is possible customize each one of the network interfaces which allows the user to keep the current setup or change it completely. + +![Config](http://www.fruitywifi.com/img/002.png) + +FruityWifi is based on modules making it more flexible. These modules can be installed from the control panel to provide FruityWifi with new functionalities. + +Within the available modules you can find URLsnarf, DNSspoof, Kismet, mdk3, ngrep, nmap, Squid3 y SSLstrip (code injection functionality), Captive Portal, AutoSSH, Meterpreter, Tcpdump and more. + +**Note**: New modules are being developed continuously and can be installed from the modules page. + +## Install + +Using the installation script all the required dependencies, scripts and setup can be installed. + +On **Buster** based systems use: install-FruityWiFi.sh +

+ +### x86/x64 Version + +- You need Debian (or based) installed (or a Live CD version) to use this script. +- Download the zip file from https://github.com/xtr4nge/FruityWifi/archive/master.zip +- Unzip the file and run **install-FruityWiFi.sh** (This script will install all the dependencies and setups) +- Done. + +Go to **http://localhost:8000** (for http)
+Go to **https://localhost:8443** (for https) + +user: admin
+pass: admin +

+ +### Kali Linux Version + +**Note**: The Kali Linux version has not been updated in long time. I will try to work on this as soon as I can. For the moment use the GitHub installer for avoiding issues. + +FruityWiFi is now part of Kali Linux repositories. +- `apt-get install fruitywifi` +- `/etc/init.d/fruitywifi start` +- `/etc/init.d/php5-fpm start` + +Go to **http://localhost:8000** (for http)
+Go to **https://localhost:8443** (for https) + +user: admin
+pass: admin +
+ +Note: installing `fruitywifi` will install all modules. If you want to install only some modules, you can install `fruitywifi-core` first and then each module, for example `fruitywifi-module-dnsspoof`. +

+ +### ARM version (Raspberry Pi) + +**Note**: The new installer has not been tested on Raspberry yet. I will try to work on this as soon as I can. + +- You need a Raspbian, Pwnpi or Kali Linux version to use this script. +- Download the zip file from https://github.com/xtr4nge/FruityWifi/archive/master.zip +- Unzip the file and run **install-FruityWiFi.sh** (This script will install all the dependencies and setups) +- Done. + +Go to **http://localhost:8000** (for http)
+Go to **https://localhost:8443** (for https) + +user: admin
+pass: admin +

+ +### More information +[Wiki](https://github.com/xtr4nge/FruityWifi/wiki) diff --git a/install-FruityWifi.sh b/install-FruityWiFi.sh similarity index 51% rename from install-FruityWifi.sh rename to install-FruityWiFi.sh index 5296eb1..221dcf2 100755 --- a/install-FruityWifi.sh +++ b/install-FruityWiFi.sh @@ -1,28 +1,26 @@ #!/bin/bash # CONFIG +version="2.4.3" # -------------------------------------------------------- -# Setup 'sudo' or 'danger' (root exec). +# Setup PHP version -> options: PHP5 | PHP7 +# The chosen version needs to be in the repository # -------------------------------------------------------- -fruitywifi_exec_mode="sudo" +#fruitywifi_php_version="PHP7" +php_version="7.4" # -------------------------------------------------------- # Setup log path. default=/usr/share/fruitywifi/logs # -------------------------------------------------------- fruitywifi_log_path="/usr/share/fruitywifi/logs" # -------------------------------------------------------- -# danger: 'enable' or 'disabled' (Backward compatibility) # -------------------------------------------------------- -fruitywifi_danger="enabled" +# FruityWiFi set defaults [init.d] # -------------------------------------------------------- -# 'all' option installs nginx webserver on ports 80 | 443, -# and it also installs FruityWifi on ports 8000 | 8443. -# If 'all' is not specified then only installs 8000 | 8443 -# -------------------------------------------------------- -fruitywifi_webserver="all" +fruitywifi_init_defaults="onboot" # -------------------------------------------------------- -find FruityWifi -type d -exec chmod 755 {} \; -find FruityWifi -type f -exec chmod 644 {} \; +find FruityWiFi -type d -exec chmod 755 {} \; +find FruityWiFi -type f -exec chmod 644 {} \; root_path=`pwd` @@ -34,32 +32,17 @@ apt-get update echo "--------------------------------" echo "Creates user fruitywifi" echo "--------------------------------" -adduser --disabled-password --quiet --system --home /var/run/fruitywifi --no-create-home --gecos "FruityWifi" --group fruitywifi +adduser --disabled-password --quiet --system --home /var/run/fruitywifi --no-create-home --gecos "FruityWiFi" --group fruitywifi +#usermod -a -G inet fruitywifi # *****ERROR?!***** REPLACED? REMOVED? COMMENT? echo "[fruitywifi user has been created]" echo -apt-get -y install gettext make intltool build-essential automake autoconf uuid uuid-dev php5-curl php5-cli dos2unix curl sudo unzip lsb-release - -cmd=`gcc --version|grep "4.7"` -if [[ $cmd == "" ]] -then - echo "--------------------------------" - echo "Installing gcc 4.7" - echo "--------------------------------" - - apt-get -y install gcc-4.7 - apt-get -y install g++-4.7 - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7 - - echo "[gcc setup completed]" +apt-get -y install gettext make intltool build-essential automake autoconf uuid uuid-dev dos2unix curl sudo unzip lsb-release tcpdump +apt-get -y install python3-netifaces python3-pip python3-scapy +apt-get -y install git ntp -else - echo "--------------------------------" - echo "gcc 4.7 already installed" - echo "--------------------------------" - echo -fi +pip install netifaces echo @@ -111,13 +94,21 @@ then # INSTALL AIRCRACK-NG apt-get -y install libssl-dev wireless-tools iw - wget http://download.aircrack-ng.org/aircrack-ng-1.2-beta1.tar.gz - tar -zxvf aircrack-ng-1.2-beta1.tar.gz - cd aircrack-ng-1.2-beta1 - make - make install - ln -s /usr/local/sbin/airmon-ng /usr/sbin/airmon-ng - ln -s /usr/local/sbin/airbase-ng /usr/sbin/airbase-ng + # DEPENDENCIES FROM AIRCRACK INSTALLER + apt-get -y install build-essential autoconf automake libtool pkg-config libnl-3-dev libnl-genl-3-dev libssl-dev ethtool shtool rfkill zlib1g-dev libpcap-dev libsqlite3-dev libpcre3-dev libhwloc-dev libcmocka-dev + apt-get -y install aircrack-ng + + #VERSION="aircrack-ng-1.6" + #wget http://download.aircrack-ng.org/$VERSION.tar.gz + #tar -zxvf $VERSION.tar.gz + #cd $VERSION + #autoreconf -i + #./configure + #make + #make install + #ldconfig + ##ln -s /usr/local/sbin/airmon-ng /usr/sbin/airmon-ng + ##ln -s /usr/local/sbin/airbase-ng /usr/sbin/airbase-ng cd ../ echo "[aircrack-ng setup completed]" @@ -139,7 +130,7 @@ echo "Installing Nginx" echo "--------------------------------" # NGINX INSTALL -apt-get -y install nginx php5-fpm +apt-get -y install nginx echo # SSL @@ -150,55 +141,55 @@ cd $root_path mkdir /etc/nginx/ssl openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt +# REMOVE DEFAULT SITE rm /etc/nginx/sites-enabled/default +# SETUP NGINX AND PHP5|PHP7 cp nginx-setup/nginx.conf /etc/nginx/ -cp nginx-setup/FruityWifi /etc/nginx/sites-enabled/ -cp nginx-setup/fpm/8000.conf /etc/php5/fpm/pool.d/ -cp nginx-setup/fpm/8443.conf /etc/php5/fpm/pool.d/ -if [ $fruitywifi_webserver == "all" ] -then - mkdir /var/www/ - echo "." >> /var/www/index.php - chown -R fruitywifi:fruitywifi /var/www/ - #cp nginx-setup/default /etc/nginx/sites-enabled/ - cp nginx-setup/fpm/80.conf /etc/php5/fpm/pool.d/ - cp nginx-setup/fpm/443.conf /etc/php5/fpm/pool.d/ -fi -# RESTAR NGINX + PHP5-FPM +# INSTALL PHP GENERAL +apt-get -y install php-fpm php-curl php-cli php-xml + +cp nginx-setup/FruityWiFi /etc/nginx/sites-enabled/ +cp nginx-setup/fpm/8000.conf /etc/php/$php_version/fpm/pool.d/ +cp nginx-setup/fpm/8443.conf /etc/php/$php_version/fpm/pool.d/ + +# RESTART NGINX + PHP7-FPM /etc/init.d/nginx restart -/etc/init.d/php5-fpm restart +/etc/init.d/php$php_version-fpm restart echo "[nginx setup completed]" echo -echo "--------------------------------" -echo "BACKUP" -echo "--------------------------------" -cmd=`date +"%Y-%m-%d-%k-%M-%S"` -mv /usr/share/fruitywifi fruitywifi.BAK.$cmd -echo +DIR="/usr/share/fruitywifi" +if [ -d "$DIR" ]; then + echo "--------------------------------" + echo "BACKUP CORE AND MODULES" + echo "--------------------------------" + cmd=`date +"%Y-%m-%d-%H-%M-%S"` + mv $DIR fruitywifi.BAK.$cmd + echo +fi echo "--------------------------------" -echo "Setup FruityWifi" +echo "Setup FruityWiFi" echo "--------------------------------" cd $root_path +echo echo "--------------------------------" echo "Config log path" echo "--------------------------------" -mkdir $fruitywifi_log_path EXEC="s,^\$log_path=.*,\$log_path=\""$fruitywifi_log_path"\";,g" -sed -i $EXEC FruityWifi/www/config/config.php +sed -i "$EXEC" FruityWiFi/www/config/config.php EXEC="s,^log-facility=.*,log-facility="$fruitywifi_log_path"/dnsmasq.log,g" -sed -i $EXEC FruityWifi/conf/dnsmasq.conf +sed -i "$EXEC" FruityWiFi/conf/dnsmasq.conf EXEC="s,^dhcp-leasefile=.*,dhcp-leasefile="$fruitywifi_log_path"/dhcp.leases,g" -sed -i $EXEC FruityWifi/conf/dnsmasq.conf -EXEC="s,^Defaults logfile =.*,Defaults logfile = "$fruitywifi_log_path"/sudo.log,g" -sed -i $EXEC sudo-setup/fruitywifi +sed -i "$EXEC" FruityWiFi/conf/dnsmasq.conf +EXEC="s,^Defaults:fruitywifi logfile =.*,Defaults:fruitywifi logfile = "$fruitywifi_log_path"/sudo.log,g" +sed -i "$EXEC" sudo-setup/fruitywifi echo "[logs setup completed]" echo @@ -208,61 +199,58 @@ echo "Setup Sudo" echo "--------------------------------" cd $root_path cp -a sudo-setup/fruitywifi /etc/sudoers.d/ +chown root:root /etc/sudoers.d/fruitywifi echo "[sudo setup completed]" echo -cmd=`lsb_release -c |grep "jessie"` -if [[ ! -z $cmd ]] -then - echo "--------------------------------" - echo "Setup DNSMASQ" - echo "--------------------------------" - - EXEC="s,^server=,#server=,g" - sed -i $EXEC FruityWifi/conf/dnsmasq.conf - - echo "[dnsmasq setup completed]" - echo - -fi -cp -a FruityWifi /usr/share/fruitywifi +cp -a FruityWiFi /usr/share/fruitywifi +#mkdir $fruitywifi_log_path ln -s $fruitywifi_log_path /usr/share/fruitywifi/www/logs -ln -s /usr/share/fruitywifi/ /usr/share/FruityWifi -#if [ $fruitywifi_exec_mode == "danger" ] -if [ $fruitywifi_danger == "enabled" ] +echo + +# START/STOP SERVICES +if [[ $fruitywifi_init_defaults == "onboot" ]] then - echo "--------------------------------" - echo "Installing danger" - echo "--------------------------------" - - cd /usr/share/fruitywifi/bin/ - gcc danger.c -o danger - chgrp fruitywifi /usr/share/fruitywifi/bin/danger - chmod 4750 /usr/share/fruitywifi/bin/danger + echo "--------------------------------" + echo "START SERVICES" + echo "--------------------------------" + + update-rc.d ssh defaults + update-rc.d nginx defaults + update-rc.d ntp defaults + + /etc/init.d/nginx restart + update-rc.d php$php_version-fpm defaults + /etc/init.d/php$php_version-fpm restart + fi -echo +# WORKAROUNDs +ln -s /usr/sbin/ifconfig /usr/bin/ifconfig +#ln -s /usr/bin/python3 /usr/bin/python -# START/STOP SERVICES -echo "--------------------------------" -echo "Start Services" -echo "--------------------------------" -update-rc.d ssh defaults -update-rc.d nginx defaults -update-rc.d php5-fpm defaults -update-rc.d ntp defaults +# REPLACE IFACE TO ETHx WLANx +#sed -i 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"/g' /etc/default/grub +#grub-mkconfig -o /boot/grub/grub.cfg -/etc/init.d/nginx restart -/etc/init.d/php5-fpm restart +# Monitor Mode [rt2800usb] +# https://wiki.debian.org/rt2800usb -apt-get -y remove ifplugd +#apt-get -y remove ifplugd # *****RPI CONFLICT IF NOT REMOVED/UNINSTALLED?***** echo - +echo "---------------------------" +echo "WEB-INTERFACE" +echo "---------------------------" +echo "http://localhost:8000 [http]" +echo "https://localhost:8443 [https]" +echo "user: admin" +echo "pass: admin" +echo echo "GitHub: https://github.com/xtr4nge/FruityWifi" echo "Twitter: @xtr4nge, @FruityWifi" echo "ENJOY!" diff --git a/modules-FruityWifi.xml b/modules-FruityWifi.xml index 3471013..3cfcd47 100644 --- a/modules-FruityWifi.xml +++ b/modules-FruityWifi.xml @@ -1,16 +1,128 @@ + + api + 1.2 + @xtr4nge + API interface + module_api + 2.4 + ap - 1.0 + 1.7 @xtr4nge AP interface module_ap - 2.2 + 2.4 + + + fruitydns + 1.1 + @xtr4nge + FruityDNS interface + module_fruitydns + 2.4 + + + karma + 1.7 + @xtr4nge + Karma interface + module_karma + 2.4 + + + mana + 1.7 + @xtr4nge + mana interface + module_mana + 2.4 + + + automaton + 1.2 + @xtr4nge + automaton interface + module_automaton + 2.4 + + + faraday + 1.0 + @xtr4nge + faraday interface + module_faraday + 2.4 + + + geolocation + 1.0 + @xtr4nge + geolocation interface + module_geolocation + 2.4 + + + detectrogue + 1.2 + @xtr4nge + detectrogue interface + module_detectrogue + 2.4 + + + detectdeauth + 1.1 + @xtr4nge + detectdeauth interface + module_detectdeauth + 2.4 + + + hopper + 1.0 + @xtr4nge + hopper interface + module_hopper + 2.4 + + + bettercap + 1.0 + @xtr4nge + bettercap interface + module_bettercap + 2.4 + + + beef + 1.0 + @xtr4nge + beef interface + module_beef + 2.4 + + + metasploit + 1.1 + @xtr4nge + metasploit interface + module_metasploit + 2.4 + + + sshuttle + 1.0 + @xtr4nge + sshuttle interface + module_sshuttle + 2.4 nmap - 1.4 + 1.5 @xtr4nge nmap interface module_nmap @@ -18,7 +130,7 @@ sslstrip - 1.7 + 1.8 @xtr4nge sslstrip interface module_sslstrip @@ -34,7 +146,7 @@ urlsnarf - 1.6 + 1.7 @xtr4nge urlsnarf interface module_urlsnarf @@ -42,7 +154,7 @@ mdk3 - 1.7 + 1.8 @xtr4nge mdk3 interface module_mdk3 @@ -50,7 +162,7 @@ ngrep - 1.4 + 1.5 @xtr4nge ngrep interface module_ngrep @@ -58,15 +170,15 @@ captive - 1.4 + 1.9 @xtr4nge captive portal module_captive - 2.1 + 2.4 squid3 - 1.3 + 1.4 @xtr4nge squid3 interface module_squid3 @@ -74,15 +186,15 @@ kismet - 1.2 + 1.3 @xtr4nge kismet interface module_kismet - 2.1 + 2.4 responder - 1.4 + 1.6 @xtr4nge Responder interface module_responder @@ -90,11 +202,11 @@ autostart - 1.2 + 1.4 @xtr4nge Autostart interface module_autostart - 2.1 + 2.4 rpitwit @@ -112,14 +224,6 @@ module_whatsapp 2.1 - - karma - 1.5 - @xtr4nge - Karma interface - module_karma - 2.1 - nmcli 1.3 @@ -138,11 +242,11 @@ supplicant - 1.2 + 1.3 @xtr4nge supplicant interface module_supplicant - 2.1 + 2.4 meterpreter @@ -154,7 +258,7 @@ ettercap - 1.2 + 1.3 @xtr4nge ettercap interface module_ettercap @@ -162,7 +266,7 @@ tcpdump - 1.1 + 1.2 @xtr4nge tcpdump interface module_tcpdump @@ -170,7 +274,7 @@ autossh - 1.1 + 1.3 @xtr4nge autossh interface module_autossh @@ -202,43 +306,35 @@ phishing - 1.1 + 1.2 @xtr4nge phishing interface module_phishing 2.1 - - mana - 1.3 - @xtr4nge - mana interface - module_mana - 2.1 - recon - 1.1 + 1.2 @xtr4nge recon interface module_recon - 2.1 + 2.4 bdfproxy - 1.2 + 1.3 @xtr4nge bdfproxy interface module_bdfproxy - 2.1 + 2.4 nginx - 1.0 + 1.1 @xtr4nge nginx interface module_nginx - 2.1 + 2.4 mitmf @@ -250,7 +346,7 @@ sslstrip2 - 1.0 + 1.1 @xtr4nge sslstrip2 interface module_sslstrip2 @@ -258,11 +354,11 @@ fruityproxy - 1.2 + 1.5 @xtr4nge fruityproxy interface module_fruityproxy - 2.2 + 2.4 bluepand @@ -288,4 +384,36 @@ module_devicefinder 2.1 + + mgmt + 1.1 + @xtr4nge + mgmt interface + module_mgmt + 2.2 + + + tapper + 1.1 + @xtr4nge + tapper interface + module_tapper + 2.2 + + + openvpn + 1.0 + @xtr4nge + openvpn interface + module_openvpn + 2.2 + + + wifirecon + 1.0 + @xtr4nge + WiFiRecon interface + module_api + 2.3 + diff --git a/nginx-setup/FruityWifi b/nginx-setup/FruityWiFi similarity index 89% rename from nginx-setup/FruityWifi rename to nginx-setup/FruityWiFi index 0ae1d11..9e54f52 100644 --- a/nginx-setup/FruityWifi +++ b/nginx-setup/FruityWiFi @@ -9,7 +9,7 @@ server { location ~ \.php$ { try_files $uri =404; - fastcgi_pass unix:/var/run/php5-fpm-8000.sock; + fastcgi_pass unix:/var/run/fruitywifi-8000.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; @@ -35,7 +35,7 @@ server { location ~ \.php$ { try_files $uri =404; - fastcgi_pass unix:/var/run/php5-fpm-8443.sock; + fastcgi_pass unix:/var/run/fruitywifi-8443.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; diff --git a/nginx-setup/default b/nginx-setup/default deleted file mode 100644 index eafc58e..0000000 --- a/nginx-setup/default +++ /dev/null @@ -1,46 +0,0 @@ - -server { - listen 80 default_server; - - root /var/www; - index index.php index.html index.htm; - - #server_name localhost; - - location ~ \.php$ { - try_files $uri =404; - fastcgi_pass unix:/var/run/php5-fpm-80.sock; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include fastcgi_params; - } - - location / { - try_files $uri $uri/ =404; - } -} - -server { - - listen 443 ssl; - - root /var/www; - index index.php index.html index.htm; - - #server_name localhost; - - ssl_certificate /etc/nginx/ssl/nginx.crt; - ssl_certificate_key /etc/nginx/ssl/nginx.key; - - location ~ \.php$ { - try_files $uri =404; - fastcgi_pass unix:/var/run/php5-fpm-443.sock; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include fastcgi_params; - } - - location / { - try_files $uri $uri/ =404; - } -} diff --git a/nginx-setup/fpm/443.conf b/nginx-setup/fpm/443.conf index c497756..53e4a24 100644 --- a/nginx-setup/fpm/443.conf +++ b/nginx-setup/fpm/443.conf @@ -3,7 +3,8 @@ user = fruitywifi group = fruitywifi -listen = /var/run/php5-fpm-443.sock +;listen = /var/run/php/php7.3-fpm-443.sock +listen = /var/run/php/fruitywifi-443.sock listen.owner = fruitywifi listen.group = fruitywifi diff --git a/nginx-setup/fpm/80.conf b/nginx-setup/fpm/80.conf index 9697c6b..20cd9c3 100644 --- a/nginx-setup/fpm/80.conf +++ b/nginx-setup/fpm/80.conf @@ -3,7 +3,8 @@ user = fruitywifi group = fruitywifi -listen = /var/run/php5-fpm-80.sock +;listen = /var/run/php/php7.3-fpm-80.sock +listen = /var/run/php/fruitywifi-80.sock listen.owner = fruitywifi listen.group = fruitywifi diff --git a/nginx-setup/fpm/8000.conf b/nginx-setup/fpm/8000.conf index af410f4..ab1cee6 100644 --- a/nginx-setup/fpm/8000.conf +++ b/nginx-setup/fpm/8000.conf @@ -3,7 +3,9 @@ user = fruitywifi group = fruitywifi -listen = /var/run/php5-fpm-8000.sock +;listen = /var/run/php/php7-fpm-8000.sock +;listen = /var/run/php/fruitywifi-8000.sock +listen = /var/run/fruitywifi-8000.sock listen.owner = fruitywifi listen.group = fruitywifi diff --git a/nginx-setup/fpm/8443.conf b/nginx-setup/fpm/8443.conf index 3e7799a..55e423f 100644 --- a/nginx-setup/fpm/8443.conf +++ b/nginx-setup/fpm/8443.conf @@ -3,7 +3,9 @@ user = fruitywifi group = fruitywifi -listen = /var/run/php5-fpm-8443.sock +;listen = /var/run/php/php7-fpm-8443.sock +;listen = /var/run/php/fruitywifi-8443.sock +listen = /var/run/fruitywifi-8443.sock listen.owner = fruitywifi listen.group = fruitywifi diff --git a/nginx-setup/nginx.conf b/nginx-setup/nginx.conf index 438c7c0..c754b72 100644 --- a/nginx-setup/nginx.conf +++ b/nginx-setup/nginx.conf @@ -1,6 +1,8 @@ user fruitywifi; -worker_processes 4; +worker_processes auto; +#worker_processes 4; pid /var/run/nginx.pid; +include /etc/nginx/modules-enabled/*.conf; events { worker_connections 768; @@ -26,6 +28,13 @@ http { include /etc/nginx/mime.types; default_type application/octet-stream; + ## + # SSL Settings + ## + + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE + ssl_prefer_server_ciphers on; + ## # Logging Settings ## @@ -38,7 +47,7 @@ http { ## gzip on; - gzip_disable "msie6"; + #gzip_disable "msie6"; # gzip_vary on; # gzip_proxied any; diff --git a/sudo-setup/fruitywifi b/sudo-setup/fruitywifi index 1e3f87a..b5247fa 100644 --- a/sudo-setup/fruitywifi +++ b/sudo-setup/fruitywifi @@ -4,3 +4,5 @@ Defaults:fruitywifi logfile = /usr/share/fruitywifi/logs/sudo.log Defaults:fruitywifi log_year Defaults:fruitywifi log_host Defaults:fruitywifi syslog=auth +Defaults:fruitywifi umask_override +Defaults:fruitywifi umask=0022