Xractz

Save Your File

Aug 10th, 2019
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | None | 0 0
  1. #Xractz
  2. #IndoSec
  3.  
  4. from requests import Session
  5. import re, sys, json
  6. s = Session()
  7.  
  8. print("Save File by Xractz - IndoSec\nThis tool is useful for saving your files.\n")
  9. file = input("File :  ")
  10.  
  11. url = "https://anonfile.com/api/upload"
  12. headers = {
  13.     'x-requested-with':'XMLHttpRequest',
  14.    
  15. }
  16. try:
  17.     files = open(file,'r')
  18. except:
  19.     print("\n\t* File Not Found! *")
  20.     sys.exit()
  21.  
  22. f = {
  23.     'file':(file, files)
  24. }
  25. cek = s.post(url, headers=headers, files=f).text
  26. hasil = json.loads(cek)
  27.  
  28. print("\nUrl  : ",hasil['data']['file']['url']['short'])
  29. print("Size : ",hasil['data']['file']['metadata']['size']['readable'])
Advertisement
Add Comment
Please, Sign In to add comment