Minor corrections to style & apt pkg-manager.
This commit is contained in:
parent
efe78f1c7e
commit
bfcb897f23
|
@ -346,10 +346,9 @@ function captive_portal_unset_attack() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function GetClientIP ()
|
function captive_portal_get_client_IP() {
|
||||||
{
|
if [ -f "$FLUXIONWorkspacePath/ip_hits" ]; then
|
||||||
if [ -f "/tmp/fluxspace/ip_hits" ];then
|
MatchedClientIP=$(cat "$FLUXIONWorkspacePath/ip_hits" | tail -n 1 | head -n 1)
|
||||||
MatchedClientIP=$(cat /tmp/fluxspace/ip_hits | tail -n 1 | head -n 1)
|
|
||||||
else
|
else
|
||||||
MatchedClientIP="unknown"
|
MatchedClientIP="unknown"
|
||||||
fi
|
fi
|
||||||
|
@ -357,9 +356,9 @@ function GetClientIP ()
|
||||||
echo $MatchedClientIP
|
echo $MatchedClientIP
|
||||||
}
|
}
|
||||||
|
|
||||||
function GetMacFromIP () {
|
function captive_portal_get_IP_MAC() {
|
||||||
if [ -f "/tmp/fluxspace/ip_hits" ] && [ $(GetClientIP) != "" ];then
|
if [ -f "$FLUXIONWorkspacePath/ip_hits" ] && [ $(captive_portal_get_client_IP) != "" ]; then
|
||||||
IP=$(GetClientIP)
|
IP=$(captive_portal_get_client_IP)
|
||||||
MatchedClientMAC=$(nmap -PR -sn -n $IP 2>&1 | grep -i mac | awk '{print $3}' | tr [:upper:] [:lower:])
|
MatchedClientMAC=$(nmap -PR -sn -n $IP 2>&1 | grep -i mac | awk '{print $3}' | tr [:upper:] [:lower:])
|
||||||
if [ "$(echo $MatchedClientMAC | wc -m)" != "18" ]; then
|
if [ "$(echo $MatchedClientMAC | wc -m)" != "18" ]; then
|
||||||
MatchedClientMAC="xx:xx:xx:xx:xx:xx"
|
MatchedClientMAC="xx:xx:xx:xx:xx:xx"
|
||||||
|
@ -370,19 +369,18 @@ function GetMacFromIP () {
|
||||||
echo $MatchedClientMAC
|
echo $MatchedClientMAC
|
||||||
}
|
}
|
||||||
|
|
||||||
function GetModelBrand ()
|
function captive_portal_get_MAC_brand() {
|
||||||
{
|
local MACManufacturer=""
|
||||||
if [ $(GetMacFromIP) != "" ];then
|
if [ $(captive_portal_get_IP_MAC) != "" ]; then
|
||||||
VICTIM_FABRICANTE=$(macchanger -l | grep "$(echo "$(GetMacFromIP)" | cut -d ":" -f -3)" | cut -d " " -f 5-)
|
MACManufacturer=$(macchanger -l | grep "$(echo "$(captive_portal_get_IP_MAC)" | cut -d ":" -f -3)" | cut -d " " -f 5-)
|
||||||
if echo \$MatchedClientMAC| grep -q x; then
|
if echo "$MACManufacturer" | grep -q x; then
|
||||||
VICTIM_FABRICANTE=\"unknown\"
|
MACManufacturer="unknown"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
VICTIM_FABRICANTE="unknown"
|
MACManufacturer="unknown"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $VICTIM_FABRICANTE
|
echo $MACManufacturer
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create different settings required for the script
|
# Create different settings required for the script
|
||||||
|
@ -725,21 +723,6 @@ sleep 3
|
||||||
|
|
||||||
signal_stop_attack
|
signal_stop_attack
|
||||||
|
|
||||||
|
|
||||||
# killall mdk3 &> $FLUXIONOutputDevice
|
|
||||||
# killall aireplay-ng &> $FLUXIONOutputDevice
|
|
||||||
# killall airbase-ng &> $FLUXIONOutputDevice
|
|
||||||
# kill \$(ps a | grep python | grep fluxion_captive_portal_dns.py | awk '{print \$1}') &> $FLUXIONOutputDevice
|
|
||||||
# killall hostapd &> $FLUXIONOutputDevice
|
|
||||||
# killall lighttpd &> $FLUXIONOutputDevice
|
|
||||||
# killall dhcpd &> $FLUXIONOutputDevice
|
|
||||||
|
|
||||||
# if [ \"$APRogueAuthMode\" = \"wpa_supplicant\" ]; then
|
|
||||||
# killall wpa_supplicant &> $FLUXIONOutputDevice
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# killall wpa_passphrase &> $FLUXIONOutputDevice
|
|
||||||
|
|
||||||
# Assure we've got a directory to store net logs into.
|
# Assure we've got a directory to store net logs into.
|
||||||
if [ ! -d \"$CaptivePortalNetLog\" ]; then
|
if [ ! -d \"$CaptivePortalNetLog\" ]; then
|
||||||
mkdir -p \"$CaptivePortalNetLog\"
|
mkdir -p \"$CaptivePortalNetLog\"
|
||||||
|
@ -754,8 +737,8 @@ Channel: $APTargetChannel
|
||||||
Security: $APTargetEncryption
|
Security: $APTargetEncryption
|
||||||
Time: \$ih\$h:\$im\$m:\$is\$s
|
Time: \$ih\$h:\$im\$m:\$is\$s
|
||||||
Password: \$(cat $FLUXIONWorkspacePath/candidate.txt)
|
Password: \$(cat $FLUXIONWorkspacePath/candidate.txt)
|
||||||
Mac: $(GetMacFromIP)
|
Mac: $(captive_portal_get_IP_MAC)
|
||||||
IP: $(GetClientIP)
|
IP: $(captive_portal_get_client_IP)
|
||||||
\" >\"$CaptivePortalNetLog/$APTargetSSID-$APTargetMAC.log\"" >> "$FLUXIONWorkspacePath/captive_portal_authenticator.sh"
|
\" >\"$CaptivePortalNetLog/$APTargetSSID-$APTargetMAC.log\"" >> "$FLUXIONWorkspacePath/captive_portal_authenticator.sh"
|
||||||
|
|
||||||
if [ $APRogueAuthMode = "hash" ]; then
|
if [ $APRogueAuthMode = "hash" ]; then
|
||||||
|
|
56
fluxion.sh
56
fluxion.sh
|
@ -269,43 +269,41 @@ fi
|
||||||
|
|
||||||
#################################### < Resolution > ####################################
|
#################################### < Resolution > ####################################
|
||||||
function fluxion_set_resolution() { # Windows + Resolution
|
function fluxion_set_resolution() { # Windows + Resolution
|
||||||
|
# Calc options
|
||||||
|
RATIO=4
|
||||||
|
|
||||||
# Calc options
|
# Get demensions
|
||||||
RATIO=4
|
SCREEN_SIZE=$(xdpyinfo | grep dimension | awk '{print $4}' | tr -d "(")
|
||||||
|
SCREEN_SIZE_X=$(printf '%.*f\n' 0 $(echo $SCREEN_SIZE | sed -e s'/x/ /'g | awk '{print $1}'))
|
||||||
|
SCREEN_SIZE_Y=$(printf '%.*f\n' 0 $(echo $SCREEN_SIZE | sed -e s'/x/ /'g | awk '{print $2}'))
|
||||||
|
|
||||||
# Get demensions
|
PROPOTION=$(echo $(awk "BEGIN {print $SCREEN_SIZE_X/$SCREEN_SIZE_Y}")/1 | bc)
|
||||||
SCREEN_SIZE=$(xdpyinfo | grep dimension | awk '{print $4}' | tr -d "(")
|
NEW_SCREEN_SIZE_X=$(echo $(awk "BEGIN {print $SCREEN_SIZE_X/$RATIO}")/1 | bc)
|
||||||
SCREEN_SIZE_X=$(printf '%.*f\n' 0 $(echo $SCREEN_SIZE | sed -e s'/x/ /'g | awk '{print $1}'))
|
NEW_SCREEN_SIZE_Y=$(echo $(awk "BEGIN {print $SCREEN_SIZE_Y/$RATIO}")/1 | bc)
|
||||||
SCREEN_SIZE_Y=$(printf '%.*f\n' 0 $(echo $SCREEN_SIZE | sed -e s'/x/ /'g | awk '{print $2}'))
|
|
||||||
|
|
||||||
PROPOTION=$(echo $(awk "BEGIN {print $SCREEN_SIZE_X/$SCREEN_SIZE_Y}")/1 | bc)
|
NEW_SCREEN_SIZE_BIG_X=$(echo $(awk "BEGIN {print 1.5*$SCREEN_SIZE_X/$RATIO}")/1 | bc)
|
||||||
NEW_SCREEN_SIZE_X=$(echo $(awk "BEGIN {print $SCREEN_SIZE_X/$RATIO}")/1 | bc)
|
NEW_SCREEN_SIZE_BIG_Y=$(echo $(awk "BEGIN {print 1.5*$SCREEN_SIZE_Y/$RATIO}")/1 | bc)
|
||||||
NEW_SCREEN_SIZE_Y=$(echo $(awk "BEGIN {print $SCREEN_SIZE_Y/$RATIO}")/1 | bc)
|
|
||||||
|
|
||||||
NEW_SCREEN_SIZE_BIG_X=$(echo $(awk "BEGIN {print 1.5*$SCREEN_SIZE_X/$RATIO}")/1 | bc)
|
SCREEN_SIZE_MID_X=$(echo $(($SCREEN_SIZE_X+($SCREEN_SIZE_X-2*$NEW_SCREEN_SIZE_X)/2)))
|
||||||
NEW_SCREEN_SIZE_BIG_Y=$(echo $(awk "BEGIN {print 1.5*$SCREEN_SIZE_Y/$RATIO}")/1 | bc)
|
SCREEN_SIZE_MID_Y=$(echo $(($SCREEN_SIZE_Y+($SCREEN_SIZE_Y-2*$NEW_SCREEN_SIZE_Y)/2)))
|
||||||
|
|
||||||
SCREEN_SIZE_MID_X=$(echo $(($SCREEN_SIZE_X+($SCREEN_SIZE_X-2*$NEW_SCREEN_SIZE_X)/2)))
|
# Upper
|
||||||
SCREEN_SIZE_MID_Y=$(echo $(($SCREEN_SIZE_Y+($SCREEN_SIZE_Y-2*$NEW_SCREEN_SIZE_Y)/2)))
|
TOPLEFT="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y+0+0"
|
||||||
|
TOPRIGHT="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y-0+0"
|
||||||
|
TOP="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y+$SCREEN_SIZE_MID_X+0"
|
||||||
|
|
||||||
# Upper
|
# Lower
|
||||||
TOPLEFT="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y+0+0"
|
BOTTOMLEFT="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y+0-0"
|
||||||
TOPRIGHT="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y-0+0"
|
BOTTOMRIGHT="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y-0-0"
|
||||||
TOP="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y+$SCREEN_SIZE_MID_X+0"
|
BOTTOM="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y+$SCREEN_SIZE_MID_X-0"
|
||||||
|
|
||||||
# Lower
|
# Y mid
|
||||||
BOTTOMLEFT="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y+0-0"
|
LEFT="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y+0-$SCREEN_SIZE_MID_Y"
|
||||||
BOTTOMRIGHT="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y-0-0"
|
RIGHT="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y-0+$SCREEN_SIZE_MID_Y"
|
||||||
BOTTOM="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y+$SCREEN_SIZE_MID_X-0"
|
|
||||||
|
|
||||||
# Y mid
|
|
||||||
LEFT="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y+0-$SCREEN_SIZE_MID_Y"
|
|
||||||
RIGHT="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y-0+$SCREEN_SIZE_MID_Y"
|
|
||||||
|
|
||||||
# Big
|
|
||||||
TOPLEFTBIG="-geometry $NEW_SCREEN_SIZE_BIG_Xx$NEW_SCREEN_SIZE_BIG_Y+0+0"
|
|
||||||
TOPRIGHTBIG="-geometry $NEW_SCREEN_SIZE_BIG_Xx$NEW_SCREEN_SIZE_BIG_Y-0+0"
|
|
||||||
|
|
||||||
|
# Big
|
||||||
|
TOPLEFTBIG="-geometry $NEW_SCREEN_SIZE_BIG_Xx$NEW_SCREEN_SIZE_BIG_Y+0+0"
|
||||||
|
TOPRIGHTBIG="-geometry $NEW_SCREEN_SIZE_BIG_Xx$NEW_SCREEN_SIZE_BIG_Y-0+0"
|
||||||
}
|
}
|
||||||
|
|
||||||
##################################### < Language > #####################################
|
##################################### < Language > #####################################
|
||||||
|
|
|
@ -15,9 +15,18 @@ if [ -f "/etc/debian_version" ]; then
|
||||||
|
|
||||||
function prep_package_manager() {
|
function prep_package_manager() {
|
||||||
if [ ! "`cat /etc/apt/sources.list | egrep 'deb http://http.kali.org/kali ((kali-rolling|main|contrib|non-free) )*'`" ]; then
|
if [ ! "`cat /etc/apt/sources.list | egrep 'deb http://http.kali.org/kali ((kali-rolling|main|contrib|non-free) )*'`" ]; then
|
||||||
echo "Doesn't have kali..."
|
echo "Adding missing sources to package manager, please wait."
|
||||||
gpg --keyserver hkp://keys.gnupg.net --recv-key 7D8D0BF6
|
|
||||||
apt-key adv --keyserver pgp.mit.edu --recv-keys ED444FF07D8D0BF6
|
echo "Adding keys.gnupg.net key, please wait."
|
||||||
|
if ! gpg --keyserver hkp://keys.gnupg.net --recv-key 7D8D0BF6 &> /dev/null; then
|
||||||
|
echo "ERROR: Failed to fetch or add the source key!"; return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Adding pgp.mit.edu key, please wait."
|
||||||
|
if ! apt-key adv --keyserver pgp.mit.edu --recv-keys ED444FF07D8D0BF60 &> /dev/null; then
|
||||||
|
echo "ERROR: Failed to fetch or add the source key!"; return 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "deb http://http.kali.org/kali kali-rolling main non-free contrib # Installed By FLUXION" >> /etc/apt/sources.list
|
echo "deb http://http.kali.org/kali kali-rolling main non-free contrib # Installed By FLUXION" >> /etc/apt/sources.list
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue