-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhackazure.py
More file actions
65 lines (56 loc) · 2.39 KB
/
hackazure.py
File metadata and controls
65 lines (56 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import sqlite3
import requests
from selenium import webdriver
from selenium.webdriver.common.by import By
from faker import Faker
import os
import time
# Step 1: Spoof Identity
def spoof_identity():
# A. Rotate IP via ProxyChain (pre-configured proxies in /etc/proxychains.conf)
os.system("proxychains curl -s ifconfig.me > /dev/null 2>&1") # Test proxy
# B. Generate fake credentials
fake = Faker()
name = fake.name()
email = fake.email()
# C. Mask MAC address
os.system("macchanger -r eth0 > /dev/null 2>&1")
return name, email
# Step 2: Azure Trial Automation
def azure_signup(name, email):
# A. Configure Selenium with proxy
options = webdriver.ChromeOptions()
options.add_argument("--proxy-server=socks5://127.0.0.1:9050")
driver = webdriver.Chrome(options=options)
driver.get("https://azure.microsoft.com/free")
# B. Autofill form
driver.find_element(By.ID, "email").send_keys(email)
driver.find_element(By.ID, "name").send_keys(name)
# C. Bypass SMS via smspva.com API (replace API_KEY)
sms_api = "https://smspva.com/api.php?method=get_number&service=azure&apikey=API_KEY"
phone = requests.get(sms_api).json()["number"]
driver.find_element(By.ID, "phone").send_keys(phone)
# D. Use privacy.com burner card (replace API_KEY)
privacy_api = "https://api.privacy.com/v1/card/Create"
headers = {"Authorization": "Bearer API_KEY"}
card_data = requests.post(privacy_api, headers=headers).json()
driver.find_element(By.ID, "card").send_keys(card_data["card_number"])
# E. Submit and capture credit
driver.find_element(By.ID, "submit").click()
time.sleep(10)
driver.quit()
return email, card_data["id"]
# Step 3: Mass Activation
def mass_activate():
conn = sqlite3.connect("cred.db")
cursor = conn.cursor()
cursor.execute("CREATE TABLE IF NOT EXISTS azure (email TEXT, card_id TEXT)")
for i in range(3): # Rotate every 3 signups
name, email = spoof_identity()
azure_data = azure_signup(name, email)
cursor.execute("INSERT INTO azure VALUES (?, ?)", azure_data)
conn.commit()
if (i + 1) % 3 == 0:
os.system("proxychains -q curl https://ip.seeip.org") # Force IP rotation
# DEPLOY: Run in AWS free tier VM via "nohup python3 azure_exploit.py &"
mass_activate()