Skip to content

Commit

Permalink
Merge pull request trustedsec#713 from kollieartwolf/patch-2
Browse files Browse the repository at this point in the history
Fix utf-8 codec error (1/2)
  • Loading branch information
HackingDave committed Apr 28, 2020
2 parents 9a68a5b + 739756b commit a95413d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/webattack/harvester/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
apache_rewrite = "post.php"

# start the scraping process
fileopen = open(userconfigpath + "web_clone/%s" % (site), "r").readlines()
fileopen = open(userconfigpath + "web_clone/%s" % (site), "r", encoding='utf-8', errors='ignore').readlines()
filewrite = open(userconfigpath + "web_clone/index.html.new", "w")
for line in fileopen:

Expand Down
2 changes: 1 addition & 1 deletion src/webattack/web_clone/cloner.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
filewrite.close()

if os.path.isfile(userconfigpath + "web_clone/index.html"):
fileopen = open(userconfigpath + "web_clone/index.html", "r")
fileopen = open(userconfigpath + "web_clone/index.html", "r", encoding='utf-8', errors='ignore')
counter = 0
for line in fileopen:
counter = counter + 1
Expand Down

0 comments on commit a95413d

Please sign in to comment.