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

 

 


Tema destacado: Tutorial básico de Quickjs


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [Python]Rapidshare Account Checker v0.1
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Python]Rapidshare Account Checker v0.1  (Leído 3,357 veces)
Mi4night

Desconectado Desconectado

Mensajes: 12


The Art of Mind Fucking...


Ver Perfil
[Python]Rapidshare Account Checker v0.1
« en: 7 Octubre 2010, 04:05 am »

Okay after i haven't posted anything for so long now, i coded this 2 days while I'm learning some python this Account Checker Script it works Pretty simple the script's speak's for itself.
To run it you need Python 3.1.
Let me know if you like it, or think there's something i can improve or add.
The single account check is pretty ugly yet need to read more about formating string in Python till then here it is.
(Rapidshare API makes life easier ;))
Código:
#!/usr/bin/python3
import os, sys,urllib.request

#Checking what platform we're running on to perform CLI cleaning.
if sys.platform == ('win32' or 'win64'): os.system('cls')
elif sys.platform == ('linux' or 'linux2'): os.system('clear')

print('#----------------------------------------------------------------------#')
print('# Script Name : Rapidshare Account Checker v0.1                        #')
print('# Author      : Mi4night                                               #')
print('# E-Mail      : mi4night@hotmail.com                                   #')
print('# Purpose     : rsc.py rchecklist.txt | or simply exec script          #')
print('# Usage       : At your own risk                                       #')
print('# List Format : username:password and new line                         #')
print('#----------------------------------------------------------------------#\n')

def main():
    if len(sys.argv) == 1:
       PromptedExec()
    else:
       ListCheck(sys.argv[1])

def PromptedExec():#Prompt User for Input to get Account Informations.
    Username = input("Please enter your Username:")
    Password = input("Please enter your Password:")
    print('--------------------------------------')

    try:
       if len(Username) and len(Password) != 0:
          Response = urllib.request.urlopen("http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=getaccountdetails_v1&type=prem&login="+Username+"&password="+Password)
          ResOut = Response.read()
          Response.close()

          if len(ResOut) < 44:
             print('Login failed.')
          else:
             List = ResOut
             for Items in List.split():
                 print(Items)
              
            
       else:
          print ("You forgot to enter your Username or Password")
          sys.exit(0)
    except:
          print('Error Accured!')
      
def ListCheck(FileName):#Check's a list with account's if there broken or still working.

    try:
        CurrDir = os.getcwd() + '\\'
        FileHwnd = open(CurrDir + FileName)
    
        for line in FileHwnd.readlines():
            sBuffer = line
            AccountInfo = sBuffer.split(':')
            RsUsername = AccountInfo[0]
            RsPassword = AccountInfo[1]
            Response = urllib.request.urlopen("http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=getaccountdetails_v1&type=prem&login="+RsUsername+"&password="+RsPassword)
            ResOut = Response.read()
            Response.close()

            if len(ResOut) < 44:
               print('Username:{} Password:{} is not working. :('.format(RsUsername,RsPassword))
               print('------------------------------------------------------------------------')
            else:
               print('Username:{} Password:{} is working!'.format(RsUsername,RsPassword))
               print('------------------------------------------------------------------------')

               #Open File and write/append all working account's in it.
               File = open(CurrDir + 'Working Accounts.txt','a')
               File.writelines(RsUsername + ':' + RsPassword + '\n')

        print("\nAll working account's have been saved in the file (Working Account's.txt)")
        print("*************************************************************************")
        print("For suggestion's found bugs and idea's mail me mi4night@hotmail.com")

    except:
          print('Error Accured!')

    
if __name__ == '__main__':main()




« Última modificación: 7 Octubre 2010, 04:07 am por Mi4night » En línea

[L]ord [R]NA


Desconectado Desconectado

Mensajes: 1.513

El Dictador y Verdugo de H-Sec


Ver Perfil WWW
Re: [Python]Rapidshare Account Checker v0.1
« Respuesta #1 en: 11 Octubre 2010, 07:11 am »

Mi4night Good code... the next time try to write in spanish because some users don't understand english.


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines