def WebHeaders(self): try: _cmd = "curl %s://%s:%s/ -I 2>/dev/null 1> scans/web_headers.txt" % ( self.CLIENT_PROTOCOL, self.CLIENT_IP, self.CLIENT_PORT) basic.RunCommand(_cmd) _cmd = "curl -X OPTIONS %s://%s:%s/ -I 2>/dev/null 1> scans/web_headers_options.txt" % ( self.CLIENT_PROTOCOL, self.CLIENT_IP, self.CLIENT_PORT) basic.RunCommand(_cmd) except Exception as _except: logging.error(_except)
def Nikto(self): try: _cmd = "nikto -h %s://%s:%s/ &> scans/nikto.txt" % ( self.CLIENT_PROTOCOL, self.CLIENT_IP, self.CLIENT_PORT) basic.RunCommand(_cmd) except Exception as _except: logging.error(_except)
def Gobuster(self): try: _cmd = "gobuster dir -u %s://%s:%s/ -w /tmp/list.lst -t 50 &> scans/gobuster.txt" % ( self.CLIENT_PROTOCOL, self.CLIENT_IP, self.CLIENT_PORT) basic.RunCommand(_cmd) except Exception as _except: logging.error(_except)
def RobotsTxt(self): try: _cmd = "curl %s://%s:%s/robots.txt 2>/dev/null 1> scans/robots.txt" % ( self.CLIENT_PROTOCOL, self.CLIENT_IP, self.CLIENT_PORT) basic.RunCommand(_cmd) except Exception as _except: logging.error(_except)
def CommandCheck(self): logging.debug("---- Checking commands") for _cmd in self.SERVICE_REQ_COMMANDS: _out, _err = basic.RunCommand("which " + _cmd) if _err != "": logging.error(_cmd + " : Command not found!") sys.exit(0)