elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Arreglado, de nuevo, el registro del warzone (wargame) de EHN


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [python]aporte comodines ip
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [python]aporte comodines ip  (Leído 2,011 veces)
daryo


Desconectado Desconectado

Mensajes: 1.070



Ver Perfil WWW
[python]aporte comodines ip
« en: 2 Mayo 2013, 02:34 am »

hecho para un bot que banea por rangos de ip si en listanegra pongo

listanegra.txt
Código:
192.168.*.*
127.0.*.*

entonces buscara todas las ip que tengan esa secuencia..
le cambie una que otra linea aca asi que no se si sirva pero si funcionaba sin las modificaciones en el bot

el parametro es la ip completa :)
Código
  1. def ip(ip1):
  2.     leer=open("listanegra.txt","r")
  3.     lol=leer.readlines()
  4.     for ip2 in lol:
  5.      ip1=ip1.split(".")
  6.      ip2=ip2.replace("\n","")
  7.      ip2=ip2.split(".")
  8.      x=0
  9.      for a in range(len(ip1)):
  10.        if ip2[x+a]=="*":
  11.                del ip1[x+a]
  12.                del ip2[x+a]
  13.                x-=1
  14.    if(ip1==ip2):
  15.        return True:
  16.  
  17.    else:
  18.     return False:


En línea

buenas
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Aporte] Twisted Project [Python]
Scripting
madpitbull_99 0 2,009 Último mensaje 19 Diciembre 2010, 21:38 pm
por madpitbull_99
Keylogger en python(con win32api)[APORTE]
Scripting
WarZ0n3 1 2,944 Último mensaje 17 Abril 2013, 19:33 pm
por daryo
[python] menu pygame aporte
Scripting
daryo 0 3,761 Último mensaje 2 Mayo 2013, 02:45 am
por daryo
[python][aporte]cliente de correo falsificar remitente
Scripting
daryo 0 2,798 Último mensaje 5 Julio 2013, 15:13 pm
por daryo
[Aporte][Python]Linux Magazine Downloader v1.0
Scripting
electrodev 0 2,130 Último mensaje 9 Agosto 2013, 00:08 am
por electrodev
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines