{"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"SiteFacade.__init__","parameters":"(self, verbose)","argument_list":"","return_statement":"","docstring":"Class constructor. Simply creates a blank list and assigns it to\n instance variable _sites that will be filled with retrieved info\n from sites defined in the xml configuration file.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n Nothing is returned from this Method.","docstring_summary":"Class constructor. Simply creates a blank list and assigns it to\n instance variable _sites that will be filled with retrieved info\n from sites defined in the xml configuration file.","docstring_tokens":["Class","constructor",".","Simply","creates","a","blank","list","and","assigns","it","to","instance","variable","_sites","that","will","be","filled","with","retrieved","info","from","sites","defined","in","the","xml","configuration","file","."],"function":"def __init__(self, verbose):\n \"\"\"\n Class constructor. Simply creates a blank list and assigns it to\n instance variable _sites that will be filled with retrieved info\n from sites defined in the xml configuration file.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n Nothing is returned from this Method.\n \"\"\"\n\n self._sites = []\n self._verbose = verbose","function_tokens":["def","__init__","(","self",",","verbose",")",":","self",".","_sites","=","[","]","self",".","_verbose","=","verbose"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L57-L71"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"SiteFacade.runSiteAutomation","parameters":"(self, webretrievedelay, proxy, targetlist, sourcelist,\n useragent, botoutputrequested, refreshremotexml, versionlocation)","argument_list":"","return_statement":"","docstring":"Builds site objects representative of each site listed in the xml\n config file. Appends a Site object or one of it's subordinate objects\n to the _sites instance variable so retrieved information can be used.\n Returns nothing.\n\n Argument(s):\n webretrievedelay -- The amount of seconds to wait between site retrieve\n calls. Default delay is 2 seconds.\n proxy -- proxy server address as server:port_number\n targetlist -- list of strings representing targets to be investigated.\n Targets can be IP Addresses, MD5 hashes, or hostnames.\n sourcelist -- list of strings representing a specific site that should only be used\n for investigation purposes instead of all sites listed in the xml\n config file.\n useragent -- String representing user-agent that will be utilized when\n requesting or submitting data to or from a web site.\n botoutputrequested -- true or false representing if a minimalized output\n will be required for the site.\n refreshremotexml -- true or false representing if Automater will refresh \n the tekdefense.xml file on each run.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Builds site objects representative of each site listed in the xml\n config file. Appends a Site object or one of it's subordinate objects\n to the _sites instance variable so retrieved information can be used.\n Returns nothing.","docstring_tokens":["Builds","site","objects","representative","of","each","site","listed","in","the","xml","config","file",".","Appends","a","Site","object","or","one","of","it","s","subordinate","objects","to","the","_sites","instance","variable","so","retrieved","information","can","be","used",".","Returns","nothing","."],"function":"def runSiteAutomation(self, webretrievedelay, proxy, targetlist, sourcelist,\n useragent, botoutputrequested, refreshremotexml, versionlocation):\n \"\"\"\n Builds site objects representative of each site listed in the xml\n config file. Appends a Site object or one of it's subordinate objects\n to the _sites instance variable so retrieved information can be used.\n Returns nothing.\n\n Argument(s):\n webretrievedelay -- The amount of seconds to wait between site retrieve\n calls. Default delay is 2 seconds.\n proxy -- proxy server address as server:port_number\n targetlist -- list of strings representing targets to be investigated.\n Targets can be IP Addresses, MD5 hashes, or hostnames.\n sourcelist -- list of strings representing a specific site that should only be used\n for investigation purposes instead of all sites listed in the xml\n config file.\n useragent -- String representing user-agent that will be utilized when\n requesting or submitting data to or from a web site.\n botoutputrequested -- true or false representing if a minimalized output\n will be required for the site.\n refreshremotexml -- true or false representing if Automater will refresh \n the tekdefense.xml file on each run.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n if refreshremotexml:\n SitesFile.updateTekDefenseXMLTree(proxy, self._verbose)\n\n remotesitetree = SitesFile.getXMLTree(__TEKDEFENSEXML__, self._verbose)\n localsitetree = SitesFile.getXMLTree(__SITESXML__, self._verbose)\n\n if not localsitetree and not remotesitetree:\n print 'Unfortunately there is neither a {tekd} file nor a {sites} file that can be utilized for proper' \\\n ' parsing.\\nAt least one configuration XML file must be available for Automater to work properly.\\n' \\\n 'Please see {url} for further instructions.'\\\n .format(tekd=__TEKDEFENSEXML__, sites=__SITESXML__, url=versionlocation)\n else:\n if localsitetree:\n for siteelement in localsitetree.iter(tag=\"site\"):\n if self.siteEntryIsValid(siteelement):\n for targ in targetlist:\n for source in sourcelist:\n sitetypematch, targettype, target = self.getSiteInfoIfSiteTypesMatch(source, targ,\n siteelement)\n if sitetypematch:\n self.buildSiteList(siteelement, webretrievedelay, proxy, targettype, target,\n useragent, botoutputrequested)\n else:\n print 'A problem was found in the {sites} file. There appears to be a site entry with ' \\\n 'unequal numbers of regexs and reporting requirements'.format(sites=__SITESXML__)\n if remotesitetree:\n for siteelement in remotesitetree.iter(tag=\"site\"):\n if self.siteEntryIsValid(siteelement):\n for targ in targetlist:\n for source in sourcelist:\n sitetypematch, targettype, target = self.getSiteInfoIfSiteTypesMatch(source, targ,\n siteelement)\n if sitetypematch:\n self.buildSiteList(siteelement, webretrievedelay, proxy, targettype, target,\n useragent, botoutputrequested)\n else:\n print 'A problem was found in the {sites} file. There appears to be a site entry with ' \\\n 'unequal numbers of regexs and reporting requirements'.format(sites=__SITESXML__)","function_tokens":["def","runSiteAutomation","(","self",",","webretrievedelay",",","proxy",",","targetlist",",","sourcelist",",","useragent",",","botoutputrequested",",","refreshremotexml",",","versionlocation",")",":","if","refreshremotexml",":","SitesFile",".","updateTekDefenseXMLTree","(","proxy",",","self",".","_verbose",")","remotesitetree","=","SitesFile",".","getXMLTree","(","__TEKDEFENSEXML__",",","self",".","_verbose",")","localsitetree","=","SitesFile",".","getXMLTree","(","__SITESXML__",",","self",".","_verbose",")","if","not","localsitetree","and","not","remotesitetree",":","print","'Unfortunately there is neither a {tekd} file nor a {sites} file that can be utilized for proper'","' parsing.\\nAt least one configuration XML file must be available for Automater to work properly.\\n'","'Please see {url} for further instructions.'",".","format","(","tekd","=","__TEKDEFENSEXML__",",","sites","=","__SITESXML__",",","url","=","versionlocation",")","else",":","if","localsitetree",":","for","siteelement","in","localsitetree",".","iter","(","tag","=","\"site\"",")",":","if","self",".","siteEntryIsValid","(","siteelement",")",":","for","targ","in","targetlist",":","for","source","in","sourcelist",":","sitetypematch",",","targettype",",","target","=","self",".","getSiteInfoIfSiteTypesMatch","(","source",",","targ",",","siteelement",")","if","sitetypematch",":","self",".","buildSiteList","(","siteelement",",","webretrievedelay",",","proxy",",","targettype",",","target",",","useragent",",","botoutputrequested",")","else",":","print","'A problem was found in the {sites} file. There appears to be a site entry with '","'unequal numbers of regexs and reporting requirements'",".","format","(","sites","=","__SITESXML__",")","if","remotesitetree",":","for","siteelement","in","remotesitetree",".","iter","(","tag","=","\"site\"",")",":","if","self",".","siteEntryIsValid","(","siteelement",")",":","for","targ","in","targetlist",":","for","source","in","sourcelist",":","sitetypematch",",","targettype",",","target","=","self",".","getSiteInfoIfSiteTypesMatch","(","source",",","targ",",","siteelement",")","if","sitetypematch",":","self",".","buildSiteList","(","siteelement",",","webretrievedelay",",","proxy",",","targettype",",","target",",","useragent",",","botoutputrequested",")","else",":","print","'A problem was found in the {sites} file. There appears to be a site entry with '","'unequal numbers of regexs and reporting requirements'",".","format","(","sites","=","__SITESXML__",")"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L73-L140"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"SiteFacade.Sites","parameters":"(self)","argument_list":"","return_statement":"return self._sites","docstring":"Checks the instance variable _sites is empty or None.\n Returns _sites (the site list) or None if it is empty.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n list -- of Site objects or its subordinates.\n None -- if _sites is empty or None.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Checks the instance variable _sites is empty or None.\n Returns _sites (the site list) or None if it is empty.","docstring_tokens":["Checks","the","instance","variable","_sites","is","empty","or","None",".","Returns","_sites","(","the","site","list",")","or","None","if","it","is","empty","."],"function":"def Sites(self):\n \"\"\"\n Checks the instance variable _sites is empty or None.\n Returns _sites (the site list) or None if it is empty.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n list -- of Site objects or its subordinates.\n None -- if _sites is empty or None.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n if self._sites is None or len(self._sites) == 0:\n return None\n return self._sites","function_tokens":["def","Sites","(","self",")",":","if","self",".","_sites","is","None","or","len","(","self",".","_sites",")","==","0",":","return","None","return","self",".","_sites"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L172-L189"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"SiteFacade.identifyTargetType","parameters":"(self, target)","argument_list":"","return_statement":"return \"hostname\"","docstring":"Checks the target information provided to determine if it is a(n)\n IP Address in standard; CIDR or dash notation, or an MD5 hash,\n or a string hostname.\n Returns a string md5 if MD5 hash is identified. Returns the string\n ip if any IP Address format is found. Returns the string hostname\n if neither of those two are found.\n\n Argument(s):\n target -- string representing the target provided as the first\n argument to the program when Automater is run.\n\n Return value(s):\n string.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Checks the target information provided to determine if it is a(n)\n IP Address in standard; CIDR or dash notation, or an MD5 hash,\n or a string hostname.\n Returns a string md5 if MD5 hash is identified. Returns the string\n ip if any IP Address format is found. Returns the string hostname\n if neither of those two are found.","docstring_tokens":["Checks","the","target","information","provided","to","determine","if","it","is","a","(","n",")","IP","Address","in","standard",";","CIDR","or","dash","notation","or","an","MD5","hash","or","a","string","hostname",".","Returns","a","string","md5","if","MD5","hash","is","identified",".","Returns","the","string","ip","if","any","IP","Address","format","is","found",".","Returns","the","string","hostname","if","neither","of","those","two","are","found","."],"function":"def identifyTargetType(self, target):\n \"\"\"\n Checks the target information provided to determine if it is a(n)\n IP Address in standard; CIDR or dash notation, or an MD5 hash,\n or a string hostname.\n Returns a string md5 if MD5 hash is identified. Returns the string\n ip if any IP Address format is found. Returns the string hostname\n if neither of those two are found.\n\n Argument(s):\n target -- string representing the target provided as the first\n argument to the program when Automater is run.\n\n Return value(s):\n string.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n ipAddress = re.compile('\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}')\n ipFind = re.findall(ipAddress, target)\n if ipFind is not None and len(ipFind) > 0:\n return \"ip\"\n\n md5 = re.compile('[a-fA-F0-9]{32}', re.IGNORECASE)\n md5Find = re.findall(md5,target)\n if md5Find is not None and len(md5Find) > 0:\n return \"md5\"\n\n return \"hostname\"","function_tokens":["def","identifyTargetType","(","self",",","target",")",":","ipAddress","=","re",".","compile","(","'\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}'",")","ipFind","=","re",".","findall","(","ipAddress",",","target",")","if","ipFind","is","not","None","and","len","(","ipFind",")",">","0",":","return","\"ip\"","md5","=","re",".","compile","(","'[a-fA-F0-9]{32}'",",","re",".","IGNORECASE",")","md5Find","=","re",".","findall","(","md5",",","target",")","if","md5Find","is","not","None","and","len","(","md5Find",")",">","0",":","return","\"md5\"","return","\"hostname\""],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L191-L220"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.__init__","parameters":"(self, domainurl, webretrievedelay, proxy, targettype,\n reportstringforresult, target, useragent, friendlyname, regex,\n fullurl, boutoutputrequested, importantproperty, params, headers, method, postdata, verbose)","argument_list":"","return_statement":"","docstring":"Class constructor. Sets the instance variables based on input from\n the arguments supplied when Automater is run and what the xml\n config file stores.\n\n Argument(s):\n domainurl -- string defined in xml in the domainurl XML tag.\n webretrievedelay -- the amount of seconds to wait between site retrieve\n calls. Default delay is 2 seconds.\n proxy -- will set a proxy to use (eg. proxy.example.com:8080).\n targettype -- the targettype as defined. Either ip, md5, or hostname.\n reportstringforresult -- string or list of strings that are entered in\n the entry XML tag within the reportstringforresult XML tag in the\n xml configuration file.\n target -- the target that will be used to gather information on.\n useragent -- the user-agent string that will be utilized when submitting\n information to or requesting information from a website\n friendlyname -- string or list of strings that are entered in\n the entry XML tag within the sitefriendlyname XML tag in the\n xml configuration file.\n regex -- the regexs defined in the entry XML tag within the\n regex XML tag in the xml configuration file.\n fullurl -- string representation of fullurl pulled from the\n xml file in the fullurl XML tag.\n boutoutputrequested -- true or false representation of whether the -b option was used\n when running the program. If true, it slims the output so a bot can be\n used and the output is minimalized.\n importantproperty -- string defined in the the xml config file\n in the importantproperty XML tag.\n params -- string or list provided in the entry XML tags within the params\n XML tag in the xml configuration file.\n headers -- string or list provided in the entry XML tags within the headers\n XML tag in the xml configuration file.\n method -- holds whether this is a GET or POST required site. by default = GET\n postdata -- dict holding data required for posting values to a site. by default = None\n verbose -- boolean representing whether text will be printed to stdout\n\n Return value(s):\n Nothing is returned from this Method.","docstring_summary":"Class constructor. Sets the instance variables based on input from\n the arguments supplied when Automater is run and what the xml\n config file stores.","docstring_tokens":["Class","constructor",".","Sets","the","instance","variables","based","on","input","from","the","arguments","supplied","when","Automater","is","run","and","what","the","xml","config","file","stores","."],"function":"def __init__(self, domainurl, webretrievedelay, proxy, targettype,\n reportstringforresult, target, useragent, friendlyname, regex,\n fullurl, boutoutputrequested, importantproperty, params, headers, method, postdata, verbose):\n \"\"\"\n Class constructor. Sets the instance variables based on input from\n the arguments supplied when Automater is run and what the xml\n config file stores.\n\n Argument(s):\n domainurl -- string defined in xml in the domainurl XML tag.\n webretrievedelay -- the amount of seconds to wait between site retrieve\n calls. Default delay is 2 seconds.\n proxy -- will set a proxy to use (eg. proxy.example.com:8080).\n targettype -- the targettype as defined. Either ip, md5, or hostname.\n reportstringforresult -- string or list of strings that are entered in\n the entry XML tag within the reportstringforresult XML tag in the\n xml configuration file.\n target -- the target that will be used to gather information on.\n useragent -- the user-agent string that will be utilized when submitting\n information to or requesting information from a website\n friendlyname -- string or list of strings that are entered in\n the entry XML tag within the sitefriendlyname XML tag in the\n xml configuration file.\n regex -- the regexs defined in the entry XML tag within the\n regex XML tag in the xml configuration file.\n fullurl -- string representation of fullurl pulled from the\n xml file in the fullurl XML tag.\n boutoutputrequested -- true or false representation of whether the -b option was used\n when running the program. If true, it slims the output so a bot can be\n used and the output is minimalized.\n importantproperty -- string defined in the the xml config file\n in the importantproperty XML tag.\n params -- string or list provided in the entry XML tags within the params\n XML tag in the xml configuration file.\n headers -- string or list provided in the entry XML tags within the headers\n XML tag in the xml configuration file.\n method -- holds whether this is a GET or POST required site. by default = GET\n postdata -- dict holding data required for posting values to a site. by default = None\n verbose -- boolean representing whether text will be printed to stdout\n\n Return value(s):\n Nothing is returned from this Method.\n \"\"\"\n self._sourceurl = domainurl\n self._webretrievedelay = webretrievedelay\n self._proxy = proxy\n self._targetType = targettype\n self._reportstringforresult = reportstringforresult\n self._errormessage = \"[-] Cannot scrape\"\n self._usermessage = \"[*] Checking\"\n self._target = target\n self._userAgent = useragent\n self._friendlyName = friendlyname\n self._regex = \"\"\n self.RegEx = regex # call the helper method to clean %TARGET% from regex string\n self._fullURL = \"\"\n self.FullURL = fullurl # call the helper method to clean %TARGET% from fullurl string\n self._botOutputRequested = boutoutputrequested\n self._importantProperty = importantproperty\n self._params = None\n if params is not None:\n self.Params = params # call the helper method to clean %TARGET% from params string\n self._headers = None\n if headers is not None:\n self.Headers = headers # call the helper method to clean %TARGET% from params string\n self._postdata = None\n if postdata:\n self.PostData = postdata\n self._method = None\n self.Method = method # call the helper method to ensure result is either GET or POST\n self._results = []\n self._verbose = verbose","function_tokens":["def","__init__","(","self",",","domainurl",",","webretrievedelay",",","proxy",",","targettype",",","reportstringforresult",",","target",",","useragent",",","friendlyname",",","regex",",","fullurl",",","boutoutputrequested",",","importantproperty",",","params",",","headers",",","method",",","postdata",",","verbose",")",":","self",".","_sourceurl","=","domainurl","self",".","_webretrievedelay","=","webretrievedelay","self",".","_proxy","=","proxy","self",".","_targetType","=","targettype","self",".","_reportstringforresult","=","reportstringforresult","self",".","_errormessage","=","\"[-] Cannot scrape\"","self",".","_usermessage","=","\"[*] Checking\"","self",".","_target","=","target","self",".","_userAgent","=","useragent","self",".","_friendlyName","=","friendlyname","self",".","_regex","=","\"\"","self",".","RegEx","=","regex","# call the helper method to clean %TARGET% from regex string","self",".","_fullURL","=","\"\"","self",".","FullURL","=","fullurl","# call the helper method to clean %TARGET% from fullurl string","self",".","_botOutputRequested","=","boutoutputrequested","self",".","_importantProperty","=","importantproperty","self",".","_params","=","None","if","params","is","not","None",":","self",".","Params","=","params","# call the helper method to clean %TARGET% from params string","self",".","_headers","=","None","if","headers","is","not","None",":","self",".","Headers","=","headers","# call the helper method to clean %TARGET% from params string","self",".","_postdata","=","None","if","postdata",":","self",".","PostData","=","postdata","self",".","_method","=","None","self",".","Method","=","method","# call the helper method to ensure result is either GET or POST","self",".","_results","=","[","]","self",".","_verbose","=","verbose"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L282-L353"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.buildSiteFromXML","parameters":"(self, siteelement, webretrievedelay, proxy, targettype,\n target, useragent, botoutputrequested, verbose)","argument_list":"","return_statement":"return Site(domainurl, webretrievedelay, proxy, targettype, reportstringforresult, target,\n useragent, sitefriendlyname, regex, fullurl, botoutputrequested, importantproperty,\n params, headers, method.upper(), postdata, verbose)","docstring":"Utilizes the Class Methods within this Class to build the Site object.\n Returns a Site object that defines results returned during the web\n retrieval investigations.\n\n Argument(s):\n siteelement -- the siteelement object that will be used as the\n start element.\n webretrievedelay -- the amount of seconds to wait between site retrieve\n calls. Default delay is 2 seconds.\n proxy -- sets a proxy to use in the form of proxy.example.com:8080.\n targettype -- the targettype as defined. Either ip, md5, or hostname.\n target -- the target that will be used to gather information on.\n useragent -- the string utilized to represent the user-agent when\n web requests or submissions are made.\n botoutputrequested -- true or false representing if a minimalized output\n will be required for the site.\n\n Return value(s):\n Site object.\n\n Restriction(s):\n This Method is tagged as a Class Method","docstring_summary":"Utilizes the Class Methods within this Class to build the Site object.\n Returns a Site object that defines results returned during the web\n retrieval investigations.","docstring_tokens":["Utilizes","the","Class","Methods","within","this","Class","to","build","the","Site","object",".","Returns","a","Site","object","that","defines","results","returned","during","the","web","retrieval","investigations","."],"function":"def buildSiteFromXML(self, siteelement, webretrievedelay, proxy, targettype,\n target, useragent, botoutputrequested, verbose):\n \"\"\"\n Utilizes the Class Methods within this Class to build the Site object.\n Returns a Site object that defines results returned during the web\n retrieval investigations.\n\n Argument(s):\n siteelement -- the siteelement object that will be used as the\n start element.\n webretrievedelay -- the amount of seconds to wait between site retrieve\n calls. Default delay is 2 seconds.\n proxy -- sets a proxy to use in the form of proxy.example.com:8080.\n targettype -- the targettype as defined. Either ip, md5, or hostname.\n target -- the target that will be used to gather information on.\n useragent -- the string utilized to represent the user-agent when\n web requests or submissions are made.\n botoutputrequested -- true or false representing if a minimalized output\n will be required for the site.\n\n Return value(s):\n Site object.\n\n Restriction(s):\n This Method is tagged as a Class Method\n \"\"\"\n domainurl = siteelement.find(\"domainurl\").text\n try:\n method = siteelement.find(\"method\").text\n if method.upper() != \"GET\" and method.upper() != \"POST\":\n method = \"GET\"\n except:\n method = \"GET\"\n postdata = Site.buildDictionaryFromXML(siteelement, \"postdata\")\n reportstringforresult = Site.buildStringOrListfromXML(siteelement, \"reportstringforresult\")\n sitefriendlyname = Site.buildStringOrListfromXML(siteelement, \"sitefriendlyname\")\n regex = Site.buildStringOrListfromXML(siteelement, \"regex\")\n fullurl = siteelement.find(\"fullurl\").text\n importantproperty = Site.buildStringOrListfromXML(siteelement, \"importantproperty\")\n params = Site.buildDictionaryFromXML(siteelement, \"params\")\n headers = Site.buildDictionaryFromXML(siteelement, \"headers\")\n\n return Site(domainurl, webretrievedelay, proxy, targettype, reportstringforresult, target,\n useragent, sitefriendlyname, regex, fullurl, botoutputrequested, importantproperty,\n params, headers, method.upper(), postdata, verbose)","function_tokens":["def","buildSiteFromXML","(","self",",","siteelement",",","webretrievedelay",",","proxy",",","targettype",",","target",",","useragent",",","botoutputrequested",",","verbose",")",":","domainurl","=","siteelement",".","find","(","\"domainurl\"",")",".","text","try",":","method","=","siteelement",".","find","(","\"method\"",")",".","text","if","method",".","upper","(",")","!=","\"GET\"","and","method",".","upper","(",")","!=","\"POST\"",":","method","=","\"GET\"","except",":","method","=","\"GET\"","postdata","=","Site",".","buildDictionaryFromXML","(","siteelement",",","\"postdata\"",")","reportstringforresult","=","Site",".","buildStringOrListfromXML","(","siteelement",",","\"reportstringforresult\"",")","sitefriendlyname","=","Site",".","buildStringOrListfromXML","(","siteelement",",","\"sitefriendlyname\"",")","regex","=","Site",".","buildStringOrListfromXML","(","siteelement",",","\"regex\"",")","fullurl","=","siteelement",".","find","(","\"fullurl\"",")",".","text","importantproperty","=","Site",".","buildStringOrListfromXML","(","siteelement",",","\"importantproperty\"",")","params","=","Site",".","buildDictionaryFromXML","(","siteelement",",","\"params\"",")","headers","=","Site",".","buildDictionaryFromXML","(","siteelement",",","\"headers\"",")","return","Site","(","domainurl",",","webretrievedelay",",","proxy",",","targettype",",","reportstringforresult",",","target",",","useragent",",","sitefriendlyname",",","regex",",","fullurl",",","botoutputrequested",",","importantproperty",",","params",",","headers",",","method",".","upper","(",")",",","postdata",",","verbose",")"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L367-L411"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.buildStringOrListfromXML","parameters":"(self, siteelement, elementstring)","argument_list":"","return_statement":"return variablename","docstring":"Takes in a siteelement and then elementstring and builds a string\n or list from multiple entry XML tags defined in the xml config\n file. Returns None if there are no entry XML tags for this\n specific elementstring. Returns a list of those entries\n if entry XML tags are found or a string of that entry if only\n one entry XML tag is found.\n\n Argument(s):\n siteelement -- the siteelement object that will be used as the\n start element.\n elementstring -- the string representation within the siteelement\n that will be utilized to get to the single or multiple entry\n XML tags.\n\n Return value(s):\n None if no entry XML tags are found.\n List representing all entry keys found within the elementstring.\n string representing an entry key if only one is found\n within the elementstring.\n\n Restriction(s):\n This Method is tagged as a Class Method","docstring_summary":"Takes in a siteelement and then elementstring and builds a string\n or list from multiple entry XML tags defined in the xml config\n file. Returns None if there are no entry XML tags for this\n specific elementstring. Returns a list of those entries\n if entry XML tags are found or a string of that entry if only\n one entry XML tag is found.","docstring_tokens":["Takes","in","a","siteelement","and","then","elementstring","and","builds","a","string","or","list","from","multiple","entry","XML","tags","defined","in","the","xml","config","file",".","Returns","None","if","there","are","no","entry","XML","tags","for","this","specific","elementstring",".","Returns","a","list","of","those","entries","if","entry","XML","tags","are","found","or","a","string","of","that","entry","if","only","one","entry","XML","tag","is","found","."],"function":"def buildStringOrListfromXML(self, siteelement, elementstring):\n \"\"\"\n Takes in a siteelement and then elementstring and builds a string\n or list from multiple entry XML tags defined in the xml config\n file. Returns None if there are no entry XML tags for this\n specific elementstring. Returns a list of those entries\n if entry XML tags are found or a string of that entry if only\n one entry XML tag is found.\n\n Argument(s):\n siteelement -- the siteelement object that will be used as the\n start element.\n elementstring -- the string representation within the siteelement\n that will be utilized to get to the single or multiple entry\n XML tags.\n\n Return value(s):\n None if no entry XML tags are found.\n List representing all entry keys found within the elementstring.\n string representing an entry key if only one is found\n within the elementstring.\n\n Restriction(s):\n This Method is tagged as a Class Method\n \"\"\"\n variablename = \"\"\n if len(siteelement.find(elementstring).findall(\"entry\")) == 0:\n return None\n\n if len(siteelement.find(elementstring).findall(\"entry\")) > 1:\n variablename = []\n for entry in siteelement.find(elementstring).findall(\"entry\"):\n variablename.append(entry.text)\n else:\n variablename = \"\"\n variablename = siteelement.find(elementstring).find(\"entry\").text\n return variablename","function_tokens":["def","buildStringOrListfromXML","(","self",",","siteelement",",","elementstring",")",":","variablename","=","\"\"","if","len","(","siteelement",".","find","(","elementstring",")",".","findall","(","\"entry\"",")",")","==","0",":","return","None","if","len","(","siteelement",".","find","(","elementstring",")",".","findall","(","\"entry\"",")",")",">","1",":","variablename","=","[","]","for","entry","in","siteelement",".","find","(","elementstring",")",".","findall","(","\"entry\"",")",":","variablename",".","append","(","entry",".","text",")","else",":","variablename","=","\"\"","variablename","=","siteelement",".","find","(","elementstring",")",".","find","(","\"entry\"",")",".","text","return","variablename"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L414-L450"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.buildDictionaryFromXML","parameters":"(self, siteelement, elementstring)","argument_list":"","return_statement":"return variablename","docstring":"Takes in a siteelement and then elementstring and builds a dictionary\n from multiple entry XML tags defined in the xml config file.\n Returns None if there are no entry XML tags for this\n specific elementstring. Returns a dictionary of those entries\n if entry XML tags are found.\n\n Argument(s):\n siteelement -- the siteelement object that will be used as the\n start element.\n elementstring -- the string representation within the siteelement\n that will be utilized to get to the single or multiple entry\n XML tags.\n\n Return value(s):\n None if no entry XML tags are found.\n Dictionary representing all entry keys found within the elementstring.\n\n Restriction(s):\n This Method is tagged as a Class Method","docstring_summary":"Takes in a siteelement and then elementstring and builds a dictionary\n from multiple entry XML tags defined in the xml config file.\n Returns None if there are no entry XML tags for this\n specific elementstring. Returns a dictionary of those entries\n if entry XML tags are found.","docstring_tokens":["Takes","in","a","siteelement","and","then","elementstring","and","builds","a","dictionary","from","multiple","entry","XML","tags","defined","in","the","xml","config","file",".","Returns","None","if","there","are","no","entry","XML","tags","for","this","specific","elementstring",".","Returns","a","dictionary","of","those","entries","if","entry","XML","tags","are","found","."],"function":"def buildDictionaryFromXML(self, siteelement, elementstring):\n \"\"\"\n Takes in a siteelement and then elementstring and builds a dictionary\n from multiple entry XML tags defined in the xml config file.\n Returns None if there are no entry XML tags for this\n specific elementstring. Returns a dictionary of those entries\n if entry XML tags are found.\n\n Argument(s):\n siteelement -- the siteelement object that will be used as the\n start element.\n elementstring -- the string representation within the siteelement\n that will be utilized to get to the single or multiple entry\n XML tags.\n\n Return value(s):\n None if no entry XML tags are found.\n Dictionary representing all entry keys found within the elementstring.\n\n Restriction(s):\n This Method is tagged as a Class Method\n \"\"\"\n variablename = \"\"\n try:\n if len(siteelement.find(elementstring).findall(\"entry\")) > 0:\n variablename = {}\n for entry in siteelement.find(elementstring).findall(\"entry\"):\n variablename[entry.get(\"key\")] = entry.text\n else:\n return None\n except:\n return None\n return variablename","function_tokens":["def","buildDictionaryFromXML","(","self",",","siteelement",",","elementstring",")",":","variablename","=","\"\"","try",":","if","len","(","siteelement",".","find","(","elementstring",")",".","findall","(","\"entry\"",")",")",">","0",":","variablename","=","{","}","for","entry","in","siteelement",".","find","(","elementstring",")",".","findall","(","\"entry\"",")",":","variablename","[","entry",".","get","(","\"key\"",")","]","=","entry",".","text","else",":","return","None","except",":","return","None","return","variablename"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L453-L485"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.WebRetrieveDelay","parameters":"(self)","argument_list":"","return_statement":"return self._webretrievedelay","docstring":"Returns the string representation of the number of\n seconds that will be delayed between site retrievals.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representation of an integer that is the delay in\n seconds that will be used between each web site retrieval.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Returns the string representation of the number of\n seconds that will be delayed between site retrievals.","docstring_tokens":["Returns","the","string","representation","of","the","number","of","seconds","that","will","be","delayed","between","site","retrievals","."],"function":"def WebRetrieveDelay(self):\n \"\"\"\n Returns the string representation of the number of\n seconds that will be delayed between site retrievals.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representation of an integer that is the delay in\n seconds that will be used between each web site retrieval.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n return self._webretrievedelay","function_tokens":["def","WebRetrieveDelay","(","self",")",":","return","self",".","_webretrievedelay"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L488-L503"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.Proxy","parameters":"(self)","argument_list":"","return_statement":"return self._proxy","docstring":"Returns the string representation of the proxy used.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representation of the proxy used\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Returns the string representation of the proxy used.","docstring_tokens":["Returns","the","string","representation","of","the","proxy","used","."],"function":"def Proxy(self):\n \"\"\"\n Returns the string representation of the proxy used.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representation of the proxy used\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n return self._proxy","function_tokens":["def","Proxy","(","self",")",":","return","self",".","_proxy"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L506-L519"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.TargetType","parameters":"(self)","argument_list":"","return_statement":"return self._targetType","docstring":"Returns the target type information whether that be ip,\n md5, or hostname.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- defined as ip, md5, or hostname.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Returns the target type information whether that be ip,\n md5, or hostname.","docstring_tokens":["Returns","the","target","type","information","whether","that","be","ip","md5","or","hostname","."],"function":"def TargetType(self):\n \"\"\"\n Returns the target type information whether that be ip,\n md5, or hostname.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- defined as ip, md5, or hostname.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n return self._targetType","function_tokens":["def","TargetType","(","self",")",":","return","self",".","_targetType"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L522-L536"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.ReportStringForResult","parameters":"(self)","argument_list":"","return_statement":"return self._reportstringforresult","docstring":"Returns the string representing a report string tag that\n precedes reporting information so the user knows what\n specifics are being found.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representing a tag for reporting information.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Returns the string representing a report string tag that\n precedes reporting information so the user knows what\n specifics are being found.","docstring_tokens":["Returns","the","string","representing","a","report","string","tag","that","precedes","reporting","information","so","the","user","knows","what","specifics","are","being","found","."],"function":"def ReportStringForResult(self):\n \"\"\"\n Returns the string representing a report string tag that\n precedes reporting information so the user knows what\n specifics are being found.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representing a tag for reporting information.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n return self._reportstringforresult","function_tokens":["def","ReportStringForResult","(","self",")",":","return","self",".","_reportstringforresult"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L539-L554"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.FriendlyName","parameters":"(self)","argument_list":"","return_statement":"return self._friendlyName","docstring":"Returns the string representing a friendly string name.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representing friendly name for a tag for reporting.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Returns the string representing a friendly string name.","docstring_tokens":["Returns","the","string","representing","a","friendly","string","name","."],"function":"def FriendlyName(self):\n \"\"\"\n Returns the string representing a friendly string name.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representing friendly name for a tag for reporting.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n return self._friendlyName","function_tokens":["def","FriendlyName","(","self",")",":","return","self",".","_friendlyName"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L557-L570"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.URL","parameters":"(self)","argument_list":"","return_statement":"return self._sourceurl","docstring":"Returns the string representing the Domain URL which is\n required to retrieve the information being investigated.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representing the URL of the site.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Returns the string representing the Domain URL which is\n required to retrieve the information being investigated.","docstring_tokens":["Returns","the","string","representing","the","Domain","URL","which","is","required","to","retrieve","the","information","being","investigated","."],"function":"def URL(self):\n \"\"\"\n Returns the string representing the Domain URL which is\n required to retrieve the information being investigated.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representing the URL of the site.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n return self._sourceurl","function_tokens":["def","URL","(","self",")",":","return","self",".","_sourceurl"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L573-L587"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.ErrorMessage","parameters":"(self)","argument_list":"","return_statement":"return self._errormessage","docstring":"Returns the string representing the Error Message.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representing the error message to print to\n the standard output.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Returns the string representing the Error Message.","docstring_tokens":["Returns","the","string","representing","the","Error","Message","."],"function":"def ErrorMessage(self):\n \"\"\"\n Returns the string representing the Error Message.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representing the error message to print to\n the standard output.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n return self._errormessage","function_tokens":["def","ErrorMessage","(","self",")",":","return","self",".","_errormessage"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L590-L604"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.UserMessage","parameters":"(self)","argument_list":"","return_statement":"return self._usermessage","docstring":"Returns the string representing the Full URL which is the\n domain URL plus querystrings and other information required\n to retrieve the information being investigated.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representing the full URL of the site including\n querystring information and any other info required.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Returns the string representing the Full URL which is the\n domain URL plus querystrings and other information required\n to retrieve the information being investigated.","docstring_tokens":["Returns","the","string","representing","the","Full","URL","which","is","the","domain","URL","plus","querystrings","and","other","information","required","to","retrieve","the","information","being","investigated","."],"function":"def UserMessage(self):\n \"\"\"\n Returns the string representing the Full URL which is the\n domain URL plus querystrings and other information required\n to retrieve the information being investigated.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representing the full URL of the site including\n querystring information and any other info required.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n return self._usermessage","function_tokens":["def","UserMessage","(","self",")",":","return","self",".","_usermessage"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L607-L623"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.FullURL","parameters":"(self)","argument_list":"","return_statement":"return self._fullURL","docstring":"Returns the string representing the Full URL which is the\n domain URL plus querystrings and other information required\n to retrieve the information being investigated.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representing the full URL of the site including\n querystring information and any other info required.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Returns the string representing the Full URL which is the\n domain URL plus querystrings and other information required\n to retrieve the information being investigated.","docstring_tokens":["Returns","the","string","representing","the","Full","URL","which","is","the","domain","URL","plus","querystrings","and","other","information","required","to","retrieve","the","information","being","investigated","."],"function":"def FullURL(self):\n \"\"\"\n Returns the string representing the Full URL which is the\n domain URL plus querystrings and other information required\n to retrieve the information being investigated.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representing the full URL of the site including\n querystring information and any other info required.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n return self._fullURL","function_tokens":["def","FullURL","(","self",")",":","return","self",".","_fullURL"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L626-L642"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.FullURL","parameters":"(self, fullurl)","argument_list":"","return_statement":"","docstring":"Determines if the parameter has characters and assigns it to the\n instance variable _fullURL if it does after replacing the target\n information where the keyword %TARGET% is used. This keyword will\n be used in the xml configuration file where the user wants\n the target information to be placed in the URL.\n\n Argument(s):\n fullurl -- string representation of fullurl pulled from the\n xml file in the fullurl XML tag.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n This Method is tagged as a Setter.","docstring_summary":"Determines if the parameter has characters and assigns it to the\n instance variable _fullURL if it does after replacing the target\n information where the keyword %TARGET% is used. This keyword will\n be used in the xml configuration file where the user wants\n the target information to be placed in the URL.","docstring_tokens":["Determines","if","the","parameter","has","characters","and","assigns","it","to","the","instance","variable","_fullURL","if","it","does","after","replacing","the","target","information","where","the","keyword","%TARGET%","is","used",".","This","keyword","will","be","used","in","the","xml","configuration","file","where","the","user","wants","the","target","information","to","be","placed","in","the","URL","."],"function":"def FullURL(self, fullurl):\n \"\"\"\n Determines if the parameter has characters and assigns it to the\n instance variable _fullURL if it does after replacing the target\n information where the keyword %TARGET% is used. This keyword will\n be used in the xml configuration file where the user wants\n the target information to be placed in the URL.\n\n Argument(s):\n fullurl -- string representation of fullurl pulled from the\n xml file in the fullurl XML tag.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n This Method is tagged as a Setter.\n \"\"\"\n if len(fullurl) > 0:\n fullurlreplaced = fullurl.replace(\"%TARGET%\", self._target)\n self._fullURL = fullurlreplaced\n else:\n self._fullURL = \"\"","function_tokens":["def","FullURL","(","self",",","fullurl",")",":","if","len","(","fullurl",")",">","0",":","fullurlreplaced","=","fullurl",".","replace","(","\"%TARGET%\"",",","self",".","_target",")","self",".","_fullURL","=","fullurlreplaced","else",":","self",".","_fullURL","=","\"\""],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L645-L667"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.RegEx","parameters":"(self)","argument_list":"","return_statement":"return self._regex","docstring":"Returns string representing the regex being investigated.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representation of the Regex from the _regex\n instance variable.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Returns string representing the regex being investigated.","docstring_tokens":["Returns","string","representing","the","regex","being","investigated","."],"function":"def RegEx(self):\n \"\"\"\n Returns string representing the regex being investigated.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representation of the Regex from the _regex\n instance variable.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n return self._regex","function_tokens":["def","RegEx","(","self",")",":","return","self",".","_regex"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L670-L684"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.RegEx","parameters":"(self, regex)","argument_list":"","return_statement":"","docstring":"Determines if the parameter has characters and assigns it to the\n instance variable _regex if it does after replacing the target\n information where the keyword %TARGET% is used. This keyword will\n be used in the xml configuration file where the user wants\n the target information to be placed in the regex.\n\n Argument(s):\n regex -- string representation of regex pulled from the\n xml file in the regex entry XML tag.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n This Method is tagged as a Setter.","docstring_summary":"Determines if the parameter has characters and assigns it to the\n instance variable _regex if it does after replacing the target\n information where the keyword %TARGET% is used. This keyword will\n be used in the xml configuration file where the user wants\n the target information to be placed in the regex.","docstring_tokens":["Determines","if","the","parameter","has","characters","and","assigns","it","to","the","instance","variable","_regex","if","it","does","after","replacing","the","target","information","where","the","keyword","%TARGET%","is","used",".","This","keyword","will","be","used","in","the","xml","configuration","file","where","the","user","wants","the","target","information","to","be","placed","in","the","regex","."],"function":"def RegEx(self, regex):\n \"\"\"\n Determines if the parameter has characters and assigns it to the\n instance variable _regex if it does after replacing the target\n information where the keyword %TARGET% is used. This keyword will\n be used in the xml configuration file where the user wants\n the target information to be placed in the regex.\n\n Argument(s):\n regex -- string representation of regex pulled from the\n xml file in the regex entry XML tag.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n This Method is tagged as a Setter.\n \"\"\"\n if len(regex) > 0:\n try:\n regexreplaced = regex.replace(\"%TARGET%\", self._target)\n self._regex = regexreplaced\n except AttributeError:\n regexreplaced = []\n for r in regex:\n regexreplaced.append(r.replace(\"%TARGET%\", self._target))\n self._regex = regexreplaced\n else:\n self._regex = \"\"","function_tokens":["def","RegEx","(","self",",","regex",")",":","if","len","(","regex",")",">","0",":","try",":","regexreplaced","=","regex",".","replace","(","\"%TARGET%\"",",","self",".","_target",")","self",".","_regex","=","regexreplaced","except","AttributeError",":","regexreplaced","=","[","]","for","r","in","regex",":","regexreplaced",".","append","(","r",".","replace","(","\"%TARGET%\"",",","self",".","_target",")",")","self",".","_regex","=","regexreplaced","else",":","self",".","_regex","=","\"\""],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L687-L715"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.BotOutputRequested","parameters":"(self)","argument_list":"","return_statement":"return self._botOutputRequested","docstring":"Returns a true if the -b option was requested when the\n program was run. This identifies if the program is to\n run a more silent version of output during the run to help\n bots and other small format requirements.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n boolean -- True if the -b option was used and am more silent\n output is required. False if normal output should be utilized.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Returns a true if the -b option was requested when the\n program was run. This identifies if the program is to\n run a more silent version of output during the run to help\n bots and other small format requirements.","docstring_tokens":["Returns","a","true","if","the","-","b","option","was","requested","when","the","program","was","run",".","This","identifies","if","the","program","is","to","run","a","more","silent","version","of","output","during","the","run","to","help","bots","and","other","small","format","requirements","."],"function":"def BotOutputRequested(self):\n \"\"\"\n Returns a true if the -b option was requested when the\n program was run. This identifies if the program is to\n run a more silent version of output during the run to help\n bots and other small format requirements.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n boolean -- True if the -b option was used and am more silent\n output is required. False if normal output should be utilized.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n return self._botOutputRequested","function_tokens":["def","BotOutputRequested","(","self",")",":","return","self",".","_botOutputRequested"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L718-L735"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.SourceURL","parameters":"(self)","argument_list":"","return_statement":"return self._sourceurl","docstring":"Returns the string representing the Source URL which is simply\n the domain URL entered in the xml config file.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representing the source URL of the site.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Returns the string representing the Source URL which is simply\n the domain URL entered in the xml config file.","docstring_tokens":["Returns","the","string","representing","the","Source","URL","which","is","simply","the","domain","URL","entered","in","the","xml","config","file","."],"function":"def SourceURL(self):\n \"\"\"\n Returns the string representing the Source URL which is simply\n the domain URL entered in the xml config file.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representing the source URL of the site.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n return self._sourceurl","function_tokens":["def","SourceURL","(","self",")",":","return","self",".","_sourceurl"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L738-L752"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.ImportantPropertyString","parameters":"(self)","argument_list":"","return_statement":"return self._importantProperty","docstring":"Returns the string representing the Important Property\n that the user wants the site to report. This is set using\n the xml config file in the importantproperty XML tag.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representing the important property of the site\n that needs to be reported.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Returns the string representing the Important Property\n that the user wants the site to report. This is set using\n the xml config file in the importantproperty XML tag.","docstring_tokens":["Returns","the","string","representing","the","Important","Property","that","the","user","wants","the","site","to","report",".","This","is","set","using","the","xml","config","file","in","the","importantproperty","XML","tag","."],"function":"def ImportantPropertyString(self):\n \"\"\"\n Returns the string representing the Important Property\n that the user wants the site to report. This is set using\n the xml config file in the importantproperty XML tag.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representing the important property of the site\n that needs to be reported.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n return self._importantProperty","function_tokens":["def","ImportantPropertyString","(","self",")",":","return","self",".","_importantProperty"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L755-L771"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.Params","parameters":"(self)","argument_list":"","return_statement":"return self._params","docstring":"Determines if web Parameters were set for this specific site.\n Returns the string representing the Parameters using the\n _params instance variable or returns None if the instance\n variable is empty or not set.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representation of the Parameters from the _params\n instance variable.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Determines if web Parameters were set for this specific site.\n Returns the string representing the Parameters using the\n _params instance variable or returns None if the instance\n variable is empty or not set.","docstring_tokens":["Determines","if","web","Parameters","were","set","for","this","specific","site",".","Returns","the","string","representing","the","Parameters","using","the","_params","instance","variable","or","returns","None","if","the","instance","variable","is","empty","or","not","set","."],"function":"def Params(self):\n \"\"\"\n Determines if web Parameters were set for this specific site.\n Returns the string representing the Parameters using the\n _params instance variable or returns None if the instance\n variable is empty or not set.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representation of the Parameters from the _params\n instance variable.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n if self._params is None:\n return None\n if len(self._params) == 0:\n return None\n return self._params","function_tokens":["def","Params","(","self",")",":","if","self",".","_params","is","None",":","return","None","if","len","(","self",".","_params",")","==","0",":","return","None","return","self",".","_params"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L774-L795"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.Params","parameters":"(self, params)","argument_list":"","return_statement":"","docstring":"Determines if Parameters were required for this specific site.\n If web Parameters were set, this places the target into the\n parameters where required marked with the %TARGET% keyword\n in the xml config file.\n\n Argument(s):\n params -- dictionary representing web Parameters required.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n This Method is tagged as a Setter.","docstring_summary":"Determines if Parameters were required for this specific site.\n If web Parameters were set, this places the target into the\n parameters where required marked with the %TARGET% keyword\n in the xml config file.","docstring_tokens":["Determines","if","Parameters","were","required","for","this","specific","site",".","If","web","Parameters","were","set","this","places","the","target","into","the","parameters","where","required","marked","with","the","%TARGET%","keyword","in","the","xml","config","file","."],"function":"def Params(self, params):\n \"\"\"\n Determines if Parameters were required for this specific site.\n If web Parameters were set, this places the target into the\n parameters where required marked with the %TARGET% keyword\n in the xml config file.\n\n Argument(s):\n params -- dictionary representing web Parameters required.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n This Method is tagged as a Setter.\n \"\"\"\n if len(params) > 0:\n for key in params:\n if params[key] == \"%TARGET%\":\n params[key] = self._target\n self._params = params\n else:\n self._params = None","function_tokens":["def","Params","(","self",",","params",")",":","if","len","(","params",")",">","0",":","for","key","in","params",":","if","params","[","key","]","==","\"%TARGET%\"",":","params","[","key","]","=","self",".","_target","self",".","_params","=","params","else",":","self",".","_params","=","None"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L798-L820"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.Headers","parameters":"(self)","argument_list":"","return_statement":"return self._headers","docstring":"Determines if Headers were set for this specific site.\n Returns the string representing the Headers using the\n _headers instance variable or returns None if the instance\n variable is empty or not set.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representation of the Headers from the _headers\n instance variable.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Determines if Headers were set for this specific site.\n Returns the string representing the Headers using the\n _headers instance variable or returns None if the instance\n variable is empty or not set.","docstring_tokens":["Determines","if","Headers","were","set","for","this","specific","site",".","Returns","the","string","representing","the","Headers","using","the","_headers","instance","variable","or","returns","None","if","the","instance","variable","is","empty","or","not","set","."],"function":"def Headers(self):\n \"\"\"\n Determines if Headers were set for this specific site.\n Returns the string representing the Headers using the\n _headers instance variable or returns None if the instance\n variable is empty or not set.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representation of the Headers from the _headers\n instance variable.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n if self._headers is None:\n return None\n if len(self._headers) == 0:\n return None\n return self._headers","function_tokens":["def","Headers","(","self",")",":","if","self",".","_headers","is","None",":","return","None","if","len","(","self",".","_headers",")","==","0",":","return","None","return","self",".","_headers"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L823-L844"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.Headers","parameters":"(self, headers)","argument_list":"","return_statement":"","docstring":"Determines if Headers were required for this specific site.\n If web Headers were set, this places the target into the\n headers where required or marked with the %TARGET% keyword\n in the xml config file.\n\n Argument(s):\n headers -- dictionary representing web Headers required.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n This Method is tagged as a Setter.","docstring_summary":"Determines if Headers were required for this specific site.\n If web Headers were set, this places the target into the\n headers where required or marked with the %TARGET% keyword\n in the xml config file.","docstring_tokens":["Determines","if","Headers","were","required","for","this","specific","site",".","If","web","Headers","were","set","this","places","the","target","into","the","headers","where","required","or","marked","with","the","%TARGET%","keyword","in","the","xml","config","file","."],"function":"def Headers(self, headers):\n \"\"\"\n Determines if Headers were required for this specific site.\n If web Headers were set, this places the target into the\n headers where required or marked with the %TARGET% keyword\n in the xml config file.\n\n Argument(s):\n headers -- dictionary representing web Headers required.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n This Method is tagged as a Setter.\n \"\"\"\n if len(headers) > 0:\n for key in headers:\n if headers[key] == \"%TARGET%\":\n headers[key] = self._target\n self._headers = headers\n else:\n self._headers = None","function_tokens":["def","Headers","(","self",",","headers",")",":","if","len","(","headers",")",">","0",":","for","key","in","headers",":","if","headers","[","key","]","==","\"%TARGET%\"",":","headers","[","key","]","=","self",".","_target","self",".","_headers","=","headers","else",":","self",".","_headers","=","None"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L847-L869"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.PostData","parameters":"(self)","argument_list":"","return_statement":"return self._postdata","docstring":"Determines if PostData was set for this specific site.\n Returns the dict representing the PostHeaders using the\n _postdata instance variable or returns None if the instance\n variable is empty or not set.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n dict -- representation of the PostData from the _postdata\n instance variable.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Determines if PostData was set for this specific site.\n Returns the dict representing the PostHeaders using the\n _postdata instance variable or returns None if the instance\n variable is empty or not set.","docstring_tokens":["Determines","if","PostData","was","set","for","this","specific","site",".","Returns","the","dict","representing","the","PostHeaders","using","the","_postdata","instance","variable","or","returns","None","if","the","instance","variable","is","empty","or","not","set","."],"function":"def PostData(self):\n \"\"\"\n Determines if PostData was set for this specific site.\n Returns the dict representing the PostHeaders using the\n _postdata instance variable or returns None if the instance\n variable is empty or not set.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n dict -- representation of the PostData from the _postdata\n instance variable.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n if self._postdata is None:\n return None\n if len(self._postdata) == 0:\n return None\n return self._postdata","function_tokens":["def","PostData","(","self",")",":","if","self",".","_postdata","is","None",":","return","None","if","len","(","self",".","_postdata",")","==","0",":","return","None","return","self",".","_postdata"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L872-L893"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.PostData","parameters":"(self, postdata)","argument_list":"","return_statement":"","docstring":"Determines if post data was required for this specific site.\n If postdata is set, this ensures %TARGET% is stripped if necessary.\n\n Argument(s):\n postdata -- dictionary representing web postdata required.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n This Method is tagged as a Setter.","docstring_summary":"Determines if post data was required for this specific site.\n If postdata is set, this ensures %TARGET% is stripped if necessary.","docstring_tokens":["Determines","if","post","data","was","required","for","this","specific","site",".","If","postdata","is","set","this","ensures","%TARGET%","is","stripped","if","necessary","."],"function":"def PostData(self, postdata):\n \"\"\"\n Determines if post data was required for this specific site.\n If postdata is set, this ensures %TARGET% is stripped if necessary.\n\n Argument(s):\n postdata -- dictionary representing web postdata required.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n This Method is tagged as a Setter.\n \"\"\"\n if len(postdata) > 0:\n for key in postdata:\n if postdata[key] == \"%TARGET%\":\n postdata[key] = self._target\n self._postdata = postdata\n else:\n self._postdata = None","function_tokens":["def","PostData","(","self",",","postdata",")",":","if","len","(","postdata",")",">","0",":","for","key","in","postdata",":","if","postdata","[","key","]","==","\"%TARGET%\"",":","postdata","[","key","]","=","self",".","_target","self",".","_postdata","=","postdata","else",":","self",".","_postdata","=","None"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L896-L916"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.Target","parameters":"(self)","argument_list":"","return_statement":"return self._target","docstring":"Returns string representing the target being investigated.\n The string may be an IP Address, MD5 hash, or hostname.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representation of the Target from the _target\n instance variable.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Returns string representing the target being investigated.\n The string may be an IP Address, MD5 hash, or hostname.","docstring_tokens":["Returns","string","representing","the","target","being","investigated",".","The","string","may","be","an","IP","Address","MD5","hash","or","hostname","."],"function":"def Target(self):\n \"\"\"\n Returns string representing the target being investigated.\n The string may be an IP Address, MD5 hash, or hostname.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representation of the Target from the _target\n instance variable.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n return self._target","function_tokens":["def","Target","(","self",")",":","return","self",".","_target"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L919-L934"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.UserAgent","parameters":"(self)","argument_list":"","return_statement":"return self._userAgent","docstring":"Returns string representing the user-agent that will\n be used when requesting or submitting information to\n a web site. This is a user-provided string implemented\n on the command line at execution or provided by default\n if not added during execution.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representation of the UserAgent from the _userAgent\n instance variable.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Returns string representing the user-agent that will\n be used when requesting or submitting information to\n a web site. This is a user-provided string implemented\n on the command line at execution or provided by default\n if not added during execution.","docstring_tokens":["Returns","string","representing","the","user","-","agent","that","will","be","used","when","requesting","or","submitting","information","to","a","web","site",".","This","is","a","user","-","provided","string","implemented","on","the","command","line","at","execution","or","provided","by","default","if","not","added","during","execution","."],"function":"def UserAgent(self):\n \"\"\"\n Returns string representing the user-agent that will\n be used when requesting or submitting information to\n a web site. This is a user-provided string implemented\n on the command line at execution or provided by default\n if not added during execution.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representation of the UserAgent from the _userAgent\n instance variable.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n return self._userAgent","function_tokens":["def","UserAgent","(","self",")",":","return","self",".","_userAgent"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L937-L955"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.Method","parameters":"(self)","argument_list":"","return_statement":"return self._method","docstring":"Determines if a method (GET or POST) was established for this specific site.\n Defaults to GET\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representation of the method used to access the site GET or POST.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Determines if a method (GET or POST) was established for this specific site.\n Defaults to GET","docstring_tokens":["Determines","if","a","method","(","GET","or","POST",")","was","established","for","this","specific","site",".","Defaults","to","GET"],"function":"def Method(self):\n \"\"\"\n Determines if a method (GET or POST) was established for this specific site.\n Defaults to GET\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string -- representation of the method used to access the site GET or POST.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n if self._method is None:\n return \"GET\"\n if len(self._method) == 0:\n return \"GET\"\n return self._method","function_tokens":["def","Method","(","self",")",":","if","self",".","_method","is","None",":","return","\"GET\"","if","len","(","self",".","_method",")","==","0",":","return","\"GET\"","return","self",".","_method"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L958-L976"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.Method","parameters":"(self, method)","argument_list":"","return_statement":"","docstring":"Ensures the method type is set to either GET or POST. By default GET is assigned\n\n Argument(s):\n method -- string repr GET or POST. If neither, GET is assigned.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n This Method is tagged as a Setter.","docstring_summary":"Ensures the method type is set to either GET or POST. By default GET is assigned","docstring_tokens":["Ensures","the","method","type","is","set","to","either","GET","or","POST",".","By","default","GET","is","assigned"],"function":"def Method(self, method):\n \"\"\"\n Ensures the method type is set to either GET or POST. By default GET is assigned\n\n Argument(s):\n method -- string repr GET or POST. If neither, GET is assigned.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n This Method is tagged as a Setter.\n \"\"\"\n if not self.PostData:\n self._method = \"GET\"\n return\n if len(method) > 0:\n if method.upper() == \"GET\" or method.upper() == \"POST\":\n self._method = method.upper()\n return\n\n self._method = \"GET\"","function_tokens":["def","Method","(","self",",","method",")",":","if","not","self",".","PostData",":","self",".","_method","=","\"GET\"","return","if","len","(","method",")",">","0",":","if","method",".","upper","(",")","==","\"GET\"","or","method",".","upper","(",")","==","\"POST\"",":","self",".","_method","=","method",".","upper","(",")","return","self",".","_method","=","\"GET\""],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L979-L1000"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.Results","parameters":"(self)","argument_list":"","return_statement":"return self._results","docstring":"Checks the instance variable _results is empty or None.\n Returns _results (the results list) or None if it is empty.\n Argument(s):\n No arguments are required.\n Return value(s):\n list -- list of results discovered from the site being investigated.\n None -- if _results is empty or None.\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Checks the instance variable _results is empty or None.\n Returns _results (the results list) or None if it is empty.\n Argument(s):\n No arguments are required.\n Return value(s):\n list -- list of results discovered from the site being investigated.\n None -- if _results is empty or None.\n Restriction(s):\n This Method is tagged as a Property.","docstring_tokens":["Checks","the","instance","variable","_results","is","empty","or","None",".","Returns","_results","(","the","results","list",")","or","None","if","it","is","empty",".","Argument","(","s",")",":","No","arguments","are","required",".","Return","value","(","s",")",":","list","--","list","of","results","discovered","from","the","site","being","investigated",".","None","--","if","_results","is","empty","or","None",".","Restriction","(","s",")",":","This","Method","is","tagged","as","a","Property","."],"function":"def Results(self):\n \"\"\"\n Checks the instance variable _results is empty or None.\n Returns _results (the results list) or None if it is empty.\n Argument(s):\n No arguments are required.\n Return value(s):\n list -- list of results discovered from the site being investigated.\n None -- if _results is empty or None.\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n if self._results is None or len(self._results) == 0:\n return None\n return self._results","function_tokens":["def","Results","(","self",")",":","if","self",".","_results","is","None","or","len","(","self",".","_results",")","==","0",":","return","None","return","self",".","_results"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1003-L1017"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.addResults","parameters":"(self, results)","argument_list":"","return_statement":"","docstring":"Assigns the argument to the _results instance variable to build\n the list or results retrieved from the site. Assign None to the\n _results instance variable if the argument is empty.\n\n Argument(s):\n results -- list of results retrieved from the site.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Assigns the argument to the _results instance variable to build\n the list or results retrieved from the site. Assign None to the\n _results instance variable if the argument is empty.","docstring_tokens":["Assigns","the","argument","to","the","_results","instance","variable","to","build","the","list","or","results","retrieved","from","the","site",".","Assign","None","to","the","_results","instance","variable","if","the","argument","is","empty","."],"function":"def addResults(self, results):\n \"\"\"\n Assigns the argument to the _results instance variable to build\n the list or results retrieved from the site. Assign None to the\n _results instance variable if the argument is empty.\n\n Argument(s):\n results -- list of results retrieved from the site.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n if results is None or len(results) == 0:\n self._results = None\n else:\n self._results = results","function_tokens":["def","addResults","(","self",",","results",")",":","if","results","is","None","or","len","(","results",")","==","0",":","self",".","_results","=","None","else",":","self",".","_results","=","results"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1019-L1037"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.postMessage","parameters":"(self, message)","argument_list":"","return_statement":"","docstring":"Prints multiple messages to inform the user of progress.\n\n Argument(s):\n message -- string to be utilized as a message to post.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Prints multiple messages to inform the user of progress.","docstring_tokens":["Prints","multiple","messages","to","inform","the","user","of","progress","."],"function":"def postMessage(self, message):\n \"\"\"\n Prints multiple messages to inform the user of progress.\n\n Argument(s):\n message -- string to be utilized as a message to post.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n if self.BotOutputRequested:\n pass\n else:\n SiteDetailOutput.PrintStandardOutput(message, verbose=self._verbose)","function_tokens":["def","postMessage","(","self",",","message",")",":","if","self",".","BotOutputRequested",":","pass","else",":","SiteDetailOutput",".","PrintStandardOutput","(","message",",","verbose","=","self",".","_verbose",")"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1039-L1055"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.postErrorMessage","parameters":"(self, message)","argument_list":"","return_statement":"","docstring":"Prints multiple error messages to inform the user of progress.\n\n Argument(s):\n message -- string to be utilized as an error message to post.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Prints multiple error messages to inform the user of progress.","docstring_tokens":["Prints","multiple","error","messages","to","inform","the","user","of","progress","."],"function":"def postErrorMessage(self, message):\n \"\"\"\n Prints multiple error messages to inform the user of progress.\n\n Argument(s):\n message -- string to be utilized as an error message to post.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n self.postMessage(message)","function_tokens":["def","postErrorMessage","(","self",",","message",")",":","self",".","postMessage","(","message",")"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1057-L1070"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.getImportantProperty","parameters":"(self, index)","argument_list":"","return_statement":"return siteimpprop()","docstring":"Gets the property information from the property value listed in the\n xml file for that specific site in the importantproperty xml tag.\n This Method allows for the property that will be printed to be changed\n using the configuration file.\n Returns the return value listed in the property attribute discovered.\n\n Argument(s):\n index -- integer representing which important property is retrieved if\n more than one important property value is listed in the config file.\n\n Return value(s):\n Multiple options -- returns the return value of the property listed in\n the config file. Most likely a string or a list.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Gets the property information from the property value listed in the\n xml file for that specific site in the importantproperty xml tag.\n This Method allows for the property that will be printed to be changed\n using the configuration file.\n Returns the return value listed in the property attribute discovered.","docstring_tokens":["Gets","the","property","information","from","the","property","value","listed","in","the","xml","file","for","that","specific","site","in","the","importantproperty","xml","tag",".","This","Method","allows","for","the","property","that","will","be","printed","to","be","changed","using","the","configuration","file",".","Returns","the","return","value","listed","in","the","property","attribute","discovered","."],"function":"def getImportantProperty(self, index):\n \"\"\"\n Gets the property information from the property value listed in the\n xml file for that specific site in the importantproperty xml tag.\n This Method allows for the property that will be printed to be changed\n using the configuration file.\n Returns the return value listed in the property attribute discovered.\n\n Argument(s):\n index -- integer representing which important property is retrieved if\n more than one important property value is listed in the config file.\n\n Return value(s):\n Multiple options -- returns the return value of the property listed in\n the config file. Most likely a string or a list.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n if isinstance(self._importantProperty, basestring):\n siteimpprop = getattr(self, \"get\" + self._importantProperty, Site.getResults)\n else:\n siteimpprop = getattr(self, \"get\" + self._importantProperty[index], Site.getResults)\n return siteimpprop()","function_tokens":["def","getImportantProperty","(","self",",","index",")",":","if","isinstance","(","self",".","_importantProperty",",","basestring",")",":","siteimpprop","=","getattr","(","self",",","\"get\"","+","self",".","_importantProperty",",","Site",".","getResults",")","else",":","siteimpprop","=","getattr","(","self",",","\"get\"","+","self",".","_importantProperty","[","index","]",",","Site",".","getResults",")","return","siteimpprop","(",")"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1072-L1095"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.getTarget","parameters":"(self)","argument_list":"","return_statement":"return self.Target","docstring":"Returns the Target property information.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Returns the Target property information.","docstring_tokens":["Returns","the","Target","property","information","."],"function":"def getTarget(self):\n \"\"\"\n Returns the Target property information.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n return self.Target","function_tokens":["def","getTarget","(","self",")",":","return","self",".","Target"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1097-L1110"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.getResults","parameters":"(self)","argument_list":"","return_statement":"return self.Results","docstring":"Returns the Results property information.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Returns the Results property information.","docstring_tokens":["Returns","the","Results","property","information","."],"function":"def getResults(self):\n \"\"\"\n Returns the Results property information.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n return self.Results","function_tokens":["def","getResults","(","self",")",":","return","self",".","Results"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1112-L1125"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.getFullURL","parameters":"(self)","argument_list":"","return_statement":"return self.FullURL","docstring":"Returns the FullURL property information.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Returns the FullURL property information.","docstring_tokens":["Returns","the","FullURL","property","information","."],"function":"def getFullURL(self):\n \"\"\"\n Returns the FullURL property information.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n return self.FullURL","function_tokens":["def","getFullURL","(","self",")",":","return","self",".","FullURL"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1127-L1140"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.getSourceURL","parameters":"(self)","argument_list":"","return_statement":"return self.SourceURL","docstring":"Returns the SourceURL property information.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Returns the SourceURL property information.","docstring_tokens":["Returns","the","SourceURL","property","information","."],"function":"def getSourceURL(self):\n \"\"\"\n Returns the SourceURL property information.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n return self.SourceURL","function_tokens":["def","getSourceURL","(","self",")",":","return","self",".","SourceURL"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1142-L1155"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.getWebScrape","parameters":"(self)","argument_list":"","return_statement":"","docstring":"Attempts to retrieve a string from a web site. String retrieved is\n the entire web site including HTML markup. Requests via proxy if\n --proxy option was chosen during execution of the Automater.\n Returns the string representing the entire web site including the\n HTML markup retrieved from the site.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Attempts to retrieve a string from a web site. String retrieved is\n the entire web site including HTML markup. Requests via proxy if\n --proxy option was chosen during execution of the Automater.\n Returns the string representing the entire web site including the\n HTML markup retrieved from the site.","docstring_tokens":["Attempts","to","retrieve","a","string","from","a","web","site",".","String","retrieved","is","the","entire","web","site","including","HTML","markup",".","Requests","via","proxy","if","--","proxy","option","was","chosen","during","execution","of","the","Automater",".","Returns","the","string","representing","the","entire","web","site","including","the","HTML","markup","retrieved","from","the","site","."],"function":"def getWebScrape(self):\n \"\"\"\n Attempts to retrieve a string from a web site. String retrieved is\n the entire web site including HTML markup. Requests via proxy if\n --proxy option was chosen during execution of the Automater.\n Returns the string representing the entire web site including the\n HTML markup retrieved from the site.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n string.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n delay = self.WebRetrieveDelay\n headers, params, proxy = self.getHeaderParamProxyInfo()\n try:\n time.sleep(delay)\n resp = requests.get(self.FullURL, headers=headers, params=params, proxies=proxy, verify=False, timeout=5)\n return str(resp.content)\n except ConnectionError as ce:\n try:\n self.postErrorMessage('[-] Cannot connect to {url}. Server response is {resp} Server error code is {code}'.\n format(url=self.FullURL, resp=ce.message[0], code=ce.message[1][0]))\n except:\n self.postErrorMessage('[-] Cannot connect to ' + self.FullURL)\n except:\n self.postErrorMessage('[-] Cannot connect to ' + self.FullURL)","function_tokens":["def","getWebScrape","(","self",")",":","delay","=","self",".","WebRetrieveDelay","headers",",","params",",","proxy","=","self",".","getHeaderParamProxyInfo","(",")","try",":","time",".","sleep","(","delay",")","resp","=","requests",".","get","(","self",".","FullURL",",","headers","=","headers",",","params","=","params",",","proxies","=","proxy",",","verify","=","False",",","timeout","=","5",")","return","str","(","resp",".","content",")","except","ConnectionError","as","ce",":","try",":","self",".","postErrorMessage","(","'[-] Cannot connect to {url}. Server response is {resp} Server error code is {code}'",".","format","(","url","=","self",".","FullURL",",","resp","=","ce",".","message","[","0","]",",","code","=","ce",".","message","[","1","]","[","0","]",")",")","except",":","self",".","postErrorMessage","(","'[-] Cannot connect to '","+","self",".","FullURL",")","except",":","self",".","postErrorMessage","(","'[-] Cannot connect to '","+","self",".","FullURL",")"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1173-L1203"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.addMultiResults","parameters":"(self, results, index)","argument_list":"","return_statement":"","docstring":"Assigns the argument to the _results instance variable to build\n the list or results retrieved from the site. Assign None to the\n _results instance variable if the argument is empty.\n\n Argument(s):\n results -- list of results retrieved from the site.\n index -- integer value representing the index of the result found.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Assigns the argument to the _results instance variable to build\n the list or results retrieved from the site. Assign None to the\n _results instance variable if the argument is empty.","docstring_tokens":["Assigns","the","argument","to","the","_results","instance","variable","to","build","the","list","or","results","retrieved","from","the","site",".","Assign","None","to","the","_results","instance","variable","if","the","argument","is","empty","."],"function":"def addMultiResults(self, results, index):\n \"\"\"\n Assigns the argument to the _results instance variable to build\n the list or results retrieved from the site. Assign None to the\n _results instance variable if the argument is empty.\n\n Argument(s):\n results -- list of results retrieved from the site.\n index -- integer value representing the index of the result found.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n # if no return from site, seed the results with an empty list\n if results is None or len(results) == 0:\n self._results[index] = None\n else:\n self._results[index] = results","function_tokens":["def","addMultiResults","(","self",",","results",",","index",")",":","# if no return from site, seed the results with an empty list","if","results","is","None","or","len","(","results",")","==","0",":","self",".","_results","[","index","]","=","None","else",":","self",".","_results","[","index","]","=","results"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1205-L1225"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"Site.submitPost","parameters":"(self)","argument_list":"","return_statement":"","docstring":"Submits information to a web site being used as a resource that\n requires a post of information. Submits via proxy if --proxy\n option was chosen during execution of the Automater.\n Returns a string that contains entire web site being used as a\n resource including HTML markup information.\n\n Argument(s):\n raw_params -- string info detailing parameters provided from\n xml configuration file in the params XML tag.\n headers -- string info detailing headers provided from\n xml configuration file in the headers XML tag.\n\n Return value(s):\n string -- contains entire web site being used as a\n resource including HTML markup information.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Submits information to a web site being used as a resource that\n requires a post of information. Submits via proxy if --proxy\n option was chosen during execution of the Automater.\n Returns a string that contains entire web site being used as a\n resource including HTML markup information.","docstring_tokens":["Submits","information","to","a","web","site","being","used","as","a","resource","that","requires","a","post","of","information",".","Submits","via","proxy","if","--","proxy","option","was","chosen","during","execution","of","the","Automater",".","Returns","a","string","that","contains","entire","web","site","being","used","as","a","resource","including","HTML","markup","information","."],"function":"def submitPost(self):\n \"\"\"\n Submits information to a web site being used as a resource that\n requires a post of information. Submits via proxy if --proxy\n option was chosen during execution of the Automater.\n Returns a string that contains entire web site being used as a\n resource including HTML markup information.\n\n Argument(s):\n raw_params -- string info detailing parameters provided from\n xml configuration file in the params XML tag.\n headers -- string info detailing headers provided from\n xml configuration file in the headers XML tag.\n\n Return value(s):\n string -- contains entire web site being used as a\n resource including HTML markup information.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n headers, params, proxy = self.getHeaderParamProxyInfo()\n try:\n resp = requests.post(self.FullURL, data=self.PostData, headers=headers, params=params, proxies=proxy, verify=False)\n return str(resp.content)\n except ConnectionError as ce:\n try:\n self.postErrorMessage('[-] Cannot connect to {url}. Server response is {resp} Server error code is {code}'.\n format(url=self.FullURL, resp=ce.message[0], code=ce.message[1][0]))\n except:\n self.postErrorMessage('[-] Cannot connect to ' + self.FullURL)\n except:\n self.postErrorMessage('[-] Cannot connect to ' + self.FullURL)","function_tokens":["def","submitPost","(","self",")",":","headers",",","params",",","proxy","=","self",".","getHeaderParamProxyInfo","(",")","try",":","resp","=","requests",".","post","(","self",".","FullURL",",","data","=","self",".","PostData",",","headers","=","headers",",","params","=","params",",","proxies","=","proxy",",","verify","=","False",")","return","str","(","resp",".","content",")","except","ConnectionError","as","ce",":","try",":","self",".","postErrorMessage","(","'[-] Cannot connect to {url}. Server response is {resp} Server error code is {code}'",".","format","(","url","=","self",".","FullURL",",","resp","=","ce",".","message","[","0","]",",","code","=","ce",".","message","[","1","]","[","0","]",")",")","except",":","self",".","postErrorMessage","(","'[-] Cannot connect to '","+","self",".","FullURL",")","except",":","self",".","postErrorMessage","(","'[-] Cannot connect to '","+","self",".","FullURL",")"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1227-L1259"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"SingleResultsSite.__init__","parameters":"(self, site)","argument_list":"","return_statement":"","docstring":"Class constructor. Assigns a site from the parameter into the _site\n instance variable. This is a play on the decorator pattern.\n\n Argument(s):\n site -- the site that we will decorate.\n\n Return value(s):\n Nothing is returned from this Method.","docstring_summary":"Class constructor. Assigns a site from the parameter into the _site\n instance variable. This is a play on the decorator pattern.","docstring_tokens":["Class","constructor",".","Assigns","a","site","from","the","parameter","into","the","_site","instance","variable",".","This","is","a","play","on","the","decorator","pattern","."],"function":"def __init__(self, site):\n \"\"\"\n Class constructor. Assigns a site from the parameter into the _site\n instance variable. This is a play on the decorator pattern.\n\n Argument(s):\n site -- the site that we will decorate.\n\n Return value(s):\n Nothing is returned from this Method.\n \"\"\"\n self._site = site\n super(SingleResultsSite, self).__init__(self._site.URL, self._site.WebRetrieveDelay, self._site.Proxy,\n self._site.TargetType, self._site.ReportStringForResult,\n self._site.Target, self._site.UserAgent, self._site.FriendlyName,\n self._site.RegEx, self._site.FullURL, self._site.BotOutputRequested,\n self._site.ImportantPropertyString, self._site.Params,\n self._site.Headers, self._site.Method, self._site.PostData,\n site._verbose)\n self.postMessage(self.UserMessage + \" \" + self.FullURL)\n websitecontent = self.getContentList(self.getWebScrape())\n if websitecontent:\n self.addResults(websitecontent)","function_tokens":["def","__init__","(","self",",","site",")",":","self",".","_site","=","site","super","(","SingleResultsSite",",","self",")",".","__init__","(","self",".","_site",".","URL",",","self",".","_site",".","WebRetrieveDelay",",","self",".","_site",".","Proxy",",","self",".","_site",".","TargetType",",","self",".","_site",".","ReportStringForResult",",","self",".","_site",".","Target",",","self",".","_site",".","UserAgent",",","self",".","_site",".","FriendlyName",",","self",".","_site",".","RegEx",",","self",".","_site",".","FullURL",",","self",".","_site",".","BotOutputRequested",",","self",".","_site",".","ImportantPropertyString",",","self",".","_site",".","Params",",","self",".","_site",".","Headers",",","self",".","_site",".","Method",",","self",".","_site",".","PostData",",","site",".","_verbose",")","self",".","postMessage","(","self",".","UserMessage","+","\" \"","+","self",".","FullURL",")","websitecontent","=","self",".","getContentList","(","self",".","getWebScrape","(",")",")","if","websitecontent",":","self",".","addResults","(","websitecontent",")"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1274-L1296"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"SingleResultsSite.getContentList","parameters":"(self, webcontent)","argument_list":"","return_statement":"","docstring":"Retrieves a list of information retrieved from the sites defined\n in the xml configuration file.\n Returns the list of found information from the sites being used\n as resources or returns None if the site cannot be discovered.\n\n Argument(s):\n webcontent -- actual content of the web page that's been returned\n from a request.\n\n Return value(s):\n list -- information found from a web site being used as a resource.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Retrieves a list of information retrieved from the sites defined\n in the xml configuration file.\n Returns the list of found information from the sites being used\n as resources or returns None if the site cannot be discovered.","docstring_tokens":["Retrieves","a","list","of","information","retrieved","from","the","sites","defined","in","the","xml","configuration","file",".","Returns","the","list","of","found","information","from","the","sites","being","used","as","resources","or","returns","None","if","the","site","cannot","be","discovered","."],"function":"def getContentList(self, webcontent):\n \"\"\"\n Retrieves a list of information retrieved from the sites defined\n in the xml configuration file.\n Returns the list of found information from the sites being used\n as resources or returns None if the site cannot be discovered.\n\n Argument(s):\n webcontent -- actual content of the web page that's been returned\n from a request.\n\n Return value(s):\n list -- information found from a web site being used as a resource.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n try:\n repattern = re.compile(self.RegEx, re.IGNORECASE)\n foundlist = re.findall(repattern, webcontent)\n return foundlist\n except:\n self.postErrorMessage(self.ErrorMessage + \" \" + self.FullURL)\n return None","function_tokens":["def","getContentList","(","self",",","webcontent",")",":","try",":","repattern","=","re",".","compile","(","self",".","RegEx",",","re",".","IGNORECASE",")","foundlist","=","re",".","findall","(","repattern",",","webcontent",")","return","foundlist","except",":","self",".","postErrorMessage","(","self",".","ErrorMessage","+","\" \"","+","self",".","FullURL",")","return","None"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1298-L1321"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"MultiResultsSite.__init__","parameters":"(self, site)","argument_list":"","return_statement":"","docstring":"Class constructor. Assigns a site from the parameter into the _site\n instance variable. This is a play on the decorator pattern.\n\n Argument(s):\n site -- the site that we will decorate.\n\n Return value(s):\n Nothing is returned from this Method.","docstring_summary":"Class constructor. Assigns a site from the parameter into the _site\n instance variable. This is a play on the decorator pattern.","docstring_tokens":["Class","constructor",".","Assigns","a","site","from","the","parameter","into","the","_site","instance","variable",".","This","is","a","play","on","the","decorator","pattern","."],"function":"def __init__(self, site):\n \"\"\"\n Class constructor. Assigns a site from the parameter into the _site\n instance variable. This is a play on the decorator pattern.\n\n Argument(s):\n site -- the site that we will decorate.\n\n Return value(s):\n Nothing is returned from this Method.\n \"\"\"\n self._site = site\n super(MultiResultsSite, self).__init__(self._site.URL, self._site.WebRetrieveDelay,\n self._site.Proxy, self._site.TargetType,\n self._site.ReportStringForResult, self._site.Target,\n self._site.UserAgent, self._site.FriendlyName,\n self._site.RegEx, self._site.FullURL, self._site.BotOutputRequested,\n self._site.ImportantPropertyString, self._site.Params,\n self._site.Headers, self._site.Method, self._site.PostData, site._verbose)\n self._results = [[] for x in xrange(len(self._site.RegEx))]\n self.postMessage(self.UserMessage + \" \" + self.FullURL)\n\n webcontent = self.getWebScrape()\n for index in xrange(len(self.RegEx)):\n websitecontent = self.getContentList(webcontent, index)\n if websitecontent:\n self.addMultiResults(websitecontent, index)","function_tokens":["def","__init__","(","self",",","site",")",":","self",".","_site","=","site","super","(","MultiResultsSite",",","self",")",".","__init__","(","self",".","_site",".","URL",",","self",".","_site",".","WebRetrieveDelay",",","self",".","_site",".","Proxy",",","self",".","_site",".","TargetType",",","self",".","_site",".","ReportStringForResult",",","self",".","_site",".","Target",",","self",".","_site",".","UserAgent",",","self",".","_site",".","FriendlyName",",","self",".","_site",".","RegEx",",","self",".","_site",".","FullURL",",","self",".","_site",".","BotOutputRequested",",","self",".","_site",".","ImportantPropertyString",",","self",".","_site",".","Params",",","self",".","_site",".","Headers",",","self",".","_site",".","Method",",","self",".","_site",".","PostData",",","site",".","_verbose",")","self",".","_results","=","[","[","]","for","x","in","xrange","(","len","(","self",".","_site",".","RegEx",")",")","]","self",".","postMessage","(","self",".","UserMessage","+","\" \"","+","self",".","FullURL",")","webcontent","=","self",".","getWebScrape","(",")","for","index","in","xrange","(","len","(","self",".","RegEx",")",")",":","websitecontent","=","self",".","getContentList","(","webcontent",",","index",")","if","websitecontent",":","self",".","addMultiResults","(","websitecontent",",","index",")"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1337-L1363"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"MultiResultsSite.getContentList","parameters":"(self, webcontent, index)","argument_list":"","return_statement":"","docstring":"Retrieves a list of information retrieved from the sites defined\n in the xml configuration file.\n Returns the list of found information from the sites being used\n as resources or returns None if the site cannot be discovered.\n\n Argument(s):\n webcontent -- actual content of the web page that's been returned\n from a request.\n index -- the integer representing the index of the regex list.\n\n Return value(s):\n list -- information found from a web site being used as a resource.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Retrieves a list of information retrieved from the sites defined\n in the xml configuration file.\n Returns the list of found information from the sites being used\n as resources or returns None if the site cannot be discovered.","docstring_tokens":["Retrieves","a","list","of","information","retrieved","from","the","sites","defined","in","the","xml","configuration","file",".","Returns","the","list","of","found","information","from","the","sites","being","used","as","resources","or","returns","None","if","the","site","cannot","be","discovered","."],"function":"def getContentList(self, webcontent, index):\n \"\"\"\n Retrieves a list of information retrieved from the sites defined\n in the xml configuration file.\n Returns the list of found information from the sites being used\n as resources or returns None if the site cannot be discovered.\n\n Argument(s):\n webcontent -- actual content of the web page that's been returned\n from a request.\n index -- the integer representing the index of the regex list.\n\n Return value(s):\n list -- information found from a web site being used as a resource.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n try:\n repattern = re.compile(self.RegEx[index], re.IGNORECASE)\n foundlist = re.findall(repattern, webcontent)\n return foundlist\n except:\n self.postErrorMessage(self.ErrorMessage + \" \" + self.FullURL)\n return None","function_tokens":["def","getContentList","(","self",",","webcontent",",","index",")",":","try",":","repattern","=","re",".","compile","(","self",".","RegEx","[","index","]",",","re",".","IGNORECASE",")","foundlist","=","re",".","findall","(","repattern",",","webcontent",")","return","foundlist","except",":","self",".","postErrorMessage","(","self",".","ErrorMessage","+","\" \"","+","self",".","FullURL",")","return","None"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1365-L1389"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"MethodPostSite.__init__","parameters":"(self, site)","argument_list":"","return_statement":"","docstring":"Class constructor. Assigns a site from the parameter into the _site\n instance variable. This is a play on the decorator pattern. Also\n assigns the postbydefault parameter to the _postByDefault instance\n variable to determine if the Automater should post information\n to a site. By default Automater will NOT post information.\n\n Argument(s):\n site -- the site that we will decorate.\n postbydefault -- a Boolean representing whether a post will occur.\n\n Return value(s):\n Nothing is returned from this Method.","docstring_summary":"Class constructor. Assigns a site from the parameter into the _site\n instance variable. This is a play on the decorator pattern. Also\n assigns the postbydefault parameter to the _postByDefault instance\n variable to determine if the Automater should post information\n to a site. By default Automater will NOT post information.","docstring_tokens":["Class","constructor",".","Assigns","a","site","from","the","parameter","into","the","_site","instance","variable",".","This","is","a","play","on","the","decorator","pattern",".","Also","assigns","the","postbydefault","parameter","to","the","_postByDefault","instance","variable","to","determine","if","the","Automater","should","post","information","to","a","site",".","By","default","Automater","will","NOT","post","information","."],"function":"def __init__(self, site):\n \"\"\"\n Class constructor. Assigns a site from the parameter into the _site\n instance variable. This is a play on the decorator pattern. Also\n assigns the postbydefault parameter to the _postByDefault instance\n variable to determine if the Automater should post information\n to a site. By default Automater will NOT post information.\n\n Argument(s):\n site -- the site that we will decorate.\n postbydefault -- a Boolean representing whether a post will occur.\n\n Return value(s):\n Nothing is returned from this Method.\n \"\"\"\n self._site = site\n super(MethodPostSite, self).__init__(self._site.URL, self._site.WebRetrieveDelay,\n self._site.Proxy, self._site.TargetType,\n self._site.ReportStringForResult,\n self._site.Target, self._site.UserAgent,\n self._site.FriendlyName,\n self._site.RegEx, self._site.FullURL,\n self._site.BotOutputRequested,\n self._site.ImportantPropertyString,\n self._site.Params, self._site.Headers,\n self._site.Method, self._site.PostData, site._verbose)\n self.postMessage(self.UserMessage + \" \" + self.FullURL)\n SiteDetailOutput.PrintStandardOutput('[-] {url} requires a submission for {target}. '\n 'Submitting now, this may take a moment.'.\n format(url=self._site.URL, target=self._site.Target),\n verbose=site._verbose)\n content = self.submitPost()\n if content:\n if not isinstance(self.FriendlyName, basestring): # this is a multi instance\n self._results = [[] for x in xrange(len(self.RegEx))]\n for index in range(len(self.RegEx)):\n self.addMultiResults(self.getContentList(content, index), index)\n else: # this is a single instance\n self.addResults(self.getContentList(content))","function_tokens":["def","__init__","(","self",",","site",")",":","self",".","_site","=","site","super","(","MethodPostSite",",","self",")",".","__init__","(","self",".","_site",".","URL",",","self",".","_site",".","WebRetrieveDelay",",","self",".","_site",".","Proxy",",","self",".","_site",".","TargetType",",","self",".","_site",".","ReportStringForResult",",","self",".","_site",".","Target",",","self",".","_site",".","UserAgent",",","self",".","_site",".","FriendlyName",",","self",".","_site",".","RegEx",",","self",".","_site",".","FullURL",",","self",".","_site",".","BotOutputRequested",",","self",".","_site",".","ImportantPropertyString",",","self",".","_site",".","Params",",","self",".","_site",".","Headers",",","self",".","_site",".","Method",",","self",".","_site",".","PostData",",","site",".","_verbose",")","self",".","postMessage","(","self",".","UserMessage","+","\" \"","+","self",".","FullURL",")","SiteDetailOutput",".","PrintStandardOutput","(","'[-] {url} requires a submission for {target}. '","'Submitting now, this may take a moment.'",".","format","(","url","=","self",".","_site",".","URL",",","target","=","self",".","_site",".","Target",")",",","verbose","=","site",".","_verbose",")","content","=","self",".","submitPost","(",")","if","content",":","if","not","isinstance","(","self",".","FriendlyName",",","basestring",")",":","# this is a multi instance","self",".","_results","=","[","[","]","for","x","in","xrange","(","len","(","self",".","RegEx",")",")","]","for","index","in","range","(","len","(","self",".","RegEx",")",")",":","self",".","addMultiResults","(","self",".","getContentList","(","content",",","index",")",",","index",")","else",":","# this is a single instance","self",".","addResults","(","self",".","getContentList","(","content",")",")"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1408-L1446"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"siteinfo.py","language":"python","identifier":"MethodPostSite.getContentList","parameters":"(self, content, index=-1)","argument_list":"","return_statement":"","docstring":"Retrieves a list of information retrieved from the sites defined\n in the xml configuration file.\n Returns the list of found information from the sites being used\n as resources or returns None if the site cannot be discovered.\n\n Argument(s):\n content -- string representation of the web site being used\n as a resource.\n index -- the integer representing the index of the regex list.\n\n Return value(s):\n list -- information found from a web site being used as a resource.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Retrieves a list of information retrieved from the sites defined\n in the xml configuration file.\n Returns the list of found information from the sites being used\n as resources or returns None if the site cannot be discovered.","docstring_tokens":["Retrieves","a","list","of","information","retrieved","from","the","sites","defined","in","the","xml","configuration","file",".","Returns","the","list","of","found","information","from","the","sites","being","used","as","resources","or","returns","None","if","the","site","cannot","be","discovered","."],"function":"def getContentList(self, content, index=-1):\n \"\"\"\n Retrieves a list of information retrieved from the sites defined\n in the xml configuration file.\n Returns the list of found information from the sites being used\n as resources or returns None if the site cannot be discovered.\n\n Argument(s):\n content -- string representation of the web site being used\n as a resource.\n index -- the integer representing the index of the regex list.\n\n Return value(s):\n list -- information found from a web site being used as a resource.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n try:\n if index == -1: # this is a return for a single instance site\n repattern = re.compile(self.RegEx, re.IGNORECASE)\n foundlist = re.findall(repattern, content)\n return foundlist\n else: # this is the return for a multisite\n repattern = re.compile(self.RegEx[index], re.IGNORECASE)\n foundlist = re.findall(repattern, content)\n return foundlist\n except:\n self.postErrorMessage(self.ErrorMessage + \" \" + self.FullURL)\n return None","function_tokens":["def","getContentList","(","self",",","content",",","index","=","-","1",")",":","try",":","if","index","==","-","1",":","# this is a return for a single instance site","repattern","=","re",".","compile","(","self",".","RegEx",",","re",".","IGNORECASE",")","foundlist","=","re",".","findall","(","repattern",",","content",")","return","foundlist","else",":","# this is the return for a multisite","repattern","=","re",".","compile","(","self",".","RegEx","[","index","]",",","re",".","IGNORECASE",")","foundlist","=","re",".","findall","(","repattern",",","content",")","return","foundlist","except",":","self",".","postErrorMessage","(","self",".","ErrorMessage","+","\" \"","+","self",".","FullURL",")","return","None"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/siteinfo.py#L1448-L1477"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"outputs.py","language":"python","identifier":"SiteDetailOutput.__init__","parameters":"(self,sitelist)","argument_list":"","return_statement":"","docstring":"Class constructor. Stores the incoming list of sites in the _listofsites list.\n\n Argument(s):\n sitelist -- list containing site result information to be printed.\n\n Return value(s):\n Nothing is returned from this Method.","docstring_summary":"Class constructor. Stores the incoming list of sites in the _listofsites list.","docstring_tokens":["Class","constructor",".","Stores","the","incoming","list","of","sites","in","the","_listofsites","list","."],"function":"def __init__(self,sitelist):\n \"\"\"\n Class constructor. Stores the incoming list of sites in the _listofsites list.\n\n Argument(s):\n sitelist -- list containing site result information to be printed.\n\n Return value(s):\n Nothing is returned from this Method.\n \"\"\"\n self._listofsites = []\n self._listofsites = sitelist","function_tokens":["def","__init__","(","self",",","sitelist",")",":","self",".","_listofsites","=","[","]","self",".","_listofsites","=","sitelist"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/outputs.py#L37-L48"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"outputs.py","language":"python","identifier":"SiteDetailOutput.ListOfSites","parameters":"(self)","argument_list":"","return_statement":"return self._listofsites","docstring":"Checks instance variable _listofsites for content.\n Returns _listofsites if it has content or None if it does not.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n _listofsites -- list containing list of site results if variable contains data.\n None -- if _listofsites is empty or not assigned.\n\n Restriction(s):\n This Method is tagged as a Property.","docstring_summary":"Checks instance variable _listofsites for content.\n Returns _listofsites if it has content or None if it does not.","docstring_tokens":["Checks","instance","variable","_listofsites","for","content",".","Returns","_listofsites","if","it","has","content","or","None","if","it","does","not","."],"function":"def ListOfSites(self):\n \"\"\"\n Checks instance variable _listofsites for content.\n Returns _listofsites if it has content or None if it does not.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n _listofsites -- list containing list of site results if variable contains data.\n None -- if _listofsites is empty or not assigned.\n\n Restriction(s):\n This Method is tagged as a Property.\n \"\"\"\n if self._listofsites is None or len(self._listofsites) == 0:\n return None\n return self._listofsites","function_tokens":["def","ListOfSites","(","self",")",":","if","self",".","_listofsites","is","None","or","len","(","self",".","_listofsites",")","==","0",":","return","None","return","self",".","_listofsites"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/outputs.py#L51-L68"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"outputs.py","language":"python","identifier":"SiteDetailOutput.createOutputInfo","parameters":"(self,parser)","argument_list":"","return_statement":"","docstring":"Checks parser information calls correct print methods based on parser requirements.\n Returns nothing.\n\n Argument(s):\n parser -- Parser object storing program input parameters used when program was run.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Checks parser information calls correct print methods based on parser requirements.\n Returns nothing.","docstring_tokens":["Checks","parser","information","calls","correct","print","methods","based","on","parser","requirements",".","Returns","nothing","."],"function":"def createOutputInfo(self,parser):\n \"\"\"\n Checks parser information calls correct print methods based on parser requirements.\n Returns nothing.\n\n Argument(s):\n parser -- Parser object storing program input parameters used when program was run.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n self.PrintToScreen(parser.hasBotOut())\n if parser.hasCEFOutFile():\n self.PrintToCEFFile(parser.CEFOutFile)\n if parser.hasTextOutFile():\n self.PrintToTextFile(parser.TextOutFile)\n if parser.hasHTMLOutFile():\n self.PrintToHTMLFile(parser.HTMLOutFile)\n if parser.hasCSVOutSet():\n self.PrintToCSVFile(parser.CSVOutFile)","function_tokens":["def","createOutputInfo","(","self",",","parser",")",":","self",".","PrintToScreen","(","parser",".","hasBotOut","(",")",")","if","parser",".","hasCEFOutFile","(",")",":","self",".","PrintToCEFFile","(","parser",".","CEFOutFile",")","if","parser",".","hasTextOutFile","(",")",":","self",".","PrintToTextFile","(","parser",".","TextOutFile",")","if","parser",".","hasHTMLOutFile","(",")",":","self",".","PrintToHTMLFile","(","parser",".","HTMLOutFile",")","if","parser",".","hasCSVOutSet","(",")",":","self",".","PrintToCSVFile","(","parser",".","CSVOutFile",")"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/outputs.py#L70-L92"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"outputs.py","language":"python","identifier":"SiteDetailOutput.PrintToScreen","parameters":"(self, printinbotformat)","argument_list":"","return_statement":"","docstring":"Calls correct function to ensure site information is printed to the user's standard output correctly.\n Returns nothing.\n\n Argument(s):\n printinbotformat -- True or False argument representing minimized output. True if minimized requested.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Calls correct function to ensure site information is printed to the user's standard output correctly.\n Returns nothing.","docstring_tokens":["Calls","correct","function","to","ensure","site","information","is","printed","to","the","user","s","standard","output","correctly",".","Returns","nothing","."],"function":"def PrintToScreen(self, printinbotformat):\n \"\"\"\n Calls correct function to ensure site information is printed to the user's standard output correctly.\n Returns nothing.\n\n Argument(s):\n printinbotformat -- True or False argument representing minimized output. True if minimized requested.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n\n if printinbotformat:\n self.PrintToScreenBot()\n else:\n self.PrintToScreenNormal()","function_tokens":["def","PrintToScreen","(","self",",","printinbotformat",")",":","if","printinbotformat",":","self",".","PrintToScreenBot","(",")","else",":","self",".","PrintToScreenNormal","(",")"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/outputs.py#L94-L112"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"outputs.py","language":"python","identifier":"SiteDetailOutput.PrintToScreenBot","parameters":"(self)","argument_list":"","return_statement":"","docstring":"Formats site information minimized and prints it to the user's standard output.\n Returns nothing.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Formats site information minimized and prints it to the user's standard output.\n Returns nothing.","docstring_tokens":["Formats","site","information","minimized","and","prints","it","to","the","user","s","standard","output",".","Returns","nothing","."],"function":"def PrintToScreenBot(self):\n \"\"\"\n Formats site information minimized and prints it to the user's standard output.\n Returns nothing.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n sites = sorted(self.ListOfSites, key=attrgetter('Target'))\n target = \"\"\n if sites is not None:\n for site in sites:\n if not isinstance(site._regex,basestring): # this is a multisite\n for index in range(len(site.RegEx)): # the regexs will ensure we have the exact number of lookups\n siteimpprop = site.getImportantProperty(index)\n if target != site.Target:\n print \"\\n**_ Results found for: \" + site.Target + \" _**\"\n target = site.Target\n # Check for them ALL to be None or 0 length\n sourceurlhasnoreturn = True\n for answer in siteimpprop:\n if answer is not None:\n if len(answer) > 0:\n sourceurlhasnoreturn = False\n\n if sourceurlhasnoreturn:\n print '[+] ' + site.SourceURL + ' No results found'\n break\n else:\n if siteimpprop is None or len(siteimpprop) == 0:\n print \"No results in the \" + site.FriendlyName[index] + \" category\"\n else:\n if siteimpprop[index] is None or len(siteimpprop[index]) == 0:\n print site.ReportStringForResult[index] + ' No results found'\n else:\n laststring = \"\"\n # if it's just a string we don't want it output like a list\n if isinstance(siteimpprop[index], basestring):\n if \"\" + site.ReportStringForResult[index] + \" \" + str(siteimpprop) != laststring:\n print \"\" + site.ReportStringForResult[index] + \" \" + str(siteimpprop).replace('www.', 'www[.]').replace('http', 'hxxp')\n laststring = \"\" + site.ReportStringForResult[index] + \" \" + str(siteimpprop)\n # must be a list since it failed the isinstance check on string\n else:\n laststring = \"\"\n for siteresult in siteimpprop[index]:\n if \"\" + site.ReportStringForResult[index] + \" \" + str(siteresult) != laststring:\n print \"\" + site.ReportStringForResult[index] + \" \" + str(siteresult).replace('www.', 'www[.]').replace('http', 'hxxp')\n laststring = \"\" + site.ReportStringForResult[index] + \" \" + str(siteresult)\n else:#this is a singlesite\n siteimpprop = site.getImportantProperty(0)\n if target != site.Target:\n print \"\\n**_ Results found for: \" + site.Target + \" _**\"\n target = site.Target\n if siteimpprop is None or len(siteimpprop)==0:\n print '[+] ' + site.FriendlyName + ' No results found'\n else:\n laststring = \"\"\n #if it's just a string we don't want it output like a list\n if isinstance(siteimpprop, basestring):\n if \"\" + site.ReportStringForResult + \" \" + str(siteimpprop) != laststring:\n print \"\" + site.ReportStringForResult + \" \" + str(siteimpprop).replace('www.', 'www[.]').replace('http', 'hxxp')\n laststring = \"\" + site.ReportStringForResult + \" \" + str(siteimpprop)\n #must be a list since it failed the isinstance check on string\n else:\n laststring = \"\"\n for siteresult in siteimpprop:\n if \"\" + site.ReportStringForResult + \" \" + str(siteresult) != laststring:\n print \"\" + site.ReportStringForResult + \" \" + str(siteresult).replace('www.', 'www[.]').replace('http', 'hxxp')\n laststring = \"\" + site.ReportStringForResult + \" \" + str(siteresult)\n else:\n pass","function_tokens":["def","PrintToScreenBot","(","self",")",":","sites","=","sorted","(","self",".","ListOfSites",",","key","=","attrgetter","(","'Target'",")",")","target","=","\"\"","if","sites","is","not","None",":","for","site","in","sites",":","if","not","isinstance","(","site",".","_regex",",","basestring",")",":","# this is a multisite","for","index","in","range","(","len","(","site",".","RegEx",")",")",":","# the regexs will ensure we have the exact number of lookups","siteimpprop","=","site",".","getImportantProperty","(","index",")","if","target","!=","site",".","Target",":","print","\"\\n**_ Results found for: \"","+","site",".","Target","+","\" _**\"","target","=","site",".","Target","# Check for them ALL to be None or 0 length","sourceurlhasnoreturn","=","True","for","answer","in","siteimpprop",":","if","answer","is","not","None",":","if","len","(","answer",")",">","0",":","sourceurlhasnoreturn","=","False","if","sourceurlhasnoreturn",":","print","'[+] '","+","site",".","SourceURL","+","' No results found'","break","else",":","if","siteimpprop","is","None","or","len","(","siteimpprop",")","==","0",":","print","\"No results in the \"","+","site",".","FriendlyName","[","index","]","+","\" category\"","else",":","if","siteimpprop","[","index","]","is","None","or","len","(","siteimpprop","[","index","]",")","==","0",":","print","site",".","ReportStringForResult","[","index","]","+","' No results found'","else",":","laststring","=","\"\"","# if it's just a string we don't want it output like a list","if","isinstance","(","siteimpprop","[","index","]",",","basestring",")",":","if","\"\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteimpprop",")","!=","laststring",":","print","\"\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteimpprop",")",".","replace","(","'www.'",",","'www[.]'",")",".","replace","(","'http'",",","'hxxp'",")","laststring","=","\"\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteimpprop",")","# must be a list since it failed the isinstance check on string","else",":","laststring","=","\"\"","for","siteresult","in","siteimpprop","[","index","]",":","if","\"\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteresult",")","!=","laststring",":","print","\"\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteresult",")",".","replace","(","'www.'",",","'www[.]'",")",".","replace","(","'http'",",","'hxxp'",")","laststring","=","\"\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteresult",")","else",":","#this is a singlesite","siteimpprop","=","site",".","getImportantProperty","(","0",")","if","target","!=","site",".","Target",":","print","\"\\n**_ Results found for: \"","+","site",".","Target","+","\" _**\"","target","=","site",".","Target","if","siteimpprop","is","None","or","len","(","siteimpprop",")","==","0",":","print","'[+] '","+","site",".","FriendlyName","+","' No results found'","else",":","laststring","=","\"\"","#if it's just a string we don't want it output like a list","if","isinstance","(","siteimpprop",",","basestring",")",":","if","\"\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteimpprop",")","!=","laststring",":","print","\"\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteimpprop",")",".","replace","(","'www.'",",","'www[.]'",")",".","replace","(","'http'",",","'hxxp'",")","laststring","=","\"\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteimpprop",")","#must be a list since it failed the isinstance check on string","else",":","laststring","=","\"\"","for","siteresult","in","siteimpprop",":","if","\"\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteresult",")","!=","laststring",":","print","\"\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteresult",")",".","replace","(","'www.'",",","'www[.]'",")",".","replace","(","'http'",",","'hxxp'",")","laststring","=","\"\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteresult",")","else",":","pass"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/outputs.py#L114-L190"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"outputs.py","language":"python","identifier":"SiteDetailOutput.PrintToScreenNormal","parameters":"(self)","argument_list":"","return_statement":"","docstring":"Formats site information correctly and prints it to the user's standard output.\n Returns nothing.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Formats site information correctly and prints it to the user's standard output.\n Returns nothing.","docstring_tokens":["Formats","site","information","correctly","and","prints","it","to","the","user","s","standard","output",".","Returns","nothing","."],"function":"def PrintToScreenNormal(self):\n \"\"\"\n Formats site information correctly and prints it to the user's standard output.\n Returns nothing.\n\n Argument(s):\n No arguments are required.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n sites = sorted(self.ListOfSites, key=attrgetter('Target'))\n target = \"\"\n if sites is not None:\n for site in sites:\n if not isinstance(site._regex, basestring): # this is a multisite\n for index in range(len(site.RegEx)): # the regexs will ensure we have the exact number of lookups\n siteimpprop = site.getImportantProperty(index)\n if target != site.Target:\n print \"\\n____________________ Results found for: \" + site.Target + \" ____________________\"\n target = site.Target\n if siteimpprop is None or len(siteimpprop) == 0:\n print \"No results in the \" + site.FriendlyName[index] + \" category\"\n else:\n if siteimpprop[index] is None or len(siteimpprop[index]) == 0:\n print site.ReportStringForResult[index] + ' No results found'\n else:\n laststring = \"\"\n # if it's just a string we don't want it output like a list\n if isinstance(siteimpprop[index], basestring):\n if \"\" + site.ReportStringForResult[index] + \" \" + str(siteimpprop) != laststring:\n print \"\" + site.ReportStringForResult[index] + \" \" + str(siteimpprop).replace('www.', 'www[.]').replace('http', 'hxxp')\n laststring = \"\" + site.ReportStringForResult[index] + \" \" + str(siteimpprop)\n # must be a list since it failed the isinstance check on string\n else:\n laststring = \"\"\n for siteresult in siteimpprop[index]:\n if \"\" + site.ReportStringForResult[index] + \" \" + str(siteresult) != laststring:\n print \"\" + site.ReportStringForResult[index] + \" \" + str(siteresult).replace('www.', 'www[.]').replace('http', 'hxxp')\n laststring = \"\" + site.ReportStringForResult[index] + \" \" + str(siteresult)\n else: # this is a singlesite\n siteimpprop = site.getImportantProperty(0)\n if target != site.Target:\n print \"\\n____________________ Results found for: \" + site.Target + \" ____________________\"\n target = site.Target\n if siteimpprop is None or len(siteimpprop) == 0:\n print \"No results found in the \" + site.FriendlyName\n else:\n laststring = \"\"\n # if it's just a string we don't want it output like a list\n if isinstance(siteimpprop, basestring):\n if \"\" + site.ReportStringForResult + \" \" + str(siteimpprop) != laststring:\n print \"\" + site.ReportStringForResult + \" \" + str(siteimpprop).replace('www.', 'www[.]').replace('http', 'hxxp')\n laststring = \"\" + site.ReportStringForResult + \" \" + str(siteimpprop)\n # must be a list since it failed the isinstance check on string\n else:\n laststring = \"\"\n for siteresult in siteimpprop:\n if \"\" + site.ReportStringForResult + \" \" + str(siteresult) != laststring:\n print \"\" + site.ReportStringForResult + \" \" + str(siteresult).replace('www.', 'www[.]').replace('http', 'hxxp')\n laststring = \"\" + site.ReportStringForResult + \" \" + str(siteresult)\n else:\n pass","function_tokens":["def","PrintToScreenNormal","(","self",")",":","sites","=","sorted","(","self",".","ListOfSites",",","key","=","attrgetter","(","'Target'",")",")","target","=","\"\"","if","sites","is","not","None",":","for","site","in","sites",":","if","not","isinstance","(","site",".","_regex",",","basestring",")",":","# this is a multisite","for","index","in","range","(","len","(","site",".","RegEx",")",")",":","# the regexs will ensure we have the exact number of lookups","siteimpprop","=","site",".","getImportantProperty","(","index",")","if","target","!=","site",".","Target",":","print","\"\\n____________________ Results found for: \"","+","site",".","Target","+","\" ____________________\"","target","=","site",".","Target","if","siteimpprop","is","None","or","len","(","siteimpprop",")","==","0",":","print","\"No results in the \"","+","site",".","FriendlyName","[","index","]","+","\" category\"","else",":","if","siteimpprop","[","index","]","is","None","or","len","(","siteimpprop","[","index","]",")","==","0",":","print","site",".","ReportStringForResult","[","index","]","+","' No results found'","else",":","laststring","=","\"\"","# if it's just a string we don't want it output like a list","if","isinstance","(","siteimpprop","[","index","]",",","basestring",")",":","if","\"\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteimpprop",")","!=","laststring",":","print","\"\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteimpprop",")",".","replace","(","'www.'",",","'www[.]'",")",".","replace","(","'http'",",","'hxxp'",")","laststring","=","\"\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteimpprop",")","# must be a list since it failed the isinstance check on string","else",":","laststring","=","\"\"","for","siteresult","in","siteimpprop","[","index","]",":","if","\"\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteresult",")","!=","laststring",":","print","\"\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteresult",")",".","replace","(","'www.'",",","'www[.]'",")",".","replace","(","'http'",",","'hxxp'",")","laststring","=","\"\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteresult",")","else",":","# this is a singlesite","siteimpprop","=","site",".","getImportantProperty","(","0",")","if","target","!=","site",".","Target",":","print","\"\\n____________________ Results found for: \"","+","site",".","Target","+","\" ____________________\"","target","=","site",".","Target","if","siteimpprop","is","None","or","len","(","siteimpprop",")","==","0",":","print","\"No results found in the \"","+","site",".","FriendlyName","else",":","laststring","=","\"\"","# if it's just a string we don't want it output like a list","if","isinstance","(","siteimpprop",",","basestring",")",":","if","\"\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteimpprop",")","!=","laststring",":","print","\"\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteimpprop",")",".","replace","(","'www.'",",","'www[.]'",")",".","replace","(","'http'",",","'hxxp'",")","laststring","=","\"\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteimpprop",")","# must be a list since it failed the isinstance check on string","else",":","laststring","=","\"\"","for","siteresult","in","siteimpprop",":","if","\"\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteresult",")","!=","laststring",":","print","\"\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteresult",")",".","replace","(","'www.'",",","'www[.]'",")",".","replace","(","'http'",",","'hxxp'",")","laststring","=","\"\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteresult",")","else",":","pass"],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/outputs.py#L192-L257"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"outputs.py","language":"python","identifier":"SiteDetailOutput.PrintToCEFFile","parameters":"(self,cefoutfile)","argument_list":"","return_statement":"","docstring":"Formats site information correctly and prints it to an output file in CEF format.\n CEF format specification from http:\/\/mita-tac.wikispaces.com\/file\/view\/CEF+White+Paper+071709.pdf\n \"Jan 18 11:07:53 host message\"\n where message:\n \"CEF:Version|Device Vendor|Device Product|Device Version|Signature ID|Name|Severity|Extension\"\n Returns nothing.\n\n Argument(s):\n cefoutfile -- A string representation of a file that will store the output.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Formats site information correctly and prints it to an output file in CEF format.\n CEF format specification from http:\/\/mita-tac.wikispaces.com\/file\/view\/CEF+White+Paper+071709.pdf\n \"Jan 18 11:07:53 host message\"\n where message:\n \"CEF:Version|Device Vendor|Device Product|Device Version|Signature ID|Name|Severity|Extension\"\n Returns nothing.","docstring_tokens":["Formats","site","information","correctly","and","prints","it","to","an","output","file","in","CEF","format",".","CEF","format","specification","from","http",":","\/\/","mita","-","tac",".","wikispaces",".","com","\/","file","\/","view","\/","CEF","+","White","+","Paper","+","071709",".","pdf","Jan","18","11",":","07",":","53","host","message","where","message",":","CEF",":","Version|Device","Vendor|Device","Product|Device","Version|Signature","ID|Name|Severity|Extension","Returns","nothing","."],"function":"def PrintToCEFFile(self,cefoutfile):\n \"\"\"\n Formats site information correctly and prints it to an output file in CEF format.\n CEF format specification from http:\/\/mita-tac.wikispaces.com\/file\/view\/CEF+White+Paper+071709.pdf\n \"Jan 18 11:07:53 host message\"\n where message:\n \"CEF:Version|Device Vendor|Device Product|Device Version|Signature ID|Name|Severity|Extension\"\n Returns nothing.\n\n Argument(s):\n cefoutfile -- A string representation of a file that will store the output.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n sites = sorted(self.ListOfSites, key=attrgetter('Target'))\n curr_date = datetime.now().strftime('%Y-%m-%d %H:%M:%S')\n hostname = socket.gethostname()\n prefix = ' '.join([curr_date,hostname])\n cef_version = \"CEF:Version1.1\"\n cef_deviceVendor = \"TekDefense\"\n cef_deviceProduct = \"Automater\"\n cef_deviceVersion = \"2.1\"\n cef_SignatureID = \"0\"\n cef_Severity = \"2\"\n cef_Extension = \" \"\n cef_fields = [cef_version,cef_deviceVendor,cef_deviceProduct,cef_deviceVersion, \\\n cef_SignatureID, cef_Severity, cef_Extension]\n pattern = \"^\\[\\+\\]\\s+\"\n target = \"\"\n print '\\n[+] Generating CEF output: ' + cefoutfile\n f = open(cefoutfile, \"wb\")\n csv.register_dialect('escaped', delimiter='|', escapechar='\\\\', doublequote=False, quoting=csv.QUOTE_NONE)\n cefRW = csv.writer(f, 'escaped')\n # cefRW.writerow(['Target', 'Type', 'Source', 'Result'])\n if sites is not None:\n for site in sites:\n if not isinstance(site._regex,basestring): # this is a multisite:\n for index in range(len(site.RegEx)): # the regexs will ensure we have the exact number of lookups\n siteimpprop = site.getImportantProperty(index)\n if siteimpprop is None or len(siteimpprop)==0:\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName[index]\n res = \"No results found\"\n cefRW.writerow([prefix] + cef_fields[:5] + \\\n [\"[\"+\",\".join([\"tgt=\"+tgt,\"typ=\"+typ,\"src=\"+source,\"res=\"+res])+\"] \"] + \\\n [1] + [tgt])\n else:\n if siteimpprop[index] is None or len(siteimpprop[index])==0:\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName[index]\n res = \"No results found\"\n cefRW.writerow([prefix] + cef_fields[:5] + \\\n [\"[\"+\",\".join([\"tgt=\"+tgt,\"typ=\"+typ,\"src=\"+source,\"res=\"+res])+\"] \"] + \\\n [1] + [tgt])\n else:\n laststring = \"\"\n # if it's just a string we don't want it to output like a list\n if isinstance(siteimpprop, basestring):\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName\n res = siteimpprop\n if \"\" + tgt + typ + source + res != laststring:\n cefRW.writerow([prefix] + cef_fields[:5] + \\\n [\"[\"+\",\".join([\"tgt=\"+tgt,\"typ=\"+typ,\"src=\"+source,\"res=\"+res])+\"] \" + \\\n re.sub(pattern,\"\",site.ReportStringForResult[index])+ str(siteimpprop)] + \\\n [cef_Severity] + [tgt])\n laststring = \"\" + tgt + typ + source + res\n # must be a list since it failed the isinstance check on string\n else:\n laststring = \"\"\n for siteresult in siteimpprop[index]:\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName[index]\n res = siteresult\n if \"\" + tgt + typ + source + str(res) != laststring:\n cefRW.writerow([prefix] + cef_fields[:5] + [\"[\"+\",\".join([\"tgt=\"+tgt,\"typ=\"+typ,\"src=\"+source,\"res=\"+str(res)])+\"] \" + re.sub(pattern, \"\", site.ReportStringForResult[index]) + str(siteresult)] + [cef_Severity] + [tgt])\n laststring = \"\" + tgt + typ + source + str(res)\n else: # this is a singlesite\n siteimpprop = site.getImportantProperty(0)\n if siteimpprop is None or len(siteimpprop)==0:\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName\n res = \"No results found\"\n cefRW.writerow([prefix] + cef_fields[:5] + \\\n [\"[\"+\",\".join([\"tgt=\"+tgt,\"typ=\"+typ,\"src=\"+source,\"res=\"+res])+\"] \"] + \\\n [1] + [tgt])\n else:\n laststring = \"\"\n # if it's just a string we don't want it output like a list\n if isinstance(siteimpprop, basestring):\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName\n res = siteimpprop\n if \"\" + tgt + typ + source + res != laststring:\n cefRW.writerow([prefix] + cef_fields[:5] + \\\n [\"[\"+\",\".join([\"tgt=\"+tgt,\"typ=\"+typ,\"src=\"+source,\"res=\"+res])+\"] \" + \\\n re.sub(pattern,\"\",site.ReportStringForResult)+ str(siteimpprop)] + \\\n [cef_Severity] + [tgt])\n laststring = \"\" + tgt + typ + source + res\n else:\n laststring = \"\"\n for siteresult in siteimpprop:\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName\n res = siteresult\n if \"\" + tgt + typ + source + str(res) != laststring:\n cefRW.writerow([prefix] + cef_fields[:5] + \\\n [\"[\"+\",\".join([\"tgt=\"+tgt,\"typ=\"+typ,\"src=\"+source,\"res=\"+str(res)])+\"] \" + \\\n re.sub(pattern,\"\",site.ReportStringForResult)+ str(siteimpprop)] + \\\n [cef_Severity] + [tgt])\n laststring = \"\" + tgt + typ + source + str(res)\n\n f.flush()\n f.close()\n print \"\" + cefoutfile + \" Generated\"","function_tokens":["def","PrintToCEFFile","(","self",",","cefoutfile",")",":","sites","=","sorted","(","self",".","ListOfSites",",","key","=","attrgetter","(","'Target'",")",")","curr_date","=","datetime",".","now","(",")",".","strftime","(","'%Y-%m-%d %H:%M:%S'",")","hostname","=","socket",".","gethostname","(",")","prefix","=","' '",".","join","(","[","curr_date",",","hostname","]",")","cef_version","=","\"CEF:Version1.1\"","cef_deviceVendor","=","\"TekDefense\"","cef_deviceProduct","=","\"Automater\"","cef_deviceVersion","=","\"2.1\"","cef_SignatureID","=","\"0\"","cef_Severity","=","\"2\"","cef_Extension","=","\" \"","cef_fields","=","[","cef_version",",","cef_deviceVendor",",","cef_deviceProduct",",","cef_deviceVersion",",","cef_SignatureID",",","cef_Severity",",","cef_Extension","]","pattern","=","\"^\\[\\+\\]\\s+\"","target","=","\"\"","print","'\\n[+] Generating CEF output: '","+","cefoutfile","f","=","open","(","cefoutfile",",","\"wb\"",")","csv",".","register_dialect","(","'escaped'",",","delimiter","=","'|'",",","escapechar","=","'\\\\'",",","doublequote","=","False",",","quoting","=","csv",".","QUOTE_NONE",")","cefRW","=","csv",".","writer","(","f",",","'escaped'",")","# cefRW.writerow(['Target', 'Type', 'Source', 'Result'])","if","sites","is","not","None",":","for","site","in","sites",":","if","not","isinstance","(","site",".","_regex",",","basestring",")",":","# this is a multisite:","for","index","in","range","(","len","(","site",".","RegEx",")",")",":","# the regexs will ensure we have the exact number of lookups","siteimpprop","=","site",".","getImportantProperty","(","index",")","if","siteimpprop","is","None","or","len","(","siteimpprop",")","==","0",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","[","index","]","res","=","\"No results found\"","cefRW",".","writerow","(","[","prefix","]","+","cef_fields","[",":","5","]","+","[","\"[\"","+","\",\"",".","join","(","[","\"tgt=\"","+","tgt",",","\"typ=\"","+","typ",",","\"src=\"","+","source",",","\"res=\"","+","res","]",")","+","\"] \"","]","+","[","1","]","+","[","tgt","]",")","else",":","if","siteimpprop","[","index","]","is","None","or","len","(","siteimpprop","[","index","]",")","==","0",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","[","index","]","res","=","\"No results found\"","cefRW",".","writerow","(","[","prefix","]","+","cef_fields","[",":","5","]","+","[","\"[\"","+","\",\"",".","join","(","[","\"tgt=\"","+","tgt",",","\"typ=\"","+","typ",",","\"src=\"","+","source",",","\"res=\"","+","res","]",")","+","\"] \"","]","+","[","1","]","+","[","tgt","]",")","else",":","laststring","=","\"\"","# if it's just a string we don't want it to output like a list","if","isinstance","(","siteimpprop",",","basestring",")",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","res","=","siteimpprop","if","\"\"","+","tgt","+","typ","+","source","+","res","!=","laststring",":","cefRW",".","writerow","(","[","prefix","]","+","cef_fields","[",":","5","]","+","[","\"[\"","+","\",\"",".","join","(","[","\"tgt=\"","+","tgt",",","\"typ=\"","+","typ",",","\"src=\"","+","source",",","\"res=\"","+","res","]",")","+","\"] \"","+","re",".","sub","(","pattern",",","\"\"",",","site",".","ReportStringForResult","[","index","]",")","+","str","(","siteimpprop",")","]","+","[","cef_Severity","]","+","[","tgt","]",")","laststring","=","\"\"","+","tgt","+","typ","+","source","+","res","# must be a list since it failed the isinstance check on string","else",":","laststring","=","\"\"","for","siteresult","in","siteimpprop","[","index","]",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","[","index","]","res","=","siteresult","if","\"\"","+","tgt","+","typ","+","source","+","str","(","res",")","!=","laststring",":","cefRW",".","writerow","(","[","prefix","]","+","cef_fields","[",":","5","]","+","[","\"[\"","+","\",\"",".","join","(","[","\"tgt=\"","+","tgt",",","\"typ=\"","+","typ",",","\"src=\"","+","source",",","\"res=\"","+","str","(","res",")","]",")","+","\"] \"","+","re",".","sub","(","pattern",",","\"\"",",","site",".","ReportStringForResult","[","index","]",")","+","str","(","siteresult",")","]","+","[","cef_Severity","]","+","[","tgt","]",")","laststring","=","\"\"","+","tgt","+","typ","+","source","+","str","(","res",")","else",":","# this is a singlesite","siteimpprop","=","site",".","getImportantProperty","(","0",")","if","siteimpprop","is","None","or","len","(","siteimpprop",")","==","0",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","res","=","\"No results found\"","cefRW",".","writerow","(","[","prefix","]","+","cef_fields","[",":","5","]","+","[","\"[\"","+","\",\"",".","join","(","[","\"tgt=\"","+","tgt",",","\"typ=\"","+","typ",",","\"src=\"","+","source",",","\"res=\"","+","res","]",")","+","\"] \"","]","+","[","1","]","+","[","tgt","]",")","else",":","laststring","=","\"\"","# if it's just a string we don't want it output like a list","if","isinstance","(","siteimpprop",",","basestring",")",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","res","=","siteimpprop","if","\"\"","+","tgt","+","typ","+","source","+","res","!=","laststring",":","cefRW",".","writerow","(","[","prefix","]","+","cef_fields","[",":","5","]","+","[","\"[\"","+","\",\"",".","join","(","[","\"tgt=\"","+","tgt",",","\"typ=\"","+","typ",",","\"src=\"","+","source",",","\"res=\"","+","res","]",")","+","\"] \"","+","re",".","sub","(","pattern",",","\"\"",",","site",".","ReportStringForResult",")","+","str","(","siteimpprop",")","]","+","[","cef_Severity","]","+","[","tgt","]",")","laststring","=","\"\"","+","tgt","+","typ","+","source","+","res","else",":","laststring","=","\"\"","for","siteresult","in","siteimpprop",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","res","=","siteresult","if","\"\"","+","tgt","+","typ","+","source","+","str","(","res",")","!=","laststring",":","cefRW",".","writerow","(","[","prefix","]","+","cef_fields","[",":","5","]","+","[","\"[\"","+","\",\"",".","join","(","[","\"tgt=\"","+","tgt",",","\"typ=\"","+","typ",",","\"src=\"","+","source",",","\"res=\"","+","str","(","res",")","]",")","+","\"] \"","+","re",".","sub","(","pattern",",","\"\"",",","site",".","ReportStringForResult",")","+","str","(","siteimpprop",")","]","+","[","cef_Severity","]","+","[","tgt","]",")","laststring","=","\"\"","+","tgt","+","typ","+","source","+","str","(","res",")","f",".","flush","(",")","f",".","close","(",")","print","\"\"","+","cefoutfile","+","\" Generated\""],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/outputs.py#L259-L384"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"outputs.py","language":"python","identifier":"SiteDetailOutput.PrintToTextFile","parameters":"(self,textoutfile)","argument_list":"","return_statement":"","docstring":"Formats site information correctly and prints it to an output file in text format.\n Returns nothing.\n\n Argument(s):\n textoutfile -- A string representation of a file that will store the output.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Formats site information correctly and prints it to an output file in text format.\n Returns nothing.","docstring_tokens":["Formats","site","information","correctly","and","prints","it","to","an","output","file","in","text","format",".","Returns","nothing","."],"function":"def PrintToTextFile(self,textoutfile):\n \"\"\"\n Formats site information correctly and prints it to an output file in text format.\n Returns nothing.\n\n Argument(s):\n textoutfile -- A string representation of a file that will store the output.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n sites = sorted(self.ListOfSites, key=attrgetter('Target'))\n target = \"\"\n print \"\\n[+] Generating text output: \" + textoutfile\n f = open(textoutfile, \"w\")\n if sites is not None:\n for site in sites:\n if not isinstance(site._regex,basestring): #this is a multisite\n for index in range(len(site.RegEx)): #the regexs will ensure we have the exact number of lookups\n siteimpprop = site.getImportantProperty(index)\n if target != site.Target:\n f.write(\"\\n____________________ Results found for: \" + site.Target + \" ____________________\")\n target = site.Target\n if siteimpprop is None or len(siteimpprop)==0:\n f.write(\"\\nNo results in the \" + site.FriendlyName[index] + \" category\")\n else:\n if siteimpprop[index] is None or len(siteimpprop[index]) == 0:\n f.write('\\n' + site.ReportStringForResult[index] + ' No results found')\n else:\n laststring = \"\"\n #if it's just a string we don't want it to output like a list\n if isinstance(siteimpprop[index], basestring):\n if \"\" + site.ReportStringForResult[index] + \" \" + str(siteimpprop) != laststring:\n f.write(\"\\n\" + site.ReportStringForResult[index] + \" \" + str(siteimpprop))\n laststring = \"\" + site.ReportStringForResult[index] + \" \" + str(siteimpprop)\n #must be a list since it failed the isinstance check on string\n else:\n laststring = \"\"\n for siteresult in siteimpprop[index]:\n if \"\" + site.ReportStringForResult[index] + \" \" + str(siteresult) != laststring:\n f.write(\"\\n\" + site.ReportStringForResult[index] + \" \" + str(siteresult))\n laststring = \"\" + site.ReportStringForResult[index] + \" \" + str(siteresult)\n else:#this is a singlesite\n siteimpprop = site.getImportantProperty(0)\n if target != site.Target:\n f.write(\"\\n____________________ Results found for: \" + site.Target + \" ____________________\")\n target = site.Target\n if siteimpprop is None or len(siteimpprop)==0:\n f.write(\"\\nNo results found in the \" + site.FriendlyName)\n else:\n laststring = \"\"\n #if it's just a string we don't want it output like a list\n if isinstance(siteimpprop, basestring):\n if \"\" + site.ReportStringForResult + \" \" + str(siteimpprop) != laststring:\n f.write(\"\\n\" + site.ReportStringForResult + \" \" + str(siteimpprop))\n laststring = \"\" + site.ReportStringForResult + \" \" + str(siteimpprop)\n else:\n laststring = \"\"\n for siteresult in siteimpprop:\n if \"\" + site.ReportStringForResult + \" \" + str(siteresult) != laststring:\n f.write(\"\\n\" + site.ReportStringForResult + \" \" + str(siteresult))\n laststring = \"\" + site.ReportStringForResult + \" \" + str(siteresult)\n f.flush()\n f.close()\n print \"\" + textoutfile + \" Generated\"","function_tokens":["def","PrintToTextFile","(","self",",","textoutfile",")",":","sites","=","sorted","(","self",".","ListOfSites",",","key","=","attrgetter","(","'Target'",")",")","target","=","\"\"","print","\"\\n[+] Generating text output: \"","+","textoutfile","f","=","open","(","textoutfile",",","\"w\"",")","if","sites","is","not","None",":","for","site","in","sites",":","if","not","isinstance","(","site",".","_regex",",","basestring",")",":","#this is a multisite","for","index","in","range","(","len","(","site",".","RegEx",")",")",":","#the regexs will ensure we have the exact number of lookups","siteimpprop","=","site",".","getImportantProperty","(","index",")","if","target","!=","site",".","Target",":","f",".","write","(","\"\\n____________________ Results found for: \"","+","site",".","Target","+","\" ____________________\"",")","target","=","site",".","Target","if","siteimpprop","is","None","or","len","(","siteimpprop",")","==","0",":","f",".","write","(","\"\\nNo results in the \"","+","site",".","FriendlyName","[","index","]","+","\" category\"",")","else",":","if","siteimpprop","[","index","]","is","None","or","len","(","siteimpprop","[","index","]",")","==","0",":","f",".","write","(","'\\n'","+","site",".","ReportStringForResult","[","index","]","+","' No results found'",")","else",":","laststring","=","\"\"","#if it's just a string we don't want it to output like a list","if","isinstance","(","siteimpprop","[","index","]",",","basestring",")",":","if","\"\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteimpprop",")","!=","laststring",":","f",".","write","(","\"\\n\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteimpprop",")",")","laststring","=","\"\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteimpprop",")","#must be a list since it failed the isinstance check on string","else",":","laststring","=","\"\"","for","siteresult","in","siteimpprop","[","index","]",":","if","\"\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteresult",")","!=","laststring",":","f",".","write","(","\"\\n\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteresult",")",")","laststring","=","\"\"","+","site",".","ReportStringForResult","[","index","]","+","\" \"","+","str","(","siteresult",")","else",":","#this is a singlesite","siteimpprop","=","site",".","getImportantProperty","(","0",")","if","target","!=","site",".","Target",":","f",".","write","(","\"\\n____________________ Results found for: \"","+","site",".","Target","+","\" ____________________\"",")","target","=","site",".","Target","if","siteimpprop","is","None","or","len","(","siteimpprop",")","==","0",":","f",".","write","(","\"\\nNo results found in the \"","+","site",".","FriendlyName",")","else",":","laststring","=","\"\"","#if it's just a string we don't want it output like a list","if","isinstance","(","siteimpprop",",","basestring",")",":","if","\"\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteimpprop",")","!=","laststring",":","f",".","write","(","\"\\n\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteimpprop",")",")","laststring","=","\"\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteimpprop",")","else",":","laststring","=","\"\"","for","siteresult","in","siteimpprop",":","if","\"\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteresult",")","!=","laststring",":","f",".","write","(","\"\\n\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteresult",")",")","laststring","=","\"\"","+","site",".","ReportStringForResult","+","\" \"","+","str","(","siteresult",")","f",".","flush","(",")","f",".","close","(",")","print","\"\"","+","textoutfile","+","\" Generated\""],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/outputs.py#L387-L454"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"outputs.py","language":"python","identifier":"SiteDetailOutput.PrintToCSVFile","parameters":"(self,csvoutfile)","argument_list":"","return_statement":"","docstring":"Formats site information correctly and prints it to an output file with comma-seperators.\n Returns nothing.\n\n Argument(s):\n csvoutfile -- A string representation of a file that will store the output.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Formats site information correctly and prints it to an output file with comma-seperators.\n Returns nothing.","docstring_tokens":["Formats","site","information","correctly","and","prints","it","to","an","output","file","with","comma","-","seperators",".","Returns","nothing","."],"function":"def PrintToCSVFile(self,csvoutfile):\n \"\"\"\n Formats site information correctly and prints it to an output file with comma-seperators.\n Returns nothing.\n\n Argument(s):\n csvoutfile -- A string representation of a file that will store the output.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n sites = sorted(self.ListOfSites, key=attrgetter('Target'))\n target = \"\"\n print '\\n[+] Generating CSV output: ' + csvoutfile\n f = open(csvoutfile, \"wb\")\n csvRW = csv.writer(f, quoting=csv.QUOTE_ALL)\n csvRW.writerow(['Target', 'Type', 'Source', 'Result'])\n if sites is not None:\n for site in sites:\n if not isinstance(site._regex,basestring): #this is a multisite:\n for index in range(len(site.RegEx)): #the regexs will ensure we have the exact number of lookups\n siteimpprop = site.getImportantProperty(index)\n if siteimpprop is None or len(siteimpprop)==0:\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName[index]\n res = \"No results found\"\n csvRW.writerow([tgt,typ,source,res])\n else:\n if siteimpprop[index] is None or len(siteimpprop[index])==0:\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName[index]\n res = \"No results found\"\n csvRW.writerow([tgt,typ,source,res])\n else:\n laststring = \"\"\n #if it's just a string we don't want it to output like a list\n if isinstance(siteimpprop, basestring):\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName\n res = siteimpprop\n if \"\" + tgt + typ + source + res != laststring:\n csvRW.writerow([tgt,typ,source,res])\n laststring = \"\" + tgt + typ + source + res\n #must be a list since it failed the isinstance check on string\n else:\n laststring = \"\"\n for siteresult in siteimpprop[index]:\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName[index]\n res = siteresult\n if \"\" + tgt + typ + source + str(res) != laststring:\n csvRW.writerow([tgt,typ,source,res])\n laststring = \"\" + tgt + typ + source + str(res)\n else:#this is a singlesite\n siteimpprop = site.getImportantProperty(0)\n if siteimpprop is None or len(siteimpprop)==0:\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName\n res = \"No results found\"\n csvRW.writerow([tgt,typ,source,res])\n else:\n laststring = \"\"\n #if it's just a string we don't want it output like a list\n if isinstance(siteimpprop, basestring):\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName\n res = siteimpprop\n if \"\" + tgt + typ + source + res != laststring:\n csvRW.writerow([tgt,typ,source,res])\n laststring = \"\" + tgt + typ + source + res\n else:\n laststring = \"\"\n for siteresult in siteimpprop:\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName\n res = siteresult\n if \"\" + tgt + typ + source + str(res) != laststring:\n csvRW.writerow([tgt,typ,source,res])\n laststring = \"\" + tgt + typ + source + str(res)\n\n f.flush()\n f.close()\n print \"\" + csvoutfile + \" Generated\"","function_tokens":["def","PrintToCSVFile","(","self",",","csvoutfile",")",":","sites","=","sorted","(","self",".","ListOfSites",",","key","=","attrgetter","(","'Target'",")",")","target","=","\"\"","print","'\\n[+] Generating CSV output: '","+","csvoutfile","f","=","open","(","csvoutfile",",","\"wb\"",")","csvRW","=","csv",".","writer","(","f",",","quoting","=","csv",".","QUOTE_ALL",")","csvRW",".","writerow","(","[","'Target'",",","'Type'",",","'Source'",",","'Result'","]",")","if","sites","is","not","None",":","for","site","in","sites",":","if","not","isinstance","(","site",".","_regex",",","basestring",")",":","#this is a multisite:","for","index","in","range","(","len","(","site",".","RegEx",")",")",":","#the regexs will ensure we have the exact number of lookups","siteimpprop","=","site",".","getImportantProperty","(","index",")","if","siteimpprop","is","None","or","len","(","siteimpprop",")","==","0",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","[","index","]","res","=","\"No results found\"","csvRW",".","writerow","(","[","tgt",",","typ",",","source",",","res","]",")","else",":","if","siteimpprop","[","index","]","is","None","or","len","(","siteimpprop","[","index","]",")","==","0",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","[","index","]","res","=","\"No results found\"","csvRW",".","writerow","(","[","tgt",",","typ",",","source",",","res","]",")","else",":","laststring","=","\"\"","#if it's just a string we don't want it to output like a list","if","isinstance","(","siteimpprop",",","basestring",")",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","res","=","siteimpprop","if","\"\"","+","tgt","+","typ","+","source","+","res","!=","laststring",":","csvRW",".","writerow","(","[","tgt",",","typ",",","source",",","res","]",")","laststring","=","\"\"","+","tgt","+","typ","+","source","+","res","#must be a list since it failed the isinstance check on string","else",":","laststring","=","\"\"","for","siteresult","in","siteimpprop","[","index","]",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","[","index","]","res","=","siteresult","if","\"\"","+","tgt","+","typ","+","source","+","str","(","res",")","!=","laststring",":","csvRW",".","writerow","(","[","tgt",",","typ",",","source",",","res","]",")","laststring","=","\"\"","+","tgt","+","typ","+","source","+","str","(","res",")","else",":","#this is a singlesite","siteimpprop","=","site",".","getImportantProperty","(","0",")","if","siteimpprop","is","None","or","len","(","siteimpprop",")","==","0",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","res","=","\"No results found\"","csvRW",".","writerow","(","[","tgt",",","typ",",","source",",","res","]",")","else",":","laststring","=","\"\"","#if it's just a string we don't want it output like a list","if","isinstance","(","siteimpprop",",","basestring",")",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","res","=","siteimpprop","if","\"\"","+","tgt","+","typ","+","source","+","res","!=","laststring",":","csvRW",".","writerow","(","[","tgt",",","typ",",","source",",","res","]",")","laststring","=","\"\"","+","tgt","+","typ","+","source","+","res","else",":","laststring","=","\"\"","for","siteresult","in","siteimpprop",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","res","=","siteresult","if","\"\"","+","tgt","+","typ","+","source","+","str","(","res",")","!=","laststring",":","csvRW",".","writerow","(","[","tgt",",","typ",",","source",",","res","]",")","laststring","=","\"\"","+","tgt","+","typ","+","source","+","str","(","res",")","f",".","flush","(",")","f",".","close","(",")","print","\"\"","+","csvoutfile","+","\" Generated\""],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/outputs.py#L456-L548"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"outputs.py","language":"python","identifier":"SiteDetailOutput.PrintToHTMLFile","parameters":"(self, htmloutfile)","argument_list":"","return_statement":"","docstring":"Formats site information correctly and prints it to an output file using HTML markup.\n Returns nothing.\n\n Argument(s):\n htmloutfile -- A string representation of a file that will store the output.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.","docstring_summary":"Formats site information correctly and prints it to an output file using HTML markup.\n Returns nothing.","docstring_tokens":["Formats","site","information","correctly","and","prints","it","to","an","output","file","using","HTML","markup",".","Returns","nothing","."],"function":"def PrintToHTMLFile(self, htmloutfile):\n \"\"\"\n Formats site information correctly and prints it to an output file using HTML markup.\n Returns nothing.\n\n Argument(s):\n htmloutfile -- A string representation of a file that will store the output.\n\n Return value(s):\n Nothing is returned from this Method.\n\n Restriction(s):\n The Method has no restrictions.\n \"\"\"\n sites = sorted(self.ListOfSites, key=attrgetter('Target'))\n target = \"\"\n print '\\n[+] Generating HTML output: ' + htmloutfile\n f = open(htmloutfile, \"w\")\n f.write(self.getHTMLOpening())\n if sites is not None:\n for site in sites:\n if not isinstance(site._regex,basestring): #this is a multisite:\n for index in range(len(site.RegEx)): #the regexs will ensure we have the exact number of lookups\n siteimpprop = site.getImportantProperty(index)\n if siteimpprop is None or len(siteimpprop)==0:\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName[index]\n res = \"No results found\"\n tableData = '' + tgt + '<\/td>' + typ + '<\/td>' + source + '<\/td>' + str(res) + '<\/td><\/tr>'\n f.write(tableData)\n else:\n if siteimpprop[index] is None or len(siteimpprop[index])==0:\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName[index]\n res = \"No results found\"\n tableData = '' + tgt + '<\/td>' + typ + '<\/td>' + source + '<\/td>' + str(res) + '<\/td><\/tr>'\n f.write(tableData)\n else:\n # if it's just a string we don't want it to output like a list\n if isinstance(siteimpprop, basestring):\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName\n res = siteimpprop\n tableData = '' + tgt + '<\/td>' + typ + '<\/td>' + source + '<\/td>' + str(res) + '<\/td><\/tr>'\n f.write(tableData)\n else:\n for siteresult in siteimpprop[index]:\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName[index]\n res = siteresult\n tableData = '' + tgt + '<\/td>' + typ + '<\/td>' + source + '<\/td>' + str(res) + '<\/td><\/tr>'\n f.write(tableData)\n else: # this is a singlesite\n siteimpprop = site.getImportantProperty(0)\n if siteimpprop is None or len(siteimpprop)==0:\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName\n res = \"No results found\"\n tableData = '' + tgt + '<\/td>' + typ + '<\/td>' + source + '<\/td>' + str(res) + '<\/td><\/tr>'\n f.write(tableData)\n else:\n # if it's just a string we don't want it output like a list\n if isinstance(siteimpprop, basestring):\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName\n res = siteimpprop\n tableData = '' + tgt + '<\/td>' + typ + '<\/td>' + source + '<\/td>' + str(res) + '<\/td><\/tr>'\n f.write(tableData)\n else:\n for siteresult in siteimpprop:\n tgt = site.Target\n typ = site.TargetType\n source = site.FriendlyName\n res = siteresult\n tableData = '' + tgt + '<\/td>' + typ + '<\/td>' + source + '<\/td>' + str(res) + '<\/td><\/tr>'\n f.write(tableData)\n f.write(self.getHTMLClosing())\n f.flush()\n f.close()\n print \"\" + htmloutfile + \" Generated\"","function_tokens":["def","PrintToHTMLFile","(","self",",","htmloutfile",")",":","sites","=","sorted","(","self",".","ListOfSites",",","key","=","attrgetter","(","'Target'",")",")","target","=","\"\"","print","'\\n[+] Generating HTML output: '","+","htmloutfile","f","=","open","(","htmloutfile",",","\"w\"",")","f",".","write","(","self",".","getHTMLOpening","(",")",")","if","sites","is","not","None",":","for","site","in","sites",":","if","not","isinstance","(","site",".","_regex",",","basestring",")",":","#this is a multisite:","for","index","in","range","(","len","(","site",".","RegEx",")",")",":","#the regexs will ensure we have the exact number of lookups","siteimpprop","=","site",".","getImportantProperty","(","index",")","if","siteimpprop","is","None","or","len","(","siteimpprop",")","==","0",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","[","index","]","res","=","\"No results found\"","tableData","=","''","+","tgt","+","'<\/td>'","+","typ","+","'<\/td>'","+","source","+","'<\/td>'","+","str","(","res",")","+","'<\/td><\/tr>'","f",".","write","(","tableData",")","else",":","if","siteimpprop","[","index","]","is","None","or","len","(","siteimpprop","[","index","]",")","==","0",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","[","index","]","res","=","\"No results found\"","tableData","=","''","+","tgt","+","'<\/td>'","+","typ","+","'<\/td>'","+","source","+","'<\/td>'","+","str","(","res",")","+","'<\/td><\/tr>'","f",".","write","(","tableData",")","else",":","# if it's just a string we don't want it to output like a list","if","isinstance","(","siteimpprop",",","basestring",")",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","res","=","siteimpprop","tableData","=","''","+","tgt","+","'<\/td>'","+","typ","+","'<\/td>'","+","source","+","'<\/td>'","+","str","(","res",")","+","'<\/td><\/tr>'","f",".","write","(","tableData",")","else",":","for","siteresult","in","siteimpprop","[","index","]",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","[","index","]","res","=","siteresult","tableData","=","''","+","tgt","+","'<\/td>'","+","typ","+","'<\/td>'","+","source","+","'<\/td>'","+","str","(","res",")","+","'<\/td><\/tr>'","f",".","write","(","tableData",")","else",":","# this is a singlesite","siteimpprop","=","site",".","getImportantProperty","(","0",")","if","siteimpprop","is","None","or","len","(","siteimpprop",")","==","0",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","res","=","\"No results found\"","tableData","=","''","+","tgt","+","'<\/td>'","+","typ","+","'<\/td>'","+","source","+","'<\/td>'","+","str","(","res",")","+","'<\/td><\/tr>'","f",".","write","(","tableData",")","else",":","# if it's just a string we don't want it output like a list","if","isinstance","(","siteimpprop",",","basestring",")",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","res","=","siteimpprop","tableData","=","''","+","tgt","+","'<\/td>'","+","typ","+","'<\/td>'","+","source","+","'<\/td>'","+","str","(","res",")","+","'<\/td><\/tr>'","f",".","write","(","tableData",")","else",":","for","siteresult","in","siteimpprop",":","tgt","=","site",".","Target","typ","=","site",".","TargetType","source","=","site",".","FriendlyName","res","=","siteresult","tableData","=","''","+","tgt","+","'<\/td>'","+","typ","+","'<\/td>'","+","source","+","'<\/td>'","+","str","(","res",")","+","'<\/td><\/tr>'","f",".","write","(","tableData",")","f",".","write","(","self",".","getHTMLClosing","(",")",")","f",".","flush","(",")","f",".","close","(",")","print","\"\"","+","htmloutfile","+","\" Generated\""],"url":"https:\/\/github.com\/1aN0rmus\/TekDefense-Automater\/blob\/42548cf454e862669c0a482955358fe27f7150e8\/outputs.py#L550-L635"} {"nwo":"1aN0rmus\/TekDefense-Automater","sha":"42548cf454e862669c0a482955358fe27f7150e8","path":"outputs.py","language":"python","identifier":"SiteDetailOutput.getHTMLOpening","parameters":"(self)","argument_list":"","return_statement":"return '''