資源簡介
Python絕技中文版及源代碼

代碼片段和文件信息
#!/usr/bin/python
#?-*-?coding:?utf-8?-*-
import?socket
import?os
import?sys
def?retBanner(ip?port):
????try:
????????socket.setdefaulttimeout(2)
????????s?=?socket.socket()
????????s.connect((ip?port))
????????banner?=?s.recv(1024)
????????return?banner
????except:
????????return
def?checkVulns(banner?filename):
????f?=?open(filename?‘r‘)
????for?line?in?f.readlines():
????????if?line.strip(‘\n‘)?in?banner:
????????????print?‘[+]?Server?is?vulnerable:?‘?+\
????????????????banner.strip(‘\n‘)
def?main():
????if?len(sys.argv)?==?2:
????????filename?=?sys.argv[1]
????????if?not?os.path.isfile(filename):
????????????print?‘[-]?‘?+?filename?+\
????????????????‘?does?not?exist.‘
????????????exit(0)
????????if?not?os.access(filename?os.R_OK):
????????????print?‘[-]?‘?+?filename?+\
????????????????‘?access?denied.‘
????????????exit(0)
????else:???
????????print?‘[-]?Usage:?‘?+?str(sys.argv[0])?+\
????????????‘?‘
????????exit(0)
????portList?=?[21222580110443]
????for?x?in?range(147?150):
????????ip?=?‘192.168.95.‘?+?str(x)
????????for?port?in?portList:
????????????banner?=?retBanner(ip?port)
????????????if?banner:
????????????????print?‘[+]?‘?+?ip?+?‘?:?‘?+?banner
????????????????checkVulns(banner?filename)
if?__name__?==?‘__main__‘:
????main()
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????1783753??2016-09-01?17:43??Python絕技中文版及源代碼\python絕技.pdf
?????文件????????483??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\.gitattributes
?????文件???????1970??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\.gitignore
?????文件???????1297??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-1\1-vulnScanner.py
?????文件????????755??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-1\2-passwdCrack.py
?????文件???????1026??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-1\3-zipCrack.py
?????文件?????????57??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-1\dictionary.txt
?????文件??????35755??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-1\evil.zip
?????文件????????122??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-1\passwords.txt
?????文件????????400??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-1\vuln-banners.txt
?????文件???????1665??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-2\1-portScan.py
?????文件????????948??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-2\2-nmapScan.py
?????文件???????1101??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-2\3-botNet.py
?????文件???????2379??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-2\3-bruteKey.py
?????文件????????419??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-2\3-pxsshCommand.py
?????文件???????1854??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-2\3-sshBrute.py
?????文件???????1064??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-2\3-sshCommand.py
?????文件????????455??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-2\4-anonLogin.py
?????文件????????791??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-2\4-bruteLogin.py
?????文件????????646??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-2\4-defaultPages.py
?????文件????????645??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-2\4-injectPage.py
?????文件???????3512??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-2\4-massCompromise.py
?????文件???????3206??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-2\5-conficker.py
?????文件???????3126??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-2\6-freeFloat.py
?????文件?????????40??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-2\pass.txt
?????文件?????????69??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-2\userpass.txt
?????文件???????2387??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-3\1-discoverNetworks.py
?????文件???????1013??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-3\2-dumpRecycleBin.py
?????文件????????770??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-3\3-pdfRead.py
?????文件???????1760??2012-12-16?12:35??Python絕技中文版及源代碼\Python絕技源代碼\Chapter-3\4-exifFetch.py
............此處省略73個文件信息
評論
共有 條評論