Skip to content

Commit

Permalink
Fix codacy findings
Browse files Browse the repository at this point in the history
  • Loading branch information
shenril committed Aug 20, 2019
1 parent 35466e6 commit f07109c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/modules/crawler/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ class SitadelSpider(CrawlSpider):
]

# Method for parsing items
def parse_items(self, links):
@classmethod
def parse_items(cls, links):
for link in links:
if urlparse(link.url).netloc in allowed_domains:
urls.add(link.url)
yield link


def crawl(url, user_agent):
try:
output = Services.get("output")
Expand Down
8 changes: 5 additions & 3 deletions lib/utils/banner.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ def banner(self):
print(self.g + "~/#" + self.e + " https://github.com/shenril/Sitadel" + self.g + " #\\~" + self.e)
print("\n")

def preamble(self, url):
@classmethod
def preamble(cls, url):
print('URL: %s' % url)
print('--------- Scan Started: %s ---------' % (time.strftime('%d/%m/%Y %H:%M:%S')))

def postscript(self):

@classmethod
def postscript(cls):
print('--------- Scan Finished: %s ---------' % (time.strftime('%d/%m/%Y %H:%M:%S')))

def version(self):
Expand Down

0 comments on commit f07109c

Please sign in to comment.