Minor code changes and tweaks

This commit is contained in:
William Todt 2018-01-25 21:29:04 +01:00
parent 488a850162
commit bb824a0934
23 changed files with 249 additions and 156 deletions

View File

@ -7,12 +7,12 @@ max_line_length=120
[*.sh]
indent_style = tab
indent_size = 2
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
[*.py]
indent_size=2
indent_size = 4
[*.md]
trim_trailing_whitespace = false

209
.gitignore vendored
View File

@ -1,38 +1,173 @@
# Custom files
*~
*.swp
*.swo
*.cap
*.log
*.conf
*.lock
*.save
*.backup
BullyOutput.txt
/preferences.sh*
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# Precompiled Headers
*.gch
*.pch
# KDE directory preferences
.directory
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Linux trash folder which might appear on any partition or disk
.Trash-*
# Fortran module files
*.mod
*.smod
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Cache files for Sublime Text
# Executables
*.exe
*.out
*.app
### Calabash ###
# Calabash / Cucumber
rerun/
reports/
screenshots/
screenshot*.png
test-servers/
# bundler
.bundle
vendor
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule.*
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
### SublimeText ###
# cache files for sublime text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
# Workspace files are user-specific
# workspace files are user-specific
*.sublime-workspace
# Project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using Sublime Text
# project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using SublimeText
# *.sublime-project
# SFTP configuration file
# sftp configuration file
sftp-config.json
# Package control specific files
@ -51,30 +186,22 @@ bh_unicode_properties.cache
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings
# General
*.DS_Store
.AppleDouble
.LSOverride
### Vim ###
# swap
.sw[a-p]
.*.sw[a-p]
# session
Session.vim
# temporary
.netrwhist
*~
# auto-generated tag files
tags
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history

3
.gitmodules vendored
View File

@ -1,4 +1,3 @@
[submodule "attacks/Captive Portal/sites"]
path = attacks/Captive Portal/sites
#url = git@github.com:FluxionNetwork/sites.git
url = https://github.com/FluxionNetwork/sites
url = https://github.com/FluxionNetwork/sites

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>fluxion</name>
<name>Fluxion</name>
<comment></comment>
<projects>
</projects>

View File

