diff --git a/nps_payload.py b/nps_payload.py index 4fb90bf..965bfc8 100755 --- a/nps_payload.py +++ b/nps_payload.py @@ -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) @@ -179,6 +179,7 @@ def generate_msbuild_nps_msf_payload(): """ % 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") @@ -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"): @@ -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