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 / build.gradle.kts
Created January 22, 2024 23:03 — forked from mileskrell/build.gradle.kts
Example of declaring Android signing configs using Gradle Kotlin DSL
android {
signingConfigs {
getByName("debug") {
keyAlias = "debug"
keyPassword = "my debug key password"
storeFile = file("/home/miles/keystore.jks")
storePassword = "my keystore password"
}
create("release") {
keyAlias = "release"
@gauravssnl
gauravssnl / simpleRadioAdAway.js
Last active January 16, 2024 20:39
Simple Radio Ad Away Frida Script
console.log("Script loaded successfully ");
Java.perform(() => {
const BaseActivity = Java.use('com.streema.simpleradio.SimpleRadioBaseActivity');
BaseActivity.initAds.implementation = function () { };
BaseActivity.preloadActivityAds.implementation = function () { };
BaseActivity.isPremium.implementation = function () {
@gauravssnl
gauravssnl / frida_ssl_pin_bypass.js
Created January 15, 2024 20:39
Frida SSL Pinning bypass
/*
Android SSL Re-pinning frida script v0.2 030417-pier
$ adb push burpca-cert-der.crt /data/local/tmp/cert-der.crt
$ frida -U -f it.app.mobile -l frida-android-repinning.js --no-pause
https://techblog.mediaservice.net/2017/07/universal-android-ssl-pinning-bypass-with-frida/
UPDATE 20191605: Fixed undeclared var. Thanks to @oleavr and @ehsanpc9999 !
*/
@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