File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import cms
99import sys
1010import whois
11+ import skg
12+
1113reload (sys )
1214sys .setdefaultencoding ('utf-8' )
1315
@@ -76,5 +78,15 @@ def whoisa():
7678 else :
7779 return render_template ('whois.html' ,title = "Whois查询" )
7880
81+ #调用外部社工库进行查询
82+ @app .route ('/pass' ,methods = ["get" ,"post" ])
83+ def findpass ():
84+ if request .method == 'POST' :
85+ info = request .form .get ("search" )
86+ data = skg .findpass (info )
87+ return render_template ('skg.html' ,data = data ,title = "社工库查询" )
88+ else :
89+ return render_template ('skg.html' ,title = "社工库查询" )
90+
7991if __name__ == '__main__' :
8092 app .run (debug = True )
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+ # coding=utf-8
3+
4+ """
5+ 社工库调用
6+ """
7+
8+ import requests
9+ import json
10+
11+ def findpass (username ):
12+ payload = {'q' :username }
13+ headers = {"Accept" :"application/json, text/javascript, */*; q=0.01" ,
14+ "User-Agent" :"Mozilla/5.0 (Windows NT 9.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36" ,
15+ "Referer" :"http://www.fangzhuangku.com/pwd" }
16+ r = requests .post ("http://www.fangzhuangku.com/function/pwdsearch.php" ,data = payload ,headers = headers )
17+ s = json .loads (r .text )
18+ sdata = s ["data" ]
19+ dict = list ()
20+ if len (sdata ):
21+ for key in sdata :
22+ for key1 in sdata [key ]:
23+ ls_data = {'u' :'' ,'p' :'' ,'e' :'' ,'s' :key }
24+ if 'u' in key1 .keys ():
25+ ls_data ["u" ] = key1 ["u" ]
26+ if 'p' in key1 .keys ():
27+ ls_data ["p" ] = key1 ["p" ]
28+ if 'e' in key1 .keys ():
29+ ls_data ["e" ] = key1 ["e" ]
30+ dict .append (ls_data )
31+ return dict
32+ if __name__ == '__main__' :
33+ pass
Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ <h1 class="am-topbar-brand">
167167 < li > < a href ="/webdna "> < span class ="am-icon-windows "> </ span > CMS识别</ a > </ li >
168168 < li > < a href ="/password "> < span class ="am-icon-cube "> </ span > 密码生成</ a > </ li >
169169 < li > < a href ="/whois "> < span class ="am-icon-cube "> </ span > whois查询</ a > </ li >
170+ < li > < a href ="/pass "> < span class ="am-icon-cube "> </ span > 社工库</ a > </ li >
170171 < li > < a href ="javascript:; " id ="admin-fullscreen "> < span class ="am-icon-arrows-alt "> </ span > < span class ="admin-fullText "> 开启全屏</ span > </ a > </ li >
171172
172173 </ ul >
Original file line number Diff line number Diff line change 1+ {% extends "base.html" %}
2+ {% block content %}
3+ < div class ="get ">
4+ < div class ="am-g ">
5+ < div class ="am-u-lg-12 ">
6+ < h1 class ="get-title "> 社工库在线查询</ h1 >
7+ </ div >
8+ < div class ="am-form-group ">
9+ < form action ="/pass " method ="POST ">
10+ < div class ="am-u-sm-5 am-u-sm-offset-3 ">
11+ < input id ='search1 ' type ="text " name ="search " minchecked ="3 " class ="am-form-field am-round " placeholder ="请输入要查询的 qq email "/>
12+ </ div >
13+ < div class ="am-u-sm-1 ">
14+ < button id ='search ' type ="submit " class ="am-btn am-btn-primary "> 查询</ button >
15+ </ div >
16+
17+ < div class ="box ">
18+ </ div > </ form >
19+ </ div >
20+ </ div >
21+ </ div >
22+
23+ < div class ="about ">
24+ < div class ="am-g am-container ">
25+ < div class ="am-g doc-am-g ">
26+ < div class ="am-form-group ">
27+ {% if data %}
28+ < table class ="am-table am-table-bordered am-table-radius ">
29+ < thead >
30+ < tr >
31+ < th > 用户名</ th >
32+ < th > 密码</ th >
33+ < th > 邮箱</ th >
34+ < th > 来源</ th >
35+ </ tr >
36+ </ thead >
37+ < tbody >
38+ {%for pass in data %}
39+ < tr >
40+ < td > {{pass.u}}</ td >
41+ < td > {{pass.p}}</ td >
42+ < td > {{pass.e}}</ td >
43+ < td > {{pass.s}}</ td >
44+ </ tr >
45+ {%endfor%}
46+ </ tbody >
47+ </ table >
48+ {% endif %}
49+
50+
51+ < div class ="box ">
52+ </ div >
53+ </ div >
54+ </ div >
55+ </ div >
56+
57+ </ div >
58+ {% endblock %}
You can’t perform that action at this time.
0 commit comments