Skip to content

Commit

Permalink
update for v1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
LyleMi committed Jun 14, 2020
1 parent fc87bf5 commit de2a8e8
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 2 deletions.
1 change: 0 additions & 1 deletion saker/brute/smtp.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ def do(self, user, res):
return True
except smtplib.SMTPAuthenticationError:
pass

return False
1 change: 1 addition & 0 deletions saker/core/sess.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def cacheGet(self, path="", cachefile=None):
return fh.read()
else:
self.get(path)
self.logger.debug('cache save %s to file %s' % (path, cachefile))
with open(cachefile, 'wb') as fh:
fh.write(self.lastr.content)
return self.lastr.content
Expand Down
1 change: 1 addition & 0 deletions saker/fuzzers/ssti.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class SSTI(Fuzzer):
"Jinja2": "{{ config.items() }}",
"Django": "{{ request }}",
"ruby": "<%= 7 * 7 %>",
"freemaker": "${7*7}",
"ruby": "${7*7}",
"Twig": "{{ 7*7 }}",
}
Expand Down
9 changes: 9 additions & 0 deletions saker/utils/dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,12 @@ def traverse(path):
yield p
elif os.path.isfile(tmp):
yield tmp


def makeIfNotExists(path):
paths = path.split(os.sep)
cur = ''
for path in paths:
cur = os.path.join(cur, path)
if not os.path.exists(cur):
os.mkdir(cur)
6 changes: 6 additions & 0 deletions saker/utils/encode.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
from urllib.parse import unquote


def b64e(s):
if isinstance(s, str):
s = s.encode()
return base64.b64encode(s).decode()


def b64d(s):
'''
auto handle url encode / url safe base64
Expand Down
20 changes: 20 additions & 0 deletions saker/utils/info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import re


def extractIP(content):
ipre = r'(((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3})'
reg = re.compile(ipre)
datas = reg.findall(content)
for data in datas:
yield data


def extractPhone(content):
phone = r'((13[0-9]|14[5-9]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8})'
reg = re.compile(phone)
datas = reg.findall(content)
for data in datas:
yield data
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setup(
name="Saker",
version="1.0.5",
version="1.0.6",
keywords=("Web Security", "Fuzz"),
description="Tool For Fuzz Web Applications",
long_description=long_description,
Expand Down

0 comments on commit de2a8e8

Please sign in to comment.