Skip to content

Commit

Permalink
Merge pull request #3 from kate-shine/master
Browse files Browse the repository at this point in the history
Quick fixes mostly for unicode support
  • Loading branch information
m4ll0k authored Jun 1, 2017
2 parents fe48cd3 + 5e32cef commit 629efbb
Show file tree
Hide file tree
Showing 20 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.pyc
Binary file removed core/__init__.pyc
Binary file not shown.
Binary file removed core/lib/__init__.pyc
Binary file not shown.
Binary file removed core/lib/wp_banner.pyc
Binary file not shown.
Binary file removed core/lib/wp_checker.pyc
Binary file not shown.
Binary file removed core/lib/wp_colors.pyc
Binary file not shown.
Binary file removed core/lib/wp_info.pyc
Binary file not shown.
10 changes: 5 additions & 5 deletions core/lib/wp_print.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ class WPPrint:

def aprint(self,string,flag="##"):
# flag = green
print "{}{}{} {}{}{}".format(self.g,str(flag),self.e,self.nw,str(string),self.e)
print u"{}{}{} {}{}{}".format(self.g,flag,self.e,self.nw,string,self.e)

def bprint(self,string,flag="##"):
# flag = red
print "{}{}{} {}{}{}".format(self.r,str(flag),self.e,self.nw,str(string),self.e)
print u"{}{}{} {}{}{}".format(self.r,flag,self.e,self.nw,string,self.e)

def cprint(self,string,flag="##"):
# flag = yellow
print "{}{}{} {}{}{}".format(self.y,str(flag),self.e,self.nw,str(string),self.e)
print u"{}{}{} {}{}{}".format(self.y,flag,self.e,self.nw,string,self.e)

def dprint(self,string,flag="||"):
# flag = green
print "\t{}{}{} {}{}{}".format(self.g,str(flag),self.e,self.nw,str(string),self.e)
print u"\t{}{}{} {}{}{}".format(self.g,flag,self.e,self.nw,string,self.e)

def eprint(self,string,flag="||"):
# flag = red
print "\t{}{}{} {}{}{}".format(self.r,str(flag),self.e,self.nw,str(string),self.e)
print u"\t{}{}{} {}{}{}".format(self.r,flag,self.e,self.nw,string,self.e)

Binary file removed core/lib/wp_print.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion core/lib/wp_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def Send(self,url,method='GET',payload=None,headers=None,cookie=None):
resp = urllib2.urlopen(req)
except urllib2.HTTPError,e:
resp = e
return resp.read(),resp.geturl(),resp.getcode(),resp.info()
return resp.read().decode('utf-8'),resp.geturl(),resp.getcode(),resp.info()

class NoRedirectHandler(urllib2.HTTPRedirectHandler):
def http_error_302(self,req,fp,code,msg,headers):
Expand Down
Binary file removed core/lib/wp_request.pyc
Binary file not shown.
Binary file removed core/modules/__init__.pyc
Binary file not shown.
Binary file removed core/modules/wp_attack.pyc
Binary file not shown.
Binary file removed core/modules/wp_brute.pyc
Binary file not shown.
Binary file removed core/modules/wp_generic.pyc
Binary file not shown.
Binary file removed core/modules/wp_plugin.pyc
Binary file not shown.
Binary file removed core/modules/wp_theme.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion core/modules/wp_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def init(self):
users.append(x)
if users != []:
for z in range(len(users)):
self.print_.dprint("ID: {} - Name: {}".format(z,users[z]))
self.print_.dprint(u"ID: {} - Name: {}".format(z,users[z]))
print ""
elif users == []:
self.print_.eprint("Not found users ")
Expand Down
Binary file removed core/modules/wp_users.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions wpseku.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
# -*- coding:utf-8 -*-
# WPSeku - Wordpress Security Scanner
# Coded by Momo Outaadi (M4ll0k) (C) 2017
Expand Down Expand Up @@ -182,4 +182,4 @@ def Main(self):
main = WPSeku(sys.argv[1:])
main.Main()
except KeyboardInterrupt:
sys.exit("KeyboardInterrupt!!")
sys.exit("KeyboardInterrupt!!")

0 comments on commit 629efbb

Please sign in to comment.