Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- import os, sys,urllib.request
- def main():
- if len(sys.argv) == 1:
- Clear_CLI()
- About()
- Prompted_Exec()
- else:
- Clear_CLI()
- About()
- List_Exec(sys.argv[1])
- def About():#Information about the script and Author.
- print('#----------------------------------------------------------------------#')
- print('# Script Name : Rapidshare Account Checker v0.1 #')
- print('# Author : Kreshnik Hasanaj #')
- print('# Mail : kresha7@hotmail.com #')
- print('# WebPage : http://selftaughtgeek.wordpress.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('# Requirements: At your own risk #')
- print('# Distribution: You can freely use this code in your own #')
- print('# applications, but you may not reproduce #')
- print('# or publish this code on any web site, #')
- print('# online service, or distribute as source #')
- print('# on any media without express permission. #')
- print('#----------------------------------------------------------------------#\n')
- def Clear_CLI():#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')
- def Prompted_Exec():#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)
- print('--------------------------------------')
- else:
- print ("You forgot to enter your Username or Password")
- sys.exit(0)
- except:
- print('Error Accured!')
- def List_Exec(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()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement