Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import annotations | |
| # -*- coding: utf-8 -*- | |
| """ | |
| :description: KiteConnect (Batteries Included) On Steroids Version. | |
| :license: MIT. | |
| :author: Dr June Moone | |
| :created: On Saturday July 29, 2023 19:56:53 GMT+05:30 | |
| """ | |
| __author__ = "Dr June Moone" | |
| __webpage__ = "https://github.com/MooneDrJune" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import annotations | |
| from asyncio.exceptions import CancelledError | |
| from typing import ( | |
| Any, | |
| Callable, | |
| Dict, | |
| List, | |
| Literal, | |
| Optional, | |
| NoReturn, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| from scipy.stats import norm | |
| def BSM_withAdjoints(S0, r, y, sig, K, T): | |
| #Evaluation | |
| sqrtT = math.sqrt(T) | |
| df = math.exp(-r * T) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from Crypto.Cipher import AES | |
| from Crypto.Util import Padding | |
| from hashlib import md5 | |
| from base64 import b64encode, b64decode | |
| import sys | |
| passphrase = sys.argv[1] | |
| content = sys.argv[2] | |
| print(passphrase, content) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // use to generate key : 'openssl rand -hex 32' | |
| function my_encrypt($data, $passphrase) { | |
| $secret_key = hex2bin($passphrase); | |
| $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc')); | |
| $encrypted_64 = openssl_encrypt($data, 'aes-256-cbc', $secret_key, 0, $iv); | |
| $iv_64 = base64_encode($iv); | |
| $json = new stdClass(); | |
| $json->iv = $iv_64; |
We can't make this file beautiful and searchable because it's too large.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Timestamp,Open,High,Low,Close,Volume,OI | |
| 2024-02-07 15:29:58,45916.4,45916.4,45916.4,45916.4,0,0 | |
| 2024-02-08 09:15:00,45970.15,45980.35,45970.15,45980.35,0,0 | |
| 2024-02-08 09:15:01,46006.05,46006.05,45977.75,45977.75,0,0 | |
| 2024-02-08 09:15:02,46026.1,46026.1,46011.7,46011.7,0,0 | |
| 2024-02-08 09:15:04,46016.5,46016.5,46016.5,46016.5,0,0 | |
| 2024-02-08 09:15:05,46027.7,46027.7,46022.05,46022.05,0,0 | |
| 2024-02-08 09:15:07,46028.05,46028.05,46009.25,46009.25,0,0 | |
| 2024-02-08 09:15:08,46025.75,46025.75,46025.75,46025.75,0,0 | |
| 2024-02-08 09:15:09,46004.85,46004.85,46004.85,46004.85,0,0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import annotations | |
| import re, pandas as pd | |
| from typing import Dict | |
| from functools import lru_cache | |
| from datetime import date, datetime as dt | |
| DERIVATIVES_TRADINGSYMBOL_META = re.compile( | |
| "(?P<instrument>[A-Z]+)(?P<expiry>[A-Z0-9]{5})(?P<instrument_type>[A-Z0-9.]+)" | |
| ) | |
| OND_MAP = {"O": "Oct", "N": "Nov", "D": "Dec"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging, pyotp, kiteconnect.exceptions as ex | |
| from kiteconnect import KiteConnect | |
| logging.basicConfig(level=logging.DEBUG) | |
| log = logging.getLogger(__name__) | |
| class Kite(KiteConnect): | |
| KITE_API_DEV_LOGIN = "https://kite.trade/connect/login" |
NewerOlder