Skip to content

Instantly share code, notes, and snippets.

View gauravssnl's full-sized avatar
😸
use code::latest ;

GAURAV gauravssnl

😸
use code::latest ;
View GitHub Profile
@gauravssnl
gauravssnl / XHookGms.java
Created January 14, 2024 13:42 — forked from kmark/XHookGms.java
Hooking into any class in Google Play Services
package com.versobit.kmark.gist;
import android.app.Application;
import android.content.Context;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.callbacks.XC_LoadPackage;
import static de.robv.android.xposed.XposedHelpers.findAndHookMethod;
@gauravssnl
gauravssnl / AndroidClasspath.java
Created January 14, 2024 13:41 — forked from kmark/AndroidClasspath.java
Explores the current Android classpath
try {
PathClassLoader pcl = (PathClassLoader) Thread.currentThread().getContextClassLoader();
Field f = Class.forName("dalvik.system.BaseDexClassLoader").getDeclaredField("pathList");
f.setAccessible(true);
Object dpl = f.get(pcl);
Class cls = Class.forName("dalvik.system.DexPathList");
Field f2 = cls.getDeclaredField("dexElements");
f2.setAccessible(true);
Object[] elements = (Object[])f2.get(dpl);
for(Object e : elements) {
@gauravssnl
gauravssnl / TabsAdapter.java
Created January 14, 2024 13:41 — forked from kmark/TabsAdapter.java
An extensible FragmentPagerAdapter that supports both FragmentActivity and Fragment hosts.
package you.should.change.this;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.view.ViewGroup;
@gauravssnl
gauravssnl / root_bypass.js
Created January 4, 2024 19:56 — forked from pich4ya/root_bypass.js
Bypass Android Root Detection / Bypass RootBeer - August 2019
// $ frida -l antiroot.js -U -f com.example.app --no-pause
// CHANGELOG by Pichaya Morimoto ([email protected]):
// - I added extra whitelisted items to deal with the latest versions
// of RootBeer/Cordova iRoot as of August 6, 2019
// - The original one just fucked up (kill itself) if Magisk is installed lol
// Credit & Originally written by: https://codeshare.frida.re/@dzonerzy/fridantiroot/
// If this isn't working in the future, check console logs, rootbeer src, or libtool-checker.so
Java.perform(function() {
var RootPackages = ["com.noshufou.android.su", "com.noshufou.android.su.elite", "eu.chainfire.supersu",
@gauravssnl
gauravssnl / building-gstreamer-from-source.md
Created December 25, 2023 20:09 — forked from SleepingSoul/building-gstreamer-from-source.md
Building GStreamer from source on Linux device

Hardware used: Orange Pi 4 LTS

OS: Armbian Jammy

Should work everywhere on Debian or Ubuntu

Step 1: Install build tools (meson, ninja)

Usually gstreamer uses newer version of meson then available in apt packages, so we need to also build and install it from source. This is super easy. Here I am using 1.2.3 version that is currently latest, but you can use any other version.

sudo apt install pip
@gauravssnl
gauravssnl / ping.py
Created December 24, 2023 06:08 — forked from lotabout/ping.py
Simple ping implementation in python3 for practicing TCP/IP
#!/usr/bin/env python3
import os
import struct
import socket
import time
def checksum(bytestr):
# ref
# - https://en.wikipedia.org/wiki/IPv4_header_checksum
@gauravssnl
gauravssnl / traceroute.py
Created December 24, 2023 06:08 — forked from lotabout/traceroute.py
Simple traceroute implementation in Python3
#!/usr/bin/env python3
import struct
import socket
import time
# Need to run with root permission cause RAW socket is used
# ref:
# - https://dnaeon.github.io/traceroute-in-python/
@gauravssnl
gauravssnl / MyBenchmark.java
Created December 24, 2023 05:54 — forked from lotabout/MyBenchmark.java
CompletableFuture.supplyAsync profile
package me.lotabout;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
@gauravssnl
gauravssnl / MyHttpInjector.kt
Created December 21, 2023 09:50 — forked from hfutxqd/MyHttpInjector.kt
simple http injector sample for netbare
package com.android.netbare
import android.text.TextUtils
import android.util.Log
import com.github.megatronking.netbare.http.HttpBody
import com.github.megatronking.netbare.http.HttpRequest
import com.github.megatronking.netbare.http.HttpResponse
import com.github.megatronking.netbare.injector.InjectorCallback
import com.github.megatronking.netbare.injector.SimpleHttpInjector
import java.io.ByteArrayInputStream