Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sachinsenal0x64/backstripe
⚙️ Automate Stripe Payments Flexible Way Reverse-Engineered-API
https://github.com/sachinsenal0x64/backstripe
api backstripe checkout decryption enthusiast flexible invoice payments python reverse-engineering stripe
Last synced: 2 months ago
JSON representation
⚙️ Automate Stripe Payments Flexible Way Reverse-Engineered-API
- Host: GitHub
- URL: https://github.com/sachinsenal0x64/backstripe
- Owner: sachinsenal0x64
- License: mit
- Created: 2023-06-07T04:59:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-05T10:04:51.000Z (9 months ago)
- Last Synced: 2024-11-07T18:09:52.277Z (2 months ago)
- Topics: api, backstripe, checkout, decryption, enthusiast, flexible, invoice, payments, python, reverse-engineering, stripe
- Language: Python
- Homepage:
- Size: 51.8 KB
- Stars: 8
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BACKSTRIPE
🔓 You have ability to decrypt the checkout URLs and restore them to their original form. (ENCRYPT + DECRYPT) and Stripe Checkout Session to grab Payment information.
## 🧾 Use Cases
- 🦾 Automation
- 🤸🏻 Flexible
- 🏞️ Use out of the scope (EX: BOTS)
## 🧾 The NutShell
On May 5, 2023, Stripe.com added security measures by using an XOR algorithm to encrypt the client-side key (pk-key) and base64 for the checkout URL. This encryption makes automating tasks with the checkout URL challenging. While automation libraries like Selenium can extract the pk-key, it's slow and not how stripe.com handles the backend. To overcome this, I spent time reverse engineering Stripe API & finding the correct decryption key, using a simple brute force method testing numbers 0 to 1000. The correct key turned out to be 5, allowing for a straightforward Python code to decrypt and build a checkout session in a reverse way.
## 🔑 GAME CHANGER
ACTUAL SIMPLE DECRYPTING PART (AFTER THE DECODE)
Please refer to [stripe.py](https://github.com/sachinsenal0x64/stripe-reverse-checkout-session/blob/main/stripe.py).
```Python
# DECODEprint("Decoded PK value:", decoded_pk)
# ASSIGN
dry = ""
# DECRYPT WITH VALUE 5
for c in decoded_pk:
dry += chr(5 ^ c)print("Decoded ck value:", ck)
print("Decrypted PK value:", dry)
```