Skip to content

Commit

Permalink
Fixed bug of intermitent failed starting lighttpd. Fixed bug ET capti…
Browse files Browse the repository at this point in the history
…ve portal with captured password and repeating network without closing script.
  • Loading branch information
v1s1t0r1sh3r3 committed Oct 11, 2016
1 parent ef26d85 commit f629a10
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions airgeddon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4694,8 +4694,13 @@ function check_bssid_in_captured_file() {

echo
if [ "$nets_from_file" = "" ]; then
language_strings ${language} 216 "yellow"
language_strings ${language} 115 "read"
if [ ! -f "$1" ]; then
language_strings ${language} 161 "yellow"
language_strings ${language} 115 "read"
else
language_strings ${language} 216 "yellow"
language_strings ${language} 115 "read"
fi
return 1
fi

Expand Down Expand Up @@ -5209,6 +5214,7 @@ function exec_et_onlyap_attack() {

kill_et_windows
restore_et_interface
clean_tmpfiles
}

function exec_et_sniffing_attack() {
Expand All @@ -5232,6 +5238,7 @@ function exec_et_sniffing_attack() {
if [ ${ettercap_log} -eq 1 ]; then
parse_ettercap_log
fi
clean_tmpfiles
}

function exec_et_sniffing_sslstrip_attack() {
Expand All @@ -5256,6 +5263,7 @@ function exec_et_sniffing_sslstrip_attack() {
if [ ${ettercap_log} -eq 1 ]; then
parse_ettercap_log
fi
clean_tmpfiles
}

function exec_et_captive_portal_attack() {
Expand All @@ -5279,6 +5287,7 @@ function exec_et_captive_portal_attack() {

kill_et_windows
restore_et_interface
clean_tmpfiles
}

function set_hostapd_config() {
Expand Down Expand Up @@ -5496,7 +5505,7 @@ function set_control_script() {
cat >&7 <<-'EOF'
function kill_et_windows() {
et_processes_to_kill=$(cat "$path_to_processes")
et_processes_to_kill=$(cat "$path_to_processes" 2> /dev/null)
for item in ${et_processes_to_kill[@]}; do
kill ${item} &> /dev/null
done
Expand Down Expand Up @@ -5790,7 +5799,6 @@ function set_captive_portal_page() {
echo -e "}\n" >> "$tmpdir$webdir$jsfile"

echo -e "#!/bin/bash" > "$tmpdir$webdir$indexfile"
echo -e 'Content-type: text/html\n' >> "$tmpdir$webdir$indexfile"
echo -e "echo '<!DOCTYPE html>'" >> "$tmpdir$webdir$indexfile"
echo -e "echo '<html>'" >> "$tmpdir$webdir$indexfile"
echo -e "echo -e '\t<head>'" >> "$tmpdir$webdir$indexfile"
Expand Down Expand Up @@ -5822,7 +5830,6 @@ function set_captive_portal_page() {

cat >&4 <<-EOF
#!/bin/bash
echo -e 'Content-type: text/html\n'
echo '<!DOCTYPE html>'
echo '<html>'
echo -e '\t<head>'
Expand Down Expand Up @@ -5920,7 +5927,7 @@ function launch_webserver() {

killall lighttpd > /dev/null 2>&1
recalculate_windows_sizes
xterm -hold -bg black -fg yellow -geometry ${g3_bottomright_window} -T "Webserver" -e "lighttpd -f \"$tmpdir$webserver_file\"" > /dev/null 2>&1 &
xterm -hold -bg black -fg yellow -geometry ${g3_bottomright_window} -T "Webserver" -e "lighttpd -D -f \"$tmpdir$webserver_file\"" > /dev/null 2>&1 &
et_processes+=($!)
}

Expand Down

1 comment on commit f629a10

@krll-k
Copy link

@krll-k krll-k commented on f629a10 Oct 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job, he working

Please sign in to comment.