-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
162 additions
and
144 deletions.
There are no files selected for viewing
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
directory/cms/else/cms_identify.txt → directory/cms/cms_fingerprint.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env python | ||
# coding: UTF-8 | ||
|
||
''' | ||
Pentestdb, a database for penetration test. | ||
Copyright (c) 2014-2015 alpha1e0 | ||
==================================================================================================== | ||
This script convert 'cms_fingerprint.txt' to json format file 'cms_fingerprint.json'. | ||
The 'pen.py cms' subcommand will use 'cms_fingerprint.json' to identify the cms type. | ||
''' | ||
|
||
|
||
import json | ||
from collections import OrderedDict | ||
|
||
|
||
if __name__ == '__main__': | ||
source = open("cms_fingerprint.txt", "r") | ||
dest = open("cms_fingerprint.json", "w") | ||
|
||
result = OrderedDict() | ||
|
||
for line in source: | ||
line = line.strip() | ||
if line and not line.startswith("/**"): | ||
l = line.split() | ||
if not result.get(l[0], None): | ||
result[l[0]] = [] | ||
|
||
result[l[0]].append({"need":True if l[1]=="+" else False, "path":l[2], "pattern":None if len(l)==3 else l[3]}) | ||
|
||
#print result | ||
json.dump(result, dest, indent=4) | ||
|
||
source.close() | ||
dest.close() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/local/env python | ||
#coding: UTF-8 | ||
|
||
''' | ||
Pentestdb, a database for penetration test. | ||
Copyright (c) 2014-2015 alpha1e0 | ||
''' | ||
|
||
|
||
import json | ||
import poplib | ||
|
||
|
||
def getMailServers(mailServersFile): | ||
return json.load(open(mailServersFile,"r")) | ||
|
||
|
||
def checkMail(server,user,passwd,ssl=False,port=None): | ||
if not port: | ||
port = 995 if ssl else 110 | ||
|
||
try: | ||
pop3 = poplib.POP3_SSL(server, port) if ssl else poplib.POP3(server, port) | ||
|
||
pop3.user(user) | ||
auth = pop3.pass_(passwd) | ||
pop3.quit() | ||
except Exception as error: | ||
print "[!] chekcing {0} failed, reason:{1}".format(user, str(error)) | ||
return False | ||
|
||
if "+OK" in auth: | ||
return True | ||
else: | ||
return False |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"qq.com": { | ||
"ssl": true, | ||
"port": 995, | ||
"server": "pop.qq.com" | ||
}, | ||
"163.com": { | ||
"server": "pop3.163.com" | ||
}, | ||
"sina.com": { | ||
"server": "pop.sina.com" | ||
}, | ||
"foxmail.com": { | ||
"server": "pop.qq.com" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
from collections import OrderedDict | ||
import json | ||
|
||
MAILSERVERS = { '163.com':{'server':"pop3.163.com"}, | ||
'qq.com':{'server':"pop.qq.com",'ssl':True,'port':995}, | ||
'foxmail.com':{'server':"pop.qq.com"}, | ||
'sina.com':{'server':"pop.sina.com"}, | ||
'vmeti.com':{'server':"vmeti.com"}, | ||
'netwayer.com':{'server':"netwayer.com"}, | ||
'ehanlin.com':{'server':"123.108.216.97"}, | ||
'sootoo.com':{'server':"mail.sootoo.com"}, | ||
} | ||
|
||
|
||
mails = OrderedDict(MAILSERVERS) | ||
|
||
dest = open("mail_server.json", "w") | ||
|
||
json.dump(mails, dest, indent=4) |