forked from shadow-box/Violent-Python-Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit of unmodified example downloads
- Loading branch information
shadow-box
committed
Dec 16, 2012
0 parents
commit aee13e3
Showing
90 changed files
with
3,918 additions
and
0 deletions.
There are no files selected for viewing
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,22 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
*.sln merge=union | ||
*.csproj merge=union | ||
*.vbproj merge=union | ||
*.fsproj merge=union | ||
*.dbproj merge=union | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain |
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,163 @@ | ||
################# | ||
## Eclipse | ||
################# | ||
|
||
*.pydevproject | ||
.project | ||
.metadata | ||
bin/ | ||
tmp/ | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib | ||
local.properties | ||
.classpath | ||
.settings/ | ||
.loadpath | ||
|
||
# External tool builders | ||
.externalToolBuilders/ | ||
|
||
# Locally stored "Eclipse launch configurations" | ||
*.launch | ||
|
||
# CDT-specific | ||
.cproject | ||
|
||
# PDT-specific | ||
.buildpath | ||
|
||
|
||
################# | ||
## Visual Studio | ||
################# | ||
|
||
## Ignore Visual Studio temporary files, build results, and | ||
## files generated by popular Visual Studio add-ons. | ||
|
||
# User-specific files | ||
*.suo | ||
*.user | ||
*.sln.docstates | ||
|
||
# Build results | ||
[Dd]ebug/ | ||
[Rr]elease/ | ||
*_i.c | ||
*_p.c | ||
*.ilk | ||
*.meta | ||
*.obj | ||
*.pch | ||
*.pdb | ||
*.pgc | ||
*.pgd | ||
*.rsp | ||
*.sbr | ||
*.tlb | ||
*.tli | ||
*.tlh | ||
*.tmp | ||
*.vspscc | ||
.builds | ||
*.dotCover | ||
|
||
## TODO: If you have NuGet Package Restore enabled, uncomment this | ||
#packages/ | ||
|
||
# Visual C++ cache files | ||
ipch/ | ||
*.aps | ||
*.ncb | ||
*.opensdf | ||
*.sdf | ||
|
||
# Visual Studio profiler | ||
*.psess | ||
*.vsp | ||
|
||
# ReSharper is a .NET coding add-in | ||
_ReSharper* | ||
|
||
# Installshield output folder | ||
[Ee]xpress | ||
|
||
# DocProject is a documentation generator add-in | ||
DocProject/buildhelp/ | ||
DocProject/Help/*.HxT | ||
DocProject/Help/*.HxC | ||
DocProject/Help/*.hhc | ||
DocProject/Help/*.hhk | ||
DocProject/Help/*.hhp | ||
DocProject/Help/Html2 | ||
DocProject/Help/html | ||
|
||
# Click-Once directory | ||
publish | ||
|
||
# Others | ||
[Bb]in | ||
[Oo]bj | ||
sql | ||
TestResults | ||
*.Cache | ||
ClientBin | ||
stylecop.* | ||
~$* | ||
*.dbmdl | ||
Generated_Code #added for RIA/Silverlight projects | ||
|
||
# Backup & report files from converting an old project file to a newer | ||
# Visual Studio version. Backup files are not needed, because we have git ;-) | ||
_UpgradeReport_Files/ | ||
Backup*/ | ||
UpgradeLog*.XML | ||
|
||
|
||
|
||
############ | ||
## Windows | ||
############ | ||
|
||
# Windows image file caches | ||
Thumbs.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
|
||
############# | ||
## Python | ||
############# | ||
|
||
*.py[co] | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
dist | ||
build | ||
eggs | ||
parts | ||
bin | ||
var | ||
sdist | ||
develop-eggs | ||
.installed.cfg | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
.coverage | ||
.tox | ||
|
||
#Translations | ||
*.mo | ||
|
||
#Mr Developer | ||
.mr.developer.cfg | ||
|
||
# Mac crap | ||
.DS_Store |
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,57 @@ | ||
#!/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]) +\ | ||
' <vuln filename>' | ||
exit(0) | ||
|
||
portList = [21,22,25,80,110,443] | ||
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() |
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,30 @@ | ||
#!/usr/bin/python | ||
# -*- coding: utf-8 -*- | ||
import crypt | ||
|
||
|
||
def testPass(cryptPass): | ||
salt = cryptPass[0:2] | ||
dictFile = open('dictionary.txt', 'r') | ||
for word in dictFile.readlines(): | ||
word = word.strip('\n') | ||
cryptWord = crypt.crypt(word, salt) | ||
if cryptWord == cryptPass: | ||
print '[+] Found Password: ' + word + '\n' | ||
return | ||
print '[-] Password Not Found.\n' | ||
return | ||
|
||
|
||
def main(): | ||
passFile = open('passwords.txt') | ||
for line in passFile.readlines(): | ||
if ':' in line: | ||
user = line.split(':')[0] | ||
cryptPass = line.split(':')[1].strip(' ') | ||
print '[*] Cracking Password For: ' + user | ||
testPass(cryptPass) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
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,41 @@ | ||
#!/usr/bin/python | ||
# -*- coding: utf-8 -*- | ||
import zipfile | ||
import optparse | ||
from threading import Thread | ||
|
||
|
||
def extractFile(zFile, password): | ||
try: | ||
zFile.extractall(pwd=password) | ||
print '[+] Found password ' + password + '\n' | ||
except: | ||
pass | ||
|
||
|
||
def main(): | ||
parser = optparse.OptionParser("usage %prog "+\ | ||
"-f <zipfile> -d <dictionary>") | ||
parser.add_option('-f', dest='zname', type='string',\ | ||
help='specify zip file') | ||
parser.add_option('-d', dest='dname', type='string',\ | ||
help='specify dictionary file') | ||
(options, args) = parser.parse_args() | ||
if (options.zname == None) | (options.dname == None): | ||
print parser.usage | ||
exit(0) | ||
else: | ||
zname = options.zname | ||
dname = options.dname | ||
|
||
zFile = zipfile.ZipFile(zname) | ||
passFile = open(dname) | ||
|
||
for line in passFile.readlines(): | ||
password = line.strip('\n') | ||
t = Thread(target=extractFile, args=(zFile, password)) | ||
t.start() | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
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,8 @@ | ||
apple | ||
orange | ||
egg | ||
lemon | ||
grapes | ||
secret | ||
strawberry | ||
password |
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,2 @@ | ||
victim: HX9LLTdc/jiDE: 503:100:Iama Victim:/home/victim:/bin/sh | ||
root: DFNFxgW7C05fo: 504:100: Markus Hess:/root:/bin/bash |
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,17 @@ | ||
3Com 3CDaemon FTP Server Version 2.0 | ||
Ability Server 2.34 | ||
CCProxy Telnet Service Ready | ||
ESMTP TABS Mail Server for Windows NT | ||
FreeFloat Ftp Server (Version 1.00) | ||
IMAP4rev1 MDaemon 9.6.4 ready | ||
MailEnable Service, Version: 0-1.54 | ||
NetDecision-HTTP-Server 1.0 | ||
PSO Proxy 0.9 | ||
SAMBAR | ||
Sami FTP Server 2.0.2 | ||
Spipe 1.0 | ||
TelSrv 1.5 | ||
WDaemon 6.8.5 | ||
WinGate 6.1.1 | ||
Xitami | ||
YahooPOPs! Simple Mail Transfer Service Ready |
Oops, something went wrong.