| Intent Script | |
| Call the function retrlines with arguments 'RETR ' concatenated to page and the method write of f ftp.retrlines('RETR ' + page, f.write) | |
| Call the method start with no arguments on t t.start() | |
| Define the function connect with arguments user, host and password def connect(user, host, password): | |
| Create the scoket with parameters AF_INET and SOCK_STREAM connSkt = socket(AF_INET, SOCK_STREAM) | |
| For each tgtPort in tgtPorts for tgtPort in tgtPorts: | |
| Call the method sendline with argument 'yes' of child child.sendline('yes') | |
| Import the library for for file transfer protol connections import ftplib | |
| Call the function google with argoment 'Boondock Saint' google('Boondock Saint') | |
| Call the function quote_plus of urllib with argument search_term and assign it to search_terms search_term = urllib.quote_plus(search_term) | |
| Call the function listDir with argument recycleDir concatenated to sid of os and assign it to files files = os.listdir(recycleDir + sid) | |
| Call the method login on s with arguments self.host, self.user, self.password s.login(self.host, self.user, self.password) | |
| If the function has_key with argument 'href' of link returns True if link.has_key('href'): | |
| Define the function printLinks with argument url def printLinks(url): | |
| Send the packet ackPkt send(ackPkt) | |
| Create a packet pkt with source src, destination dst, ICMP type 8 and id equals to 456 pkt = IP(src=src,dst=dst)/ICMP(type=0,id=456) | |
| Define the function printMeta with argument fileName def printMeta(fileName): | |
| Call the function urlopen with argument url of urllib2 and call the method read with no arguments and assign it to urlContent urlContent = urllib2.urlopen(url).read() | |
| Assign to text the variable row at position 2 text = row[2] | |
| If state is equal to 'open' if state == 'open': | |
| Call the function viewPage with argument 'http://www.syngress.com/' viewPage('http://www.syngress.com/') | |
| For x from 1 to 5 for x in range(1, 5): | |
| "Create a packet pkt with source src, destination dst, UDP with destination port equals to 635 and the load equals to ""^\xB0\x02\x89\x06\xFE\xC8\x89F\x04\xB0\x06\x89F""" "pkt = IP(src=src, dst=dst) / UDP(dport=635) /Raw(load=""^\xB0\x02\x89\x06\xFE\xC8\x89F\x04\xB0\x06\x89F"")" | |
| Assign to stream the concatenation of src, ':' and dst stream = src + ':' + dst | |
| Define the function findHivemind with argument pcap def findHivemind(pcap): | |
| Open the file pcapFile and assign it to f f = open(pcapFile) | |
| Assign to pktsSent the value of pktCount with key stream pktsSent = pktCount[stream] | |
| If pcapFile of options is equal to None if options.pcapFile == None: | |
| Assign to longitude the field 'longitude' of rec longitude = rec['longitude'] | |
| Read the html code of page and assign it to source_code source_code = page.read() | |
| Define the function calTSN with argument tgt def calTSN(tgt): | |
| Define the function printCallLog with argument skypeDB def printCallLog(skypeDB): | |
| Call the method strip with argument '\n' of password then call the method strip with argument '\r' and assign the result to password password = password.strip('\\n').strip('\r') | |
| Call the method quit with no argument of ftp ftp.quit() | |
| If dport is equal to 6667 if dport == 6667: | |
| Import the library to parse the url import urlparse | |
| Assign to links the result of the function findall with argument html of link_finder links = link_finder.findall(html) | |
| "and ""\xfa\x86\x0b\x78\xfa\x82\xfb\x19\x69\x49\xfb\x54\x92\xc6""" """\xfa\x86\x0b\x78\xfa\x82\xfb\x19\x69\x49\xfb\x54\x92\xc6""" | |
| Call the function EnumKey with arguments key and i and assign it to guid guid = EnumKey(key, i) | |
| Assign to pktCount at key stream the value 1 pktCount[stream] = 1 | |
| Import the library for TCP/IP protocols import dpkt | |
| Call the function send_command with arguments child and 'cat /etc/shadow | grep root' send_command(child, 'cat /etc/shadow | grep root') | |
| Call the method findAll with argument 'img' of soup and assign it to image_tags image_tags = soup.findAll('img') | |
| Define the function returnDefault with argument ftp def returnDefault(ftp): | |
| Increment the variable Fails by 1 Fails += 1 | |
| Define the function send_command with arguments child and cmd def send_command(child, cmd): | |
| "and ""\x48\x2d\x76\xe3\xb5\x64\xf3\xd0\x4e\x77\xd5\x28\xae\x49""" """\x48\x2d\x76\xe3\xb5\x64\xf3\xd0\x4e\x77\xd5\x28\xae\x49""" | |
| Assign to ttl the ttl of pkt casted to str ttl = str(pkt.ttl) | |
| Else else: | |
| Call the class BeautifulSoup with argument html and assign it to soup soup = BeautifulSoup(html) | |
| If the substring 'synchronize with original prompt' is found in the result of the function str with argument e elif 'synchronize with original prompt' in str(e): | |
| Call the method connect with a tuple made of target and 21 of s s.connect((target,21)) | |
| Assign to seqNum the result of the function calTSN with argument tgt plus one seqNum = calTSN(tgt) + 1 | |
| Call the method join with arguments passDir and filename of os.path and assign it to fullpath fullpath = os.path.join(passDir, filename) | |
| Connect to tgtHost on tgtPort connSkt.connect((tgtHost, tgtPort)) | |
| For each tgtHost in tgt tgtHosts for tgtHost in tgtHosts: | |
| Try try: | |
| Assign to src the ip sorgent of ip.src src = socket.inet_ntoa(ip.src) | |
| Call the function findall with arguments r'maplat=.*\&' and resp from re and assign it to rLat rLat = re.findall(r'maplat=.*\&', resp) | |
| If the variable tgtHost of options is equal to None or lhost of options is equal to None if (options.tgtHost == None) | (options.lhost == None): | |
| Create an empty dictionary and assign it to pktCount pktCount = {} | |
| Assign to links the result of the function findAll with argument name equals to 'a' of soup links = soup.findAll(name='a') | |
| Call the function printMessage with argument iphoneDB printMessage(iphoneDB) | |
| Continue the argument and the tuple with password and True password, True)) | |
| For each ts and buf in pcap for (ts, buf) in pcap: | |
| Assign the response of the method open with argument 'http://kittenwar.com' of ab response = ab.open('http://kittenwar.com') | |
| Call the function str with value options.tgtPort then call the function split with argument ',' and assign the result totgtPorts tgtPorts = str(options.tgtPort).split(',') | |
| Call method sendline with argument 'yes' of child child.sendline('yes') | |
| If the functions len with argument argv of sys returns a value less than 2 if len(sys.argv) < 2: | |
| If cookiesDB is a file if os.path.isfile(cookiesDB): | |
| Create the constant THRESH with value 1000 THRESH = 1000 | |
| For each cookie in the cookie_jar for cookie in cookie_jar: | |
| If release is equal to True then call the method release with no arguments of connection_lock if release: connection_lock.release() | |
| Start try block try: | |
| If the method isdir with argument recycleDir of path of os returns True if os.path.isdir(recycleDir): | |
| Call the function retKML with argument src and assign it to srcKML srcKML = retKML(src) | |
| Call the method anonumize with no argument of ab ab.anonymize() | |
| For each argument in the tuple ts and buf in pcap for (ts, buf) in pcap: | |
| Assign to dir the variable dir of options dir = options.dir | |
| Call the method recv with argument 1024 of s s.recv(1024) | |
| Create a packet pkt with source src, destination dst, UDP with destination port equals to 7 and the load equals to 'cybercop' pkt = IP(src=src, dst=dst) / UDP(dport=7) /Raw(load='cybercop') | |
| Call the method login with arguments userName and passWord of ftp ftp.login(userName, passWord) | |
| Call the function urlencode with argument a dictionary with key 'credential_0' and value username and assign it reqData reqData = urllib.urlencode({'credential_0': username, | |
| Call the method append with argument fileName of retList retList.append(fileName) | |
| Assign to pkt the value of the the function IP with dst equals to tgt divided by the function TCP with no arguments pkt = IP(dst=tgt) / TCP() | |
| Define the function findAttack with argument pcap def findAttack(pcap): | |
| Open the file 'geotest.pcap' and assign it to f f = open('geotest.pcap') | |
| Call the function parse_args with no arguments and return the result to the tuple composed of options and args (options, args) = parser.parse_args() | |
| If iface of options is equal to None if options.iface == None: | |
| Assign to lat the field 'latitude' of rec lat = rec['latitude'] | |
| Call the method open with argument 'http://wigle.net' of browser browser.open('http://wigle.net') | |
| Assign to url the result with key 'url' url = result['url'] | |
| Assign to exifData sliced at decoded the value value exifData[decoded] = value | |
| Assign to rdata the value rdata of the method getlayer with argument DNSRR of pkt rdata = pkt.getlayer(DNSRR).rdata | |
| "Assign to parser the OptionParser with argument the concatenation of""usage %prog "" and ""-p <skype profile path> """ "parser = optparse.OptionParser(""usage %prog ""+ ""-p <skype profile path> "")" | |
| Get the list of the folders in pathName and assign it to dirList dirList = os.listdir(pathName) | |
| Call the function exit with argument 0 of sys sys.exit(0) | |
| From the library to manages thread import everything from threading import * | |
| Assign to uri the uri of http in lower case uri = http.uri.lower() | |
| "and ""\xdb\x70\xe2\x64\x1f\x12\x9e\x76\x73\xf4\x9f\xb8\x86\xf5""" """\xdb\x70\xe2\x64\x1f\x12\x9e\x76\x73\xf4\x9f\xb8\x86\xf5""" | |
| Import the library to navigate web through web forms import mechanize | |
| Concatenate the string '\\' and concatenate the string sid, close the arguments + '\\' + sid) | |
| Continue the arguments with help='specify wigle password' help='specify wigle password') | |
| Assign to date the result of function str with argument row at position 1 date = str(row[1]) | |
| Assign to dport the dport of tcp dport = tcp.dport | |
| Import everything from the library used for thread from threading import * | |
| Assign to pcapFile the pcapFile of options pcapFile = options.pcapFile | |
| For each image in image_tags for image in image_tags: | |
| Parse the usage prod pd target host and the target port parser = optparse.OptionParser('usage %prog -H <target host> -p <target port>') | |
| Define the function dnsQRTest with argument pkt def dnsQRTest(pkt): | |
| Import the library to estabilish a SSH connection import pxssh | |
| Call the method write of configFile with argument 'set payload ' and continue to the next line configFile.write('set payload '+\ | |
| Call the method strip with argument '\n' on the method strip with argument '\r' of line and assign the result to password password = line.strip('\r').strip('\\n') | |
| Define the function printMessages with argument skypeDB def printMessages(skypeDB): | |