Return to Snippet

Revision: 28244
at July 5, 2010 17:09 by heellxz


Updated Code
import urllib
import os.path

############################
############################
####    ####    ####    ####
####    ####    ####    ####
####    ####    ####    ####
####            ####    ####
####            ####    ####
####    ####    ############
####    ####    ####    ####
####    ####    ####    ####
############################
############################

counter = 0
aux = ""
max = 0

print "Scanner de Grupos Por Cesar Vasquez C (AKA Heellxz).\n"
rango = raw_input(">>Ingresa rango: ")

if os.path.exists("max.txt") == True:
    max_group = open('max.txt', 'r')
    max_init = max_group.read()
    max_group.close()
else:
    max_init = 0

for i in range(int(max_init),int(max_init) + int(rango) + 1):
    
    a = urllib.urlopen("http://www.habbo.es/groups/" + str(i) + "/id")
    b = a.read()
    
    if b.find("no encontrada! </title>") > 0:
        counter = counter + 1
        if max == 0:
            max = i

    if b.find("/home/.adgar.") > 0:
        print "Grupo de adgar: http://www.habbo.es/groups/" + str(i) + "/id"
        aux = aux + "http://www.habbo.es/groups/" + str(i) + "/id\n"

    if counter == 5:
        break

    print "Buscando..."

if max == 0:
    max = int(max_init) + int(rango)

print "Ultima home encontrada: " + str(max)

max_group = open('max.txt', 'w')
max_group.write(str(max))
max_group.close()

groups = open('grupos.txt', 'w')
groups.write(aux)
groups.close()

Revision: 28243
at July 5, 2010 17:07 by heellxz


Initial Code
import urllib
import os.path

############################
############################
####    ####    ####    ####
####    ####    ####    ####
####    ####    ####    ####
####            ####    ####
####            ####    ####
####    ####    ############
####    ####    ####    ####
####    ####    ####    ####
############################
############################

counter = 0
aux = ""
max = 0

print "Scanner de Grupos Por Cesar Vasquez C (AKA Heellxz).\n"
rango = raw_input(">>Ingresa rango: ")

if os.path.exists("max.txt") == True:
    max_group = open('max.txt', 'r')
    max_init = max_group.read()
    max_group.close()
else:
    max_init = 0

for i in range(int(max_init),int(max_init) + int(rango) + 1):
    
    a = urllib.urlopen("http://www.habbo.es/groups/" + str(i) + "/id")
    b = a.read()
    
    if b.find("no encontrada! </title>") > 0:
        counter = counter + 1
        if max == 0:
            max = i

    if b.find("/home/.adgar.") > 0:
        print "Grupo de adgar: http://www.habbo.es/groups/" + str(i) + "/id"
        aux = aux + "http://www.habbo.es/groups/" + str(i) + "/id\n"

    if max == 5:
        break

    print "Buscando..."

if max == 0:
    max = int(max_init) + int(rango)

print "Ultima home encontrada: " + str(max)

max_group = open('max.txt', 'w')
max_group.write(str(max))
max_group.close()

groups = open('grupos.txt', 'w')
groups.write(aux)
groups.close()

Initial URL

                                

Initial Description
Scanner de grupos de habbo.es, identifica los grupos que son creados por el administrador (.adgar.) y crea un log con los grupos nuevos.

Initial Title
Habbo Groups Scanner

Initial Tags

                                

Initial Language
Python