Skip to content

Instantly share code, notes, and snippets.

@vikychoi
vikychoi / download.js
Created May 22, 2026 03:54
Probably does the same stuff as https://github.com/yunatamos/source-maps-downloader, but in a browser
const loadScript = url => new Promise(r => {
  const s = document.createElement('script');
  s.src = url;
  s.onload = r;
  document.head.appendChild(s);
});
const sanitize = path => path.replace(/["\0<>|?*]/g, '').replace(/\\/g, '/');
const getScriptUrls = () => {
var PROXY_IP = "127.0.0.1";
var PROXY_PORT = 8080;
var proxyBytes = PROXY_IP.split(".").map(Number);
var proxyPortHi = (PROXY_PORT >> 8) & 0xff;
var proxyPortLo = PROXY_PORT & 0xff;
var connect = Module.getExportByName("libc.so", "connect");
Interceptor.attach(connect, {
// frida -U -f com.example.app -l dump.js --no-pause
var app = ObjC.classes.NSBundle.mainBundle();
var path = app.bundlePath().toString();
var name = app.infoDictionary().objectForKey_("CFBundleExecutable").toString();
var outDir = "/tmp/Payload/" + name + ".app";
var _open = new NativeFunction(Module.findExportByName(null, "open"), "int", ["pointer", "int", "int"]);
var _write = new NativeFunction(Module.findExportByName(null, "write"), "int", ["int", "pointer", "int"]);
var _close = new NativeFunction(Module.findExportByName(null, "close"), "int", ["int"]);
var _lseek = new NativeFunction(Module.findExportByName(null, "lseek"), "int64", ["int", "int64", "int"]);
@vikychoi
vikychoi / scan.py
Created March 1, 2026 01:45
Do something with only the Google API key
API_KEY = ""
EMAIL = ""
PASSWORD = ""
PHONE = ""
BASE = "https://identitytoolkit.googleapis.com/v1"
def post(url, data):
    r = requests.post(url, json=data)
    print(f"\n[{url.split('/')[-1].split('?')[0]}] {r.status_code}")
    print(r.json())
@vikychoi
vikychoi / python Ex14
Last active January 30, 2018 09:34
List remove duplicates
def removeduplicates_v1(lst):
lst = set(lst)
return list(lst)
def removeduplicates_v2(lst):
new_lst = []
for i in range((len(lst)-1)):
if (lst[i] not in new_lst):
new_lst.append(lst[i])
return new_lst
eg = [1,2,3,4,1,2,3,4]
@vikychoi
vikychoi / python Ex13
Created January 30, 2018 09:11
Returns value of requested term of Fibonacci number
def fibonnaci(x):
if(x == 1):
return 1
elif(x == 0):
return 0
else:
return fibonnaci(x -1) + fibonnaci(x -2)
number = int(input("Please entre the number of term of fibonnaci number"))
print("The number of ", number,"term of fibonnaci number is ", fibonnaci(number))
@vikychoi
vikychoi / Python Ex12
Created January 27, 2018 16:32
List list ends
def listEnds(list_x):
b = [0,0]
b[0]= list_x[0]
b[1] = list_x[len(list_x)-1]
return b
a = [5, 10, 15, 20, 25]
array = []
array = listEnds(a)
@vikychoi
vikychoi / Python Ex11
Created January 27, 2018 15:49
Check Primality Function
def checkprime(input):
counter = 0
for i in range(1, input+1):
result = input // i
print(result, counter)
if (result * i == input):
counter += 1
if (counter > 2):
return False
return True
#include <stdio.h>
int main()
{
int a, b, c, d;
printf("Enter fraction 1(numerator denominator) \n");
scanf("%d %d", &a,&b);
printf("Enter fraction 2(numerator denominator) \n");
scanf("%d %d", &c, &d);
if (b == 0 || d == 0){
@vikychoi
vikychoi / gist:682091f70bf1bfa7549a9781531ef6a3
Created January 4, 2018 13:53
C for multiplying string
#include <stdio.h>
main()
{
int i;
int p;
for(i = 1; i <=16; i++)
{
for (p=1; p<=i; p++)
{
printf("**");