def __init__(self, HTTP, xmlRepGenerator): Attack.__init__(self, HTTP, xmlRepGenerator) user_config_dir = os.getenv('HOME') or os.getenv('USERPROFILE') user_config_dir += "/config" if not os.path.isdir(user_config_dir): os.makedirs(user_config_dir) try: fd = open(user_config_dir + "/" + self.CONFIG_FILE) reader = csv.reader(fd) self.nikto_db = [l for l in reader if l != [] and l[0].isdigit()] fd.close() except IOError: try: print(_("Problem with local nikto database.")) print(_("Downloading from the web...")) resp = self.HTTP.send( "http://cirt.net/nikto/UPDATES/2.1.5/db_tests") page = resp.getRawPage() csv.register_dialect("nikto", quoting=csv.QUOTE_ALL, doublequote=False, escapechar="\\") reader = csv.reader(page.split("\n"), "nikto") self.nikto_db = [ l for l in reader if l != [] and l[0].isdigit() ] fd = open(user_config_dir + "/" + self.CONFIG_FILE, "w") writer = csv.writer(fd) writer.writerows(self.nikto_db) fd.close() except socket.timeout: print(_("Error downloading Nikto database"))
def __init__(self, HTTP, xmlRepGenerator): Attack.__init__(self, HTTP, xmlRepGenerator) user_config_dir = os.getenv('HOME') or os.getenv('USERPROFILE') user_config_dir += "/config" if not os.path.isdir(user_config_dir): os.makedirs(user_config_dir) try: fd = open(user_config_dir + "/" + self.CONFIG_FILE) reader = csv.reader(fd) self.nikto_db = [l for l in reader if l!=[] and l[0].isdigit()] fd.close() except IOError: try: print _("Problem with local nikto database.") print _("Downloading from the web...") resp = self.HTTP.send("http://cirt.net/nikto/UPDATES/2.1.1/db_tests") page = resp.getPage() csv.register_dialect("nikto", quoting=csv.QUOTE_ALL, doublequote=False, escapechar="\\") reader = csv.reader(page.split("\n"), "nikto") self.nikto_db = [l for l in reader if l!=[] and l[0].isdigit()] fd = open(user_config_dir + "/" + self.CONFIG_FILE, "w") writer = csv.writer(fd) writer.writerows(self.nikto_db) fd.close() except socket.timeout: print _("Error downloading Nikto database")
def __init__(self, projectileType, direction, position, damage): Sprite.__init__(self) Attack.__init__(self, damage) self.speed = 15 self.direction = direction self.frame = 0 self.size = 48 self.spriteSheet = pygame.image.load(projectileType.value) self.prapareSprite(self.frame) self.rect = self.image.get_rect() self.rect.x = position[0] self.rect.y = position[1] self.timelapsed = 0 self.animationDirection = 1
def __init__(self, HTTP, xmlRepGenerator): Attack.__init__(self, HTTP, xmlRepGenerator) try: fd = open(self.CONFIG_DIR + "/" + self.CONFIG_FILE) reader = csv.reader(fd) self.nikto_db = [l for l in reader if l != [] and l[0].isdigit()] fd.close() except IOError: try: print _("Problem with local nikto database.") print _("Downloading from the web...") page = urllib2.urlopen("http://cirt.net/nikto/UPDATES/2.1.0/db_tests") csv.register_dialect("nikto", quoting=csv.QUOTE_ALL, doublequote=False, escapechar="\\") reader = csv.reader(page, "nikto") self.nikto_db = [l for l in reader if l != [] and l[0].isdigit()] page.close() fd = open(self.CONFIG_DIR + "/" + self.CONFIG_FILE, "w") writer = csv.writer(fd) writer.writerows(self.nikto_db) fd.close() except socket.timeout: print _("Error downloading Nikto database")
def __init__(self, HTTP, xmlRepGenerator): Attack.__init__(self, HTTP, xmlRepGenerator) self.payloads = self.loadPayloads(self.CONFIG_DIR + "/" + self.CONFIG_FILE)
def __init__(self, HTTP, xmlRepGenerator): Attack.__init__(self, HTTP, xmlRepGenerator)
def __init__(self, HTTP, xmlRepGenerator): Attack.__init__(self, HTTP, xmlRepGenerator) self.independant_payloads = self.loadPayloads(self.CONFIG_DIR + "/" + self.CONFIG_FILE)
def __init__(self): Attack.__init__(self) JunkRemover.__init__(self) self.config = read_config()