@ -3,13 +3,6 @@
# Fluxion is the future of MITM WPA attacks
Fluxion is a security auditing and social-engineering research tool. It is a remake of linset by vk496 with (hopefully) less bugs and more functionality. The script attempts to retrieve the WPA/WPA2 key from a target access point by means of a social engineering (phising) attack. It's compatible with the latest release of Kali (rolling). Fluxion's attacks' setup is mostly manual, but experimental auto-mode handles some of the attacks' setup parameters. Read the [FAQ](https://github.com/FluxionNetwork/fluxion/wiki/FAQ) before requesting issues.
## Router login page
Share your own router page with a simple script
```
cd scripts
sudo sh router.sh
```
## Installation
Read [here](https://github.com/FluxionNetwork/fluxion/wiki/Generate-ssh-keys) before you do the following steps.
<br>

View File

@ -14,7 +14,7 @@ declare -r FLUXIONPath=$(cd "$(dirname "$0")"; pwd -P)
declare -r FLUXIONWorkspacePath="/tmp/fluxspace"
# Path to FLUXION's preferences file, to be loaded afterward.
declare -r FLUXIONPreferencesFile="$FLUXIONPath/preferences.sh"
declare -r FLUXIONPreferencesFile="$FLUXIONPath/preferences.conf"
# Constants denoting the reference noise floor & ceiling levels.
# These are used by the the wireless network scanner visualizer.
@ -22,7 +22,7 @@ declare -r FLUXIONNoiseFloor=-90
declare -r FLUXIONNoiseCeiling=-60
declare -r FLUXIONVersion=4
declare -r FLUXIONRevision=0
declare -r FLUXIONRevision=1
# ============================================================ #
@ -1553,6 +1553,11 @@ fluxion_set_attack() {
if [ "${IOQueryFormatFields[1]}" = "$FLUXIONGeneralBackOption" ]; then
return -1
fi
if [ "${IOQueryFormatFields[1]}" = "$FluxionRestartOption" ]; then
return 2
fi
FluxionAttack=${IOQueryFormatFields[0]}
}

View File

@ -35,6 +35,7 @@ FLUXIONAbsolutePathInfo="Absolute path"
FLUXIONScannerChannelQuery="Vyberte kanál"
FLUXIONScannerChannelOptionAll="Všechny kanály"
FLUXIONScannerChannelOptionSpecific="Specifický kanál(y)"
FluxionRestartOption="Restart"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONScannerChannelSingleTip="Jeden kanál"
FLUXIONScannerChannelMiltipleTip="Více kanálů"

View File

@ -35,6 +35,7 @@ FLUXIONAbsolutePathInfo="Geben sie den absoluten Pfad ein"
FLUXIONScannerChannelQuery="Wähle deinen Netzwerkfrequenz aus"
FLUXIONScannerChannelOptionAll="Alle Netzwerkfrequenzen"
FLUXIONScannerChannelOptionSpecific="Spezifische Frequenz(en)"
FluxionRestartOption="Restart"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONScannerChannelSingleTip="Einzelne Frequenz"
FLUXIONScannerChannelMiltipleTip="Mehrere Frequenzen"

View File

@ -35,6 +35,7 @@ FLUXIONAbsolutePathInfo="Εισαγετε διαδρομή αρχειου"
FLUXIONScannerChannelQuery="Επίλεξτε κανάλι"
FLUXIONScannerChannelOptionAll="Όλα τα κανάλια"
FLUXIONScannerChannelOptionSpecific="Συγκεκριμένο(α) κανάλι(α)"
FluxionRestartOption="Restart"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONScannerChannelSingleTip="Ενα κανάλι"
FLUXIONScannerChannelMiltipleTip="Πολλαπλά κανάλια"

View File

@ -71,6 +71,7 @@ FLUXIONHashVerificationMethodAircrackOption="aircrack-ng verification (${CYel}un
FLUXIONAttackQuery="Select a wireless attack for the access point"
FLUXIONAttackInProgressNotice="${CCyn}\$FluxionAttack$CClr attack in progress..."
FLUXIONSelectAnotherAttackOption="Select another attack"
FluxionRestartOption="Restart"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONGeneralSkipOption="${CYel}Skip"
FLUXIONGeneralBackOption="${CRed}Back"

View File

@ -44,6 +44,7 @@ FLUXIONScannerHeader="FLUXION Escáner"
FLUXIONAPServiceQuery="Seleccione Opción de Ataque"
FLUXIONAPServiceHostapdOption="Rogue AP - hostapd (${CGrn}recomendado$CClr)"
FLUXIONAPServiceAirbaseOption="Rogue AP - airbase-ng (${CYel}Conexión más lenta$CClr)"
FluxionRestartOption="Restart"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONHashSourceQuery="Select a method to retrieve the handshake"
FLUXIONHashSourcePathOption="Path to capture file"

View File

@ -44,6 +44,7 @@ FLUXIONScannerHeader="Scanner FLUXION"
FLUXIONAPServiceQuery="Sélectionnez une option d'attaque"
FLUXIONAPServiceHostapdOption="Rogue AP - hostapd (${CGrn}recommandé$CClr)"
FLUXIONAPServiceAirbaseOption="Rogue AP - airbase-ng (${CYel}Connexion plus lente$CClr)"
FluxionRestartOption="Restart"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONHashSourceQuery="Sélectionnez une méthode de récupération de handshake"
FLUXIONHashSourcePathOption="Chemin du fichier capturé"

View File

@ -53,6 +53,7 @@ FLUXIONUseFoundHashQuery="Vuoi usare questo file?"
FLUXIONHashVerificationMethodQuery="Seleziona il metodo di verifica dell'hash"
FLUXIONHashVerificationMethodPyritOption="pyrit verification (${CGrn}raccomandato$CClr)"
FLUXIONHashVerificationMethodAircrackOption="aircrack-ng verification (${CYel}inaffidabile$CClr)"
FluxionRestartOption="Restart"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONAttackQuery="Seleziona la tua scelta"
FLUXIONAttackInProgressNotice="${CCyn}\$FLUXIONAttack$CClr attacco in corso..."

View File

@ -31,6 +31,7 @@ FLUXIONHashInvalidError="${CRed}Error$CClr, invalid hash file!"
FLUXIONHashValidNotice="${CGrn}Success$CClr, hash verification completed!"
FLUXIONPathToHandshakeFileQuery="Podaj ścieżkę dostępu do pliku handshake $CClr(Example: /.../dump-01.cap)"
FLUXIONAbsolutePathInfo="Absolute path"
FluxionRestartOption="Restart"s
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONScannerChannelQuery="Wybierz kanał do monitorowania"
FLUXIONScannerChannelOptionAll="Wszystkie kanały"

View File

@ -25,6 +25,7 @@ FLUXIONStartingScannerTip="Five seconds after the target AP appears, close the F
FLUXIONPreparingScannerResultsNotice="Sintetizando os resultados da varredura, aguarde..."
FLUXIONScannerFailedNotice="Wireless card não suportado (sem APs encontrados)"
FLUXIONScannerDetectedNothingNotice="Sem APs encontrados, retornando..."
FluxionRestartOption="Restart"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONHashFileDoesNotExistError="Arquivo hash não existe!"
FLUXIONHashInvalidError="${CRed}Error$CClr, arquivo hash inválido!"

View File

@ -25,6 +25,7 @@ FLUXIONStartingScannerTip="Five seconds after the target AP appears, close the F
FLUXIONPreparingScannerResultsNotice="Synthesizing scan results, please wait..."
FLUXIONScannerFailedNotice="Wireless card may not be supported (no APs found)"
FLUXIONScannerDetectedNothingNotice="No access points were detected, returning..."
FluxionRestartOption="Restart"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONHashFileDoesNotExistError="Hash file does not exist!"
FLUXIONHashInvalidError="${CRed}Error$CClr, invalid hash file!"

View File

@ -25,6 +25,7 @@ FLUXIONStartingScannerTip="Päť sekúnd po objavení sa cieľového AP, zavrite
FLUXIONPreparingScannerResultsNotice="Výsledky scanu sa pripravujú, čakajte..."
FLUXIONScannerFailedNotice="Bezdrôtová sieťová karta nemusí byť podporovaná (nenašli sa žiadne AP)"
FLUXIONScannerDetectedNothingNotice="Žiadne prístupové body neboli najdené, vraciam sa..."
FluxionRestartOption="Restart"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONHashFileDoesNotExistError="Súbor 'hash' neexistuje!"
FLUXIONHashInvalidError="${CRed}Error$CClr, nesprávny 'hash' súbor!"

View File

@ -25,6 +25,7 @@ FLUXIONStartingScannerTip="Five seconds after the target AP appears, close the F
FLUXIONPreparingScannerResultsNotice="Synthesizing scan results, please wait..."
FLUXIONScannerFailedNotice="Wireless card may not be supported (no APs found)"
FLUXIONScannerDetectedNothingNotice="No access points were detected, returning..."
FluxionRestartOption="Restart"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONHashFileDoesNotExistError="Hash file does not exist!"
FLUXIONHashInvalidError="${CRed}Error$CClr, invalid hash file!"

View File

@ -25,6 +25,7 @@ FLUXIONStartingScannerTip="Five seconds after the target AP appears, close the F
FLUXIONPreparingScannerResultsNotice="Synthesizing scan results, please wait..."
FLUXIONScannerFailedNotice="Wireless card may not be supported (no APs found)"
FLUXIONScannerDetectedNothingNotice="No access points were detected, returning..."
FluxionRestartOption="Restart"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONHashFileDoesNotExistError="Hash file does not exist!"
FLUXIONHashInvalidError="${CRed}Error$CClr, invalid hash file!"

View File

@ -25,6 +25,7 @@ FLUXIONStartingScannerTip="Five seconds after the target AP appears, close the F
FLUXIONPreparingScannerResultsNotice="综合扫描的结果获取中,请稍等..."
FLUXIONScannerFailedNotice="你的无线网卡好像不支持 (没有发现APs)"
FLUXIONScannerDetectedNothingNotice="没有发现访问点, 请返回重试..."
FluxionRestartOption="Restart"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONHashFileDoesNotExistError="Hash文件不存在!"
FLUXIONHashInvalidError="${CRed}错误$CClr, 无效的Hash文件!"

View File

@ -1,4 +1,6 @@
#!/ bin / bash
export FLUXIONDebug = 1 export FLUXIONWIKillProcesses =
1 export FLUXIONWIReloadDriver = 1
# These are the debug flags used by the script
export FLUXIONDebug=1
export FLUXIONWIKillProcesses=1
export FLUXIONWIReloadDriver=1

View File

@ -1,66 +1,89 @@
#!/bin/bash
if [ -d "lib" ]; then source lib/InterfaceUtils.sh
elif [ -d "../lib" ]; then source ../lib/InterfaceUtils.sh
clear
declare -r HEADER_SIZE="####"
# Diagnostic script
if [ -d "lib" ];then
source lib/InterfaceUtils.sh
elif [ -d "../lib" ];then
source ../lib/InterfaceUtils.sh
else
echo "YOU MUST EXECUTE THIS SCRIPT FROM FLUXION'S ROOT!"
echo -e "\033[31mError lib folder not found\033[0m"
exit 1
fi
if [ ! "$1" ]; then
echo "Usage ./scripts/diagnostics <wireless_interface>"
echo "Usage ./scripts/diagnostics [wireless_interface]"
exit 1
fi
echo "[ FLUXION Info ]"
if [ -f "./fluxion.sh" ]
then declare -r FLUXIONInfo=($(grep -oE "FLUXION(Version|Revision)=[0-9]+" fluxion.sh))
else declare -r FLUXIONInfo=($(grep -oE "FLUXION(Version|Revision)=[0-9]+" ../fluxion.sh))
echo "$HEADER_SIZE FLUXION Info"
if [ -f "fluxion" ];then
declare -r FLUXIONInfo=($(grep -oE "FLUXION(Version|Revision)=[0-9]+" fluxion))
else
declare -r FLUXIONInfo=($(grep -oE "FLUXION(Version|Revision)=[0-9]+" ../fluxion))
fi
echo "FLUXION V${FLUXIONInfo[0]/*=/}.${FLUXIONInfo[1]/*=/}"
echo -ne "\n\n"
echo "[ BASH Info ]"
echo "$HEADER_SIZE BASH Info "
bash --version
echo "Path: $(ls -L $(which bash))"
echo "**Path:** $(ls -L $(which bash))"
echo -ne "\n\n"
echo "[ Interface ($1) Info ]"
if interface_physical "$1"; then echo "Device: $InterfacePhysical"
else echo "Device: Unknown"
echo "$HEADER_SIZE Interface ($1) Info "
if interface_physical "$1";then
echo "**Device**: $InterfacePhysical"
else
echo "**Device:** Unknown"
fi
if interface_driver "$1"; then echo "Driver: $InterfaceDriver"
else echo "Driver: Unsupported"
if interface_driver "$1";then
echo "**Driver:** $InterfaceDriver"
else
echo "**Driver:** Unsupported"
fi
if interface_chipset "$1"; then echo "Chipset: $InterfaceChipset"
else echo "Chipset: Unknown"
if interface_chipset "$1";then
echo "**Chipset:** $InterfaceChipset"
else
echo "**Chipset:** Unknown"
fi
echo -n "Injection Test: "
aireplay-ng --test "$1" | grep -oE "Injection is working!|No Answer..." || echo "failed"
if iw list | grep monitor | head -n 1 | tail -n 1 &>/dev/null;then
echo "**Master Modes** Yes"
else
echo "**Master Modes** No"
fi
echo -n "**Injection Test:** "
aireplay-ng --test "$1" | grep -oE "Injection is working!|No Answer..." || echo -e "\033[31mFailed\033[0m"
echo -ne "\n\n"
echo "[ XTerm Info ]"
echo "Version: $(xterm -version)"
echo "Path: $(ls -L $(which xterm))"
echo "$HEADER_SIZE XTerm Infos"
echo "**Version:** $(xterm -version)"
echo "**Path:** $(ls -L $(which xterm))"
echo -n "Test: "
if xterm -hold -fg "#FFFFFF" -bg "#000000" -title "XServer/XTerm Test" -e "echo \"XServer/XTerm test: close window to continue...\"" &>/dev/null; then echo "XServer/XTerm success!"
else echo "XServer/XTerm failure!"
else
echo -e "\033[31m XServer/XTerm failure!\033[0m"
fi
echo -ne "\n\n"
echo "[ HostAPD Info ]"
echo "$HEADER_SIZE HostAPD Info"
hostapd -v
echo "Path: $(ls -L $(which hostapd))"
echo -ne "\n\n"
echo "[ Aircrack-ng Info ]"
echo "$HEADER_SIZE Aircrack-ng Info"
aircrack-ng -H | head -n 4
echo -ne "\n\n"
echo -ne "\n"
echo "[ System Info ]"
if [ -r "/proc/version" ]; then cat /proc/version
else uname -r
echo "$HEADER_SIZE System Info"
if [ -r "/proc/version" ]; then
echo "**Chipset:** $(cat /proc/version)"
else
echo "**Chipset:** $(uname -r)"
fi

View File

@ -1,70 +0,0 @@
#!/bin/bash
##################################### < CONFIGURATION > #####################################
gateway=$(ip route | grep default | awk '{print $3}')
#Colors
white="\033[1;37m"
red="\033[1;31m"
blue="\033[1;34m"
transparent="\e[0m"
#############################################################################################
clear
echo -e "$red[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]"
echo -e "$red Prepare router page."
echo -e "$blue[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]""$transparent"
echo "[i] Prepare dep."
# Check which package manager is installed
echo "Package Manager"
if hash pacman 2>/dev/null; then
PACK="pacman -S"
else
if hash apt-get 2>/dev/null; then
PACK="apt-get install"
else
if hash yum 2>/dev/null; then
PACK="yum install"
fi
fi
fi
sleep 0.025
echo "================================================================================="
echo -ne "Httrack........."
if ! hash httrack 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
$PACK httrack
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo "================================================================================="
echo -ne "cutycapt........"
if ! hash httrack 2>/dev/null; then
echo -e "\e[1;31mNot installed"$transparent""
$PACK cutycapt
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
echo "================================================================================="
if [ ! -d sites ]; then
mkdir sites
fi
#############################################################################################
echo "[i] Download preview picture"
cutycapt --url=http://$gateway --out=sites/$(date | awk '{print $4}').png
echo "================================================================================="
cd sites
echo "[i] Download router site"
httrack $gateway
echo "================================================================================="
echo "[I] DONE"