Skip to content

Commit ce914aa

Browse files
author
ekultek
committed
the dryrun_autosploit script will now work successfully
1 parent 145611d commit ce914aa

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

dryrun_autosploit.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ TIMESTAMP=`date +%s`
1919

2020

2121
if [ ! $WHITELIST ]; then
22-
echo "python autosploit.py -s -c -q \"${SEARCH_QUERY}\" --overwrite -C \"msf_autorun_${TIMESTAMP}\" $LHOST $LPORT --exploit-file-to-use etc/json/default_modules.json --dry-run"
22+
echo "executing: python autosploit.py -s -c -q \"${SEARCH_QUERY}\" --overwrite -C \"msf_autorun_${TIMESTAMP}\" $LHOST $LPORT --exploit-file-to-use etc/json/default_modules.json --dry-run -e"
2323

24-
python autosploit.py -s -c -q "${SEARCH_QUERY}" --overwrite -C "msf_autorun_${TIMESTAMP}" $LHOST $LPORT --exploit-file-to-use etc/json/default_modules.json --dry-run
24+
python autosploit.py -s -c -q "${SEARCH_QUERY}" --overwrite -C "msf_autorun_${TIMESTAMP}" $LHOST $LPORT --exploit-file-to-use etc/json/default_modules.json --dry-run -e
2525
else
26-
echo "python autosploit.py -s -c -q \"${SEARCH_QUERY}\" --overwrite --whitelist $WHITELIST -e -C \"msf_autorun_${TIMESTAMP}\" $LHOST $LPORT --exploit-file-to-use etc/json/default_modules.json --dry-run"
26+
echo "executing: python autosploit.py -s -c -q \"${SEARCH_QUERY}\" --overwrite --whitelist $WHITELIST -e -C \"msf_autorun_${TIMESTAMP}\" $LHOST $LPORT --exploit-file-to-use etc/json/default_modules.json --dry-run -e"
2727

28-
python autosploit.py -s -c -q "${SEARCH_QUERY}" --overwrite --whitelist $WHITELIST -e -C "msf_autorun_${TIMESTAMP}" $LHOST $LPORT --exploit-file-to-use etc/json/default_modules.json --dry-run
28+
python autosploit.py -s -c -q "${SEARCH_QUERY}" --overwrite --whitelist $WHITELIST -e -C "msf_autorun_${TIMESTAMP}" $LHOST $LPORT --exploit-file-to-use etc/json/default_modules.json --dry-run -e
2929
fi;

lib/exploitation/exploiter.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ def start_exploit(self, sep="*" * 10):
6767
"""
6868
start the exploit, there is still no rollover but it's being worked
6969
"""
70+
if self.dry_run:
71+
lib.settings.close("dry run was initiated, exploitation will not be done")
72+
7073
today_printable = datetime.datetime.today().strftime("%Y-%m-%d_%Hh%Mm%Ss")
7174
current_run_path = path.join(lib.settings.RC_SCRIPTS_PATH, today_printable)
7275
makedirs(current_run_path)

0 commit comments

Comments
 (0)