├── lib ├── __init__.py ├── core │ ├── __init__.py │ ├── Spider.pyc │ ├── common.pyc │ ├── plugin.pyc │ ├── webcms.pyc │ ├── webdir.pyc │ ├── Download.pyc │ ├── PortScan.pyc │ ├── __init__.pyc │ ├── fun_until.pyc │ ├── outputer.pyc │ ├── UrlManager.pyc │ ├── __pycache__ │ │ └── __init__.cpython-36.pyc │ ├── UrlManager.py │ ├── Download.py │ ├── common.py │ ├── plugin.py │ ├── webdir.py │ ├── PortScan.py │ ├── webcms.py │ ├── Spider.py │ ├── fun_until.py │ └── outputer.py └── __init__.pyc ├── script ├── __init__.py ├── __init__.pyc ├── bak_check.pyc ├── sqlcheck.pyc ├── xss_check.pyc ├── email_check.pyc ├── webshell_check.pyc ├── email_check.py ├── webshell_check.py ├── xss_check.py ├── bak_check.py └── sqlcheck.py ├── .vscode └── settings.json ├── readme.md ├── data ├── dir.txt ├── web_shell.dic └── xss.txt ├── test.py └── w8ay.py /lib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /script/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.linting.pylintEnabled": false 3 | } -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/readme.md -------------------------------------------------------------------------------- /data/dir.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/data/dir.txt -------------------------------------------------------------------------------- /lib/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/lib/__init__.pyc -------------------------------------------------------------------------------- /lib/core/Spider.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/lib/core/Spider.pyc -------------------------------------------------------------------------------- /lib/core/common.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/lib/core/common.pyc -------------------------------------------------------------------------------- /lib/core/plugin.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/lib/core/plugin.pyc -------------------------------------------------------------------------------- /lib/core/webcms.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/lib/core/webcms.pyc -------------------------------------------------------------------------------- /lib/core/webdir.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/lib/core/webdir.pyc -------------------------------------------------------------------------------- /script/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/script/__init__.pyc -------------------------------------------------------------------------------- /script/bak_check.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/script/bak_check.pyc -------------------------------------------------------------------------------- /script/sqlcheck.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/script/sqlcheck.pyc -------------------------------------------------------------------------------- /script/xss_check.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/script/xss_check.pyc -------------------------------------------------------------------------------- /lib/core/Download.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/lib/core/Download.pyc -------------------------------------------------------------------------------- /lib/core/PortScan.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/lib/core/PortScan.pyc -------------------------------------------------------------------------------- /lib/core/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/lib/core/__init__.pyc -------------------------------------------------------------------------------- /lib/core/fun_until.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/lib/core/fun_until.pyc -------------------------------------------------------------------------------- /lib/core/outputer.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/lib/core/outputer.pyc -------------------------------------------------------------------------------- /script/email_check.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/script/email_check.pyc -------------------------------------------------------------------------------- /lib/core/UrlManager.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/lib/core/UrlManager.pyc -------------------------------------------------------------------------------- /script/webshell_check.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/script/webshell_check.pyc -------------------------------------------------------------------------------- /lib/core/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boy-hack/shiyanlouscan/HEAD/lib/core/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /data/web_shell.dic: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | 4 5 | 5 6 | 6 7 | 7 8 | 8 9 | 9 10 | 10 11 | 404 12 | data 13 | tools 14 | index0 15 | sh3ll 16 | shell 17 | shel 18 | she 19 | shell1 20 | shell99 21 | root 22 | rootshell 23 | bypass 24 | anonym0us 25 | anonymous 26 | shellnymous 27 | fuck 28 | system 29 | a 30 | b 31 | c 32 | abc 33 | d 34 | e 35 | f 36 | g 37 | h 38 | i 39 | j 40 | k 41 | l 42 | m 43 | n 44 | o 45 | p 46 | y 47 | z 48 | webshell 49 | hack 50 | h4ck -------------------------------------------------------------------------------- /test.py: -------------------------------------------------------------------------------- 1 | 2 | import sys 3 | import urlparse 4 | from script import bak_check 5 | from lib.core import webcms,PortScan,webdir,fun_until 6 | reload(sys) 7 | sys.setdefaultencoding('utf-8') 8 | 9 | if __name__ == "__main__": 10 | # ww = PortScan.PortScan("115.29.233.149") 11 | # ww.work() 12 | 13 | # qq = webdir.webdir("https://blog.yesfree.pw/",20) 14 | # qq.work() 15 | # qq.output() 16 | print "CDN check...." 17 | print fun_until.checkCDN("http://www.baidu.com") 18 | -------------------------------------------------------------------------------- /script/email_check.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # __author__= 'w8ay' 3 | import re 4 | from lib.core import outputer 5 | output = outputer.outputer() 6 | 7 | class spider: 8 | def run(self,url,html): 9 | #print(html) 10 | pattern = re.compile(r'([\w-]+@[\w-]+\.[\w-]+)+') 11 | email_list = re.findall(pattern, html) 12 | if(email_list): 13 | print(email_list) 14 | for email in email_list: 15 | output.add_list("email",email) 16 | return True 17 | return False -------------------------------------------------------------------------------- /lib/core/UrlManager.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | #-*- coding:utf-8 -*- 3 | 4 | class UrlManager(object): 5 | def __init__(self): 6 | self.new_urls = set() 7 | self.old_urls = set() 8 | 9 | def add_new_url(self, url): 10 | if url is None: 11 | return 12 | if url not in self.new_urls and url not in self.old_urls: 13 | self.new_urls.add(url) 14 | 15 | def add_new_urls(self, urls): 16 | if urls is None or len(urls) == 0: 17 | return 18 | for url in urls: 19 | self.add_new_url(url) 20 | 21 | def has_new_url(self): 22 | return len(self.new_urls) != 0 23 | 24 | def get_new_url(self): 25 | new_url = self.new_urls.pop() 26 | self.old_urls.add(new_url) 27 | return new_url -------------------------------------------------------------------------------- /lib/core/Download.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | #-*- coding:utf-8 -*- 3 | 4 | import requests 5 | 6 | class Downloader(object): 7 | def get(self,url): 8 | r = requests.get(url,timeout=10) 9 | if r.status_code != 200: 10 | return None 11 | _str = r.text 12 | return _str 13 | 14 | def post(self,url,data): 15 | r = requests.post(url,data) 16 | _str = r.text 17 | return _str 18 | 19 | def download(self, url,htmls): 20 | if url is None: 21 | return None 22 | _str = {} 23 | _str["url"] = url 24 | try: 25 | r = requests.get(url, timeout=10) 26 | if r.status_code != 200: 27 | return None 28 | _str["html"] = r.text 29 | except Exception, e: 30 | print Exception,":",e 31 | 32 | htmls.append(_str) -------------------------------------------------------------------------------- /script/webshell_check.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # __author__= 'w8ay' 3 | 4 | import os 5 | import sys 6 | 7 | from lib.core.Download import Downloader 8 | from lib.core import outputer 9 | output = outputer.outputer() 10 | filename = os.path.join(sys.path[0],"data","web_shell.dic") 11 | payload = [] 12 | f = open(filename) 13 | a = 0 14 | for i in f: 15 | payload.append(i.strip()) 16 | a+=1 17 | if(a==999): 18 | break 19 | 20 | class spider: 21 | def run(self,url,html): 22 | if(not url.endswith(".php")): 23 | return False 24 | print '[Webshell check]:',url 25 | post_data = {} 26 | for _payload in payload: 27 | post_data[_payload] = 'echo "password is %s";' % _payload 28 | r = Downloader.post(url,post_data) 29 | if(r): 30 | print("webshell:%s"%r) 31 | output.add_list("webshell",r) 32 | return True 33 | return False 34 | -------------------------------------------------------------------------------- /script/xss_check.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | #-*- coding:utf-8 -*- 3 | 4 | from lib.core import Download,common 5 | import sys,os 6 | from lib.core import outputer 7 | output = outputer.outputer() 8 | payload = [] 9 | filename = os.path.join(sys.path[0],"data","xss.txt") 10 | f = open(filename) 11 | for i in f: 12 | payload.append(i.strip()) 13 | 14 | class spider(): 15 | def run(self,url,html): 16 | download = Download.Downloader() 17 | urls = common.urlsplit(url) 18 | 19 | if urls is None: 20 | return False 21 | for _urlp in urls: 22 | for _payload in payload: 23 | _url = _urlp.replace("my_Payload",_payload) 24 | print "[xss test]:",_url 25 | #我们需要对URL每个参数进行拆分,测试 26 | _str = download.get(_url) 27 | if _str is None: 28 | return False 29 | if(_str.find(_payload)!=-1): 30 | print "xss found:%s"%url 31 | output.add_list("xss",url) 32 | return False 33 | 34 | -------------------------------------------------------------------------------- /lib/core/common.py: -------------------------------------------------------------------------------- 1 | import socket 2 | import urlparse 3 | 4 | def urlsplit(url): 5 | domain = url.split("?")[0] 6 | _url = url.split("?")[-1] 7 | pararm = {} 8 | for val in _url.split("&"): 9 | pararm[val.split("=")[0]] = val.split("=")[-1] 10 | 11 | #combine 12 | urls = [] 13 | for val in pararm.values(): 14 | new_url = domain + _url.replace(val,"my_Payload") 15 | urls.append(new_url) 16 | return urls 17 | 18 | def gethostbyname(url): 19 | domain = urlparse.urlparse(url) 20 | # domain.netloc 21 | if domain.netloc is None: 22 | return None 23 | ip = socket.gethostbyname(domain.netloc) 24 | return ip 25 | 26 | def w8urlparse(url): 27 | domain = urlparse.urlparse(url) 28 | # domain.netloc 29 | if domain.netloc is None: 30 | return None 31 | return domain.netloc 32 | 33 | def GetMiddleStr(content,startStr,endStr): 34 | startIndex = content.index(startStr) 35 | if startIndex>=0: 36 | startIndex += len(startStr) 37 | endIndex = content.index(endStr) 38 | return content[startIndex:endIndex] -------------------------------------------------------------------------------- /lib/core/plugin.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # __author__= 'w8ay' 3 | import os 4 | import sys 5 | class spiderplus(object): 6 | def __init__(self,plugin,disallow=[]): 7 | self.dir_exploit = [] 8 | self.disallow = ['__init__'] 9 | self.disallow.extend(disallow) 10 | self.plugin = os.getcwd()+'/' +plugin 11 | sys.path.append(plugin) 12 | 13 | def list_plusg(self): 14 | def filter_func(file): 15 | if not file.endswith(".py"): 16 | return False 17 | for disfile in self.disallow: 18 | if disfile in file: 19 | return False 20 | return True 21 | dir_exploit = filter(filter_func, os.listdir(self.plugin)) 22 | return list(dir_exploit) 23 | 24 | def work(self,url,html): 25 | for _plugin in self.list_plusg(): 26 | try: 27 | m = __import__(_plugin.split('.')[0]) 28 | spider = getattr(m, 'spider') 29 | p = spider() 30 | s =p.run(url,html) 31 | except Exception,e: 32 | print Exception,":",e -------------------------------------------------------------------------------- /data/xss.txt: -------------------------------------------------------------------------------- 1 | "> 2 | "> 3 | "> 4 | "> 5 | ">

Clickme

7 | ">Clickme 8 | ">Clickme 9 | ">click 10 | ">