Add build option for arch linux
This commit is contained in:
parent
b8e948039d
commit
46a8114a3b
|
@ -1055,10 +1055,9 @@ captive_portal_generic() {
|
||||||
}
|
}
|
||||||
|
|
||||||
captive_portal_unset_routes() {
|
captive_portal_unset_routes() {
|
||||||
if [ -f "$FLUXIONWorkspacePath/iptables-rules" ]; then
|
if [ -f "$FLUXIONIPTablesBackup" ]; then
|
||||||
iptables-restore <"$FLUXIONWorkspacePath/iptables-rules" \
|
iptables-restore <"$FLUXIONIPTablesBackup" \
|
||||||
&> $FLUXIONOutputDevice
|
&> $FLUXIONOutputDevice
|
||||||
sandbox_remove_workfile "$FLUXIONWorkspacePath/iptables-rules"
|
|
||||||
else
|
else
|
||||||
iptables --flush
|
iptables --flush
|
||||||
iptables --table nat --flush
|
iptables --table nat --flush
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
# Maintainer: Cyberfee <deltax.fluxion@gmail.com>
|
||||||
|
|
||||||
|
_pkgname=fluxion
|
||||||
|
pkgname=$_pkgname-git
|
||||||
|
pkgver=r1183.63b821f
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='Fluxion is a security auditing and social-engineering research tool'
|
||||||
|
url='https://github.com/FluxionNetwork/fluxion'
|
||||||
|
license=('GPL3')
|
||||||
|
source=('git://github.com/FluxionNetwork/fluxion.git#branch=master')
|
||||||
|
|
||||||
|
depends=(
|
||||||
|
'aircrack-ng' 'bash>=4.2' 'coreutils'
|
||||||
|
'awk' 'iw' 'unzip'
|
||||||
|
'curl' 'bc' 'xterm'
|
||||||
|
)
|
||||||
|
|
||||||
|
makedepends=('binutils' 'coreutils' 'git')
|
||||||
|
conflicts=('fluxion-git')
|
||||||
|
provides=('fluxion-git')
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
arch=('any')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
if [ -d "$srcdir/$pkgname" ]; then
|
||||||
|
rm -rf "$srcdir/$pkgname"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$srcdir/$pkgname"
|
||||||
|
cd "$srcdir/$pkgname"
|
||||||
|
}
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd "$srcdir/$_pkgname"
|
||||||
|
|
||||||
|
( set -o pipefail
|
||||||
|
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
|
||||||
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "$srcdir/$_pkgname"
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$srcdir/$_pkgname"
|
||||||
|
|
||||||
|
mkdir -p "$pkgdir/usr/bin"
|
||||||
|
mkdir -p "$pkgdir/usr/share/fluxion"
|
||||||
|
|
||||||
|
install -Dm644 -t "$pkgdir/usr/share/doc/fluxion/" README.md
|
||||||
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/airgeddon/LICENSE"
|
||||||
|
|
||||||
|
rm -rf *.md .git* *.yml .project .editorconfig
|
||||||
|
|
||||||
|
cp -a --no-preserve=ownership * "$pkgdir/usr/share/fluxion"
|
||||||
|
|
||||||
|
cat > "$pkgdir/usr/bin/fluxion" << EOF
|
||||||
|
#!/bin/sh
|
||||||
|
cd /usr/share/fluxion
|
||||||
|
exec bash fluxion.sh "\${@}"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod a+x "$pkgdir/usr/bin/fluxion"
|
||||||
|
}
|
25
fluxion
25
fluxion
|
@ -12,6 +12,7 @@ readonly FLUXIONPath=$(cd "$(dirname "$0")"; pwd -P)
|
||||||
|
|
||||||
# Path to the temp. directory available to FLUXION & subscripts.
|
# Path to the temp. directory available to FLUXION & subscripts.
|
||||||
readonly FLUXIONWorkspacePath="/tmp/fluxspace"
|
readonly FLUXIONWorkspacePath="/tmp/fluxspace"
|
||||||
|
readonly FLUXIONIPTablesBackup="$FLUXIONPath/iptables-rules"
|
||||||
|
|
||||||
# Path to FLUXION's preferences file, to be loaded afterward.
|
# Path to FLUXION's preferences file, to be loaded afterward.
|
||||||
readonly FLUXIONLanguagePreferencesFile="$FLUXIONPath/preferences/LanguagePreference.conf"
|
readonly FLUXIONLanguagePreferencesFile="$FLUXIONPath/preferences/LanguagePreference.conf"
|
||||||
|
@ -22,15 +23,11 @@ readonly FLUXIONNoiseFloor=-90
|
||||||
readonly FLUXIONNoiseCeiling=-60
|
readonly FLUXIONNoiseCeiling=-60
|
||||||
|
|
||||||
readonly FLUXIONVersion=4
|
readonly FLUXIONVersion=4
|
||||||
readonly FLUXIONRevision=2
|
readonly FLUXIONRevision=3
|
||||||
|
|
||||||
# Declare window ration bigger = smaller windows
|
# Declare window ration bigger = smaller windows
|
||||||
FLUXIONWindowRatio=4
|
FLUXIONWindowRatio=4
|
||||||
|
|
||||||
# Print help if it is true
|
|
||||||
FluxionHelpTrue=false
|
|
||||||
|
|
||||||
|
|
||||||
# ============================================================ #
|
# ============================================================ #
|
||||||
# ================= < Script Sanity Checks > ================= #
|
# ================= < Script Sanity Checks > ================= #
|
||||||
# ============================================================ #
|
# ============================================================ #
|
||||||
|
@ -102,8 +99,7 @@ readonly FLUXIONCLIArguments=${FLUXIONCLIArguments%%--*}
|
||||||
# ============= < Argument Loaded Configurables > ============ #
|
# ============= < Argument Loaded Configurables > ============ #
|
||||||
eval set -- "$FLUXIONCLIArguments" # Set environment parameters.
|
eval set -- "$FLUXIONCLIArguments" # Set environment parameters.
|
||||||
|
|
||||||
#[ "$1" != "" ] && readonly FLUXIONAuto=1 # Auto-mode if using CLI.
|
[ "$1" != "" ] && readonly FLUXIONAuto=1 # Auto-mode if using CLI.
|
||||||
|
|
||||||
while [ "$1" != "" -a "$1" != "--" ]; do
|
while [ "$1" != "" -a "$1" != "--" ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-v|--version) echo "FLUXION V$FLUXIONVersion.$FLUXIONRevision"; exit;;
|
-v|--version) echo "FLUXION V$FLUXIONVersion.$FLUXIONRevision"; exit;;
|
||||||
|
@ -211,7 +207,7 @@ fluxion_startup() {
|
||||||
if [ "$FLUXIONDebug" ]; then return 1; fi
|
if [ "$FLUXIONDebug" ]; then return 1; fi
|
||||||
|
|
||||||
# Make sure that we save the iptable files
|
# Make sure that we save the iptable files
|
||||||
iptables-save >"$FLUXIONWorkspacePath/iptables-rules"
|
iptables-save >"$FLUXIONIPTablesBackup"
|
||||||
local banner=()
|
local banner=()
|
||||||
|
|
||||||
format_center_literals \
|
format_center_literals \
|
||||||
|
@ -339,6 +335,17 @@ fluxion_shutdown() {
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo -e "$CWht[$CRed-$CWht] $FLUXIONDisablingCleaningIPTablesNotice$CClr"
|
||||||
|
if [ -f "$FLUXIONIPTablesBackup" ]; then
|
||||||
|
iptables-restore <"$FLUXIONIPTablesBackup" \
|
||||||
|
&> $FLUXIONOutputDevice
|
||||||
|
else
|
||||||
|
iptables --flush
|
||||||
|
iptables --table nat --flush
|
||||||
|
iptables --delete-chain
|
||||||
|
iptables --table nat --delete-chain
|
||||||
|
fi
|
||||||
|
|
||||||
echo -e "$CWht[$CRed-$CWht] $FLUXIONRestoringTputNotice$CClr"
|
echo -e "$CWht[$CRed-$CWht] $FLUXIONRestoringTputNotice$CClr"
|
||||||
tput cnorm
|
tput cnorm
|
||||||
|
|
||||||
|
@ -352,9 +359,11 @@ fluxion_shutdown() {
|
||||||
|
|
||||||
# TODO: Add support for other network managers (wpa_supplicant?).
|
# TODO: Add support for other network managers (wpa_supplicant?).
|
||||||
if [ $(which systemctl) ]; then
|
if [ $(which systemctl) ]; then
|
||||||
|
if [ $(which service) ];then
|
||||||
service network-manager restart &> $FLUXIONOutputDevice &
|
service network-manager restart &> $FLUXIONOutputDevice &
|
||||||
service networkmanager restart &> $FLUXIONOutputDevice &
|
service networkmanager restart &> $FLUXIONOutputDevice &
|
||||||
service networking restart &> $FLUXIONOutputDevice &
|
service networking restart &> $FLUXIONOutputDevice &
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
systemctl restart network-manager.service &> $FLUXIONOutputDevice &
|
systemctl restart network-manager.service &> $FLUXIONOutputDevice &
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue