Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed task selection without response #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions nps_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def generate_msbuild_nps_msf_payload():

# Generate payload
try:
msf_payload = input("\nSelect payload: ")
msf_payload = int(input("\nSelect payload: "))
if (options.get(msf_payload) == "custom_ps1_payload"):
custom_ps1 = raw_input("Enter the location of your custom PS1 file: ")
encode_pshpayload(custom_ps1)
Expand Down Expand Up @@ -179,6 +179,7 @@ def generate_msbuild_nps_msf_payload():
</Task>
</UsingTask>
</Project>""" % psh_payload)
msbuild_nps_file.close()

print(bcolors.GREEN + "[+]" + bcolors.ENDC + " Metasploit resource script written to msbuild_nps.rc")
print(bcolors.GREEN + "[+]" + bcolors.ENDC + " Payload written to msbuild_nps.xml")
Expand Down Expand Up @@ -226,7 +227,7 @@ def generate_msbuild_nps_msf_hta_payload():

# Generate payloads
try:
msf_payload = input("\nSelect multiple payloads. Enter 99 when finished: ")
msf_payload = int(input("\nSelect multiple payloads. Enter 99 when finished: "))
if (options.get(msf_payload) == "finished"):
break
elif (options.get(msf_payload) == "custom_ps1_payload"):
Expand Down Expand Up @@ -406,7 +407,7 @@ def main():
99: quit,
}
try:
task = input("\nSelect a task: ")
task = int(input("\nSelect a task: "))
options[task]()
except KeyError:
pass
Expand Down