Skip to content

Instantly share code, notes, and snippets.

# /data/vendor/wifi/cnss_diag.conf
LOG_PATH_FLAG = 0
MAX_LOG_FILE_SIZE = 30
MAX_ARCHIVES = 2
MAX_PKTLOG_ARCHIVES = 4
LOG_STORAGE_PATH = /data/vendor/wlan_logs/
AVAILABLE_MEMORY_THRESHOLD = 100
MAX_LOG_BUFFER = 2
MAX_PKTLOG_BUFFER = 10
@zwyuan
zwyuan / frida-extract-keystore.py
Created September 14, 2019 21:29 — forked from ceres-c/frida-extract-keystore.py
Automatically extract KeyStore objects and relative password from Android applications with Frida - Read more: http://ceres-c.it/frida-android-keystore/
#!/usr/bin/python3
'''
author: ceres-c
usage: ./frida-extract-keystore.py
Once the keystore(s) have been exported you have to convert them to PKCS12 using keytool
'''
import frida, sys, time
@zwyuan
zwyuan / root-ssl-pin-bypass.js
Created May 8, 2019 03:26 — forked from saibikalpa/root-ssl-pin-bypass.js
root & ssl pinning bypass with Frida
Java.perform(function(){
console.log("\nRoot detection & SSL pinning bypass with Frida");
var CertificateFactory = Java.use("java.security.cert.CertificateFactory");
var FileInputStream = Java.use("java.io.FileInputStream");
var BufferedInputStream = Java.use("java.io.BufferedInputStream");
var X509Certificate = Java.use("java.security.cert.X509Certificate");
var KeyStore = Java.use("java.security.KeyStore");
var TrustManagerFactory = Java.use("javax.net.ssl.TrustManagerFactory");
var SSLContext = Java.use("javax.net.ssl.SSLContext");
var Volley = Java.use("com.android.volley.toolbox.Volley");
@zwyuan
zwyuan / remove-macos-hp-driver-5.1.sh
Created February 2, 2018 00:35
Removal script for HP driver 5.1 on macOS
#! /bin/bash
# author: Zengwen Yuan
# date: 2018-01-25
# File location extracted from installation package https://support.apple.com/kb/dl1888?locale=en_US
sudo rm -r /Library/Image\ Capture/Devices/HP\ M1130_M1210\ Scanner.app
sudo rm -r /Library/Image\ Capture/Devices/HPScanner.app/Contents/PlugIns/HPAiOScan.bundle
sudo rm -r /Library/Image\ Capture/Devices/HP\ Scanner\ 3.app/Contents/Frameworks/HPScanServices.framework/Versions/A/PlugIns/HPDOT4Scan.bundle/Contents/PlugIns/HPAiOTulip.bundle
sudo rm -r /Library/Image\ Capture/Devices/HP\ Scanner\ 3.app/Contents/Frameworks/HPScanServices.framework/Versions/A/PlugIns/HPDOT4Scan.bundle
sudo rm -r /Library/Printers/hp/laserjet/p1100_1560_1600series/hpRaster.bundle
@zwyuan
zwyuan / Vagrantfile
Last active June 26, 2017 21:18
Vagrant Installation Script for MobileInsight Development
# -*- mode: ruby -*-
# vi: set ft=ruby :
# MobileInsight Vagrant Installation Script
# Copyright (C) 2017 MobileInsight
# Author: Zengwen Yuan, zyuan (at) cs.ucla.edu
# Version: 1.1 -- 06/22/2017
$INSTALL_BASE = <<SCRIPT
apt-get update
@zwyuan
zwyuan / README.md
Created April 25, 2016 20:59 — forked from agnoster/README.md
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@zwyuan
zwyuan / android_configure.sh
Created February 25, 2016 08:48 — forked from nddrylliog/android_configure.sh
Cross-compile autotools library for Android / arm-linux-androideabi I stick that in ~/bin/, chmod +x, and then run it in place of "./configure" in my project. Then a make and make install later, the prefix contains libraries built for android. Neato eh?
#!/bin/sh
# I put all my dev stuff in here
export DEV_PREFIX=$HOME/Dev/
# Don't forget to adjust this to your NDK path
export ANDROID_NDK=${DEV_PREFIX}/android-ndk-r8d/
export CROSS_COMPILE=arm-linux-androideabi