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
|
||||
}
|
||||
|
||||
function GetClientIP ()
|
||||
{
|
||||
if [ -f "/tmp/fluxspace/ip_hits" ];then
|
||||
MatchedClientIP=$(cat /tmp/fluxspace/ip_hits | tail -n 1 | head -n 1)
|
||||
function captive_portal_get_client_IP() {
|
||||
if [ -f "$FLUXIONWorkspacePath/ip_hits" ]; then
|
||||
MatchedClientIP=$(cat "$FLUXIONWorkspacePath/ip_hits" | tail -n 1 | head -n 1)
|
||||
else
|
||||
MatchedClientIP="unknown"
|
||||
fi
|
||||
|
@ -357,9 +356,9 @@ function GetClientIP ()
|
|||
echo $MatchedClientIP
|
||||
}
|
||||
|
||||
function GetMacFromIP () {
|
||||
if [ -f "/tmp/fluxspace/ip_hits" ] && [ $(GetClientIP) != "" ];then
|
||||
IP=$(GetClientIP)
|
||||
function captive_portal_get_IP_MAC() {
|
||||
if [ -f "$FLUXIONWorkspacePath/ip_hits" ] && [ $(captive_portal_get_client_IP) != "" ]; then
|
||||
IP=$(captive_portal_get_client_IP)
|
||||
MatchedClientMAC=$(nmap -PR -sn -n $IP 2>&1 | grep -i mac | awk '{print $3}' | tr [:upper:] [:lower:])
|
||||
if [ "$(echo $MatchedClientMAC | wc -m)" != "18" ]; then
|
||||
MatchedClientMAC="xx:xx:xx:xx:xx:xx"
|
||||
|
@ -370,19 +369,18 @@ function GetMacFromIP () {
|
|||
echo $MatchedClientMAC
|
||||
}
|
||||
|
||||
function GetModelBrand ()
|
||||
{
|
||||
if [ $(GetMacFromIP) != "" ];then
|
||||
VICTIM_FABRICANTE=$(macchanger -l | grep "$(echo "$(GetMacFromIP)" | cut -d ":" -f -3)" | cut -d " " -f 5-)
|
||||
if echo \$MatchedClientMAC| grep -q x; then
|
||||
VICTIM_FABRICANTE=\"unknown\"
|
||||
function captive_portal_get_MAC_brand() {
|
||||
local MACManufacturer=""
|
||||
if [ $(captive_portal_get_IP_MAC) != "" ]; then
|
||||
MACManufacturer=$(macchanger -l | grep "$(echo "$(captive_portal_get_IP_MAC)" | cut -d ":" -f -3)" | cut -d " " -f 5-)
|
||||
if echo "$MACManufacturer" | grep -q x; then
|
||||
MACManufacturer="unknown"
|
||||
fi
|
||||
else
|
||||
VICTIM_FABRICANTE="unknown"
|
||||
MACManufacturer="unknown"
|
||||
fi
|
||||
|
||||
echo $VICTIM_FABRICANTE
|
||||
|
||||
echo $MACManufacturer
|
||||
}
|
||||
|
||||
# Create different settings required for the script
|
||||
|
@ -725,21 +723,6 @@ sleep 3
|
|||
|
||||
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.
|
||||
if [ ! -d \"$CaptivePortalNetLog\" ]; then
|
||||
mkdir -p \"$CaptivePortalNetLog\"
|
||||
|
@ -754,8 +737,8 @@ Channel: $APTargetChannel
|
|||
Security: $APTargetEncryption
|
||||
Time: \$ih\$h:\$im\$m:\$is\$s
|
||||
Password: \$(cat $FLUXIONWorkspacePath/candidate.txt)
|
||||
Mac: $(GetMacFromIP)
|
||||
IP: $(GetClientIP)
|
||||
Mac: $(captive_portal_get_IP_MAC)
|
||||
IP: $(captive_portal_get_client_IP)
|
||||
\" >\"$CaptivePortalNetLog/$APTargetSSID-$APTargetMAC.log\"" >> "$FLUXIONWorkspacePath/captive_portal_authenticator.sh"
|
||||
|
||||
if [ $APRogueAuthMode = "hash" ]; then
|
||||
|
|
56
fluxion.sh
56
fluxion.sh
|
@ -269,43 +269,41 @@ fi
|
|||
|
||||
#################################### < Resolution > ####################################
|
||||
function fluxion_set_resolution() { # Windows + Resolution
|
||||
# Calc options
|
||||
RATIO=4
|
||||
|
||||
# Calc options
|
||||
RATIO=4
|
||||
# Get demensions
|
||||
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
|
||||
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}'))
|
||||
PROPOTION=$(echo $(awk "BEGIN {print $SCREEN_SIZE_X/$SCREEN_SIZE_Y}")/1 | bc)
|
||||
NEW_SCREEN_SIZE_X=$(echo $(awk "BEGIN {print $SCREEN_SIZE_X/$RATIO}")/1 | bc)
|
||||
NEW_SCREEN_SIZE_Y=$(echo $(awk "BEGIN {print $SCREEN_SIZE_Y/$RATIO}")/1 | bc)
|
||||
|
||||
PROPOTION=$(echo $(awk "BEGIN {print $SCREEN_SIZE_X/$SCREEN_SIZE_Y}")/1 | bc)
|
||||
NEW_SCREEN_SIZE_X=$(echo $(awk "BEGIN {print $SCREEN_SIZE_X/$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)
|
||||
NEW_SCREEN_SIZE_BIG_Y=$(echo $(awk "BEGIN {print 1.5*$SCREEN_SIZE_Y/$RATIO}")/1 | bc)
|
||||
|
||||
NEW_SCREEN_SIZE_BIG_X=$(echo $(awk "BEGIN {print 1.5*$SCREEN_SIZE_X/$RATIO}")/1 | bc)
|
||||
NEW_SCREEN_SIZE_BIG_Y=$(echo $(awk "BEGIN {print 1.5*$SCREEN_SIZE_Y/$RATIO}")/1 | bc)
|
||||
SCREEN_SIZE_MID_X=$(echo $(($SCREEN_SIZE_X+($SCREEN_SIZE_X-2*$NEW_SCREEN_SIZE_X)/2)))
|
||||
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)))
|
||||
SCREEN_SIZE_MID_Y=$(echo $(($SCREEN_SIZE_Y+($SCREEN_SIZE_Y-2*$NEW_SCREEN_SIZE_Y)/2)))
|
||||
# Upper
|
||||
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
|
||||
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"
|
||||
# Lower
|
||||
BOTTOMLEFT="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y+0-0"
|
||||
BOTTOMRIGHT="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y-0-0"
|
||||
BOTTOM="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y+$SCREEN_SIZE_MID_X-0"
|
||||
|
||||
# Lower
|
||||
BOTTOMLEFT="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y+0-0"
|
||||
BOTTOMRIGHT="-geometry $NEW_SCREEN_SIZE_Xx$NEW_SCREEN_SIZE_Y-0-0"
|
||||
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"
|
||||
# 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"
|
||||
}
|
||||
|
||||
##################################### < Language > #####################################
|
||||
|
|
|
@ -15,9 +15,18 @@ if [ -f "/etc/debian_version" ]; then
|
|||
|
||||
function prep_package_manager() {
|
||||
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..."
|
||||
gpg --keyserver hkp://keys.gnupg.net --recv-key 7D8D0BF6
|
||||
apt-key adv --keyserver pgp.mit.edu --recv-keys ED444FF07D8D0BF6
|
||||
echo "Adding missing sources to package manager, please wait."
|
||||
|
||||
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
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue