Skip to content

Instantly share code, notes, and snippets.

View habibiefaried's full-sized avatar
🏃‍♂️
Working non-stop

Habibie Faried habibiefaried

🏃‍♂️
Working non-stop
View GitHub Profile
@jevakallio
jevakallio / readme.md
Last active March 29, 2025 10:32
`adb pull` from app data directory without root access

TL;DR;

com.package.name is your app identifier, and the file path is relative to the app user's home directory, e.g. '/data/user/0/com.package.name.

adb shell run-as com.package.name cp relative/path/file.ext /sdcard
adb pull /sdcard/file.ext

See long explanation below.

@nicosingh
nicosingh / .env
Last active December 17, 2024 01:10
MySQL cluster using docker
MYSQL_ROOT_PASSWORD=rootpass
@PurpleBooth
PurpleBooth / Dockerfile
Last active March 21, 2024 09:33
Create a static binary in go and put it in a from scratch docker container
FROM golang:1.9
WORKDIR /go/src/github.com/purplebooth/example
COPY . .
RUN go build -ldflags "-linkmode external -extldflags -static" -a main.go
FROM scratch
COPY --from=0 /go/src/github.com/purplebooth/example/main /main
CMD ["/main"]
@mbrownnycnyc
mbrownnycnyc / android_apk_cert_pinning_mitm.txt
Last active March 18, 2023 03:32
Android APK cert pinning removal and MiTM - focusing on Sense Home Energy Monitor APK
https://dl.google.com/android/repository/tools_r25.2.3-windows.zip
https://medium.com/@felipecsl/bypassing-certificate-pinning-on-android-for-fun-and-profit-1b0d14beab2b#.pnph846be
http://www.security-assessment.com/files/documents/whitepapers/Bypassing%20SSL%20Pinning%20on%20Android%20via%20Reverse%20Engineering.pdf
https://stackoverflow.com/questions/64364407/app-not-installing-in-android-11-but-works-on-previous-versions
1) download apktool and the build tools (http://androidsdkoffline.blogspot.com/p/android-sdk-build-tools.html) and platform tools (https://developer.android.com/studio/releases/platform-tools.html)
"C:\Users\mbrown\Desktop\Sense APK\apktool" d base.apk
@estesp
estesp / go-containerd.go
Last active January 20, 2020 04:21
Test program for simple containerd gRPC use via client API
package main
import (
"bytes"
"context"
"fmt"
"os"
"strconv"
"strings"
"sync"
@mgeeky
mgeeky / ascii-shellcode-encoder.py
Last active September 12, 2024 06:52
ASCII Shellcode encoder for Exploit Development purposes, utilizing Jon Erickson's substract arguments finding algorithm.
#!/usr/bin/python
#
# Shellcode to ASCII encoder leveraging rebuilding on-the-stack technique,
# and using Jon Erickson's algorithm from Phiral Research Labs `Dissembler`
# utility (as described in: Hacking - The Art of Exploitation).
#
# Basically one gives to the program's output a binary encoded shellcode,
# and it yields on the output it's ASCII encoded form.
#
# This payload will at the beginning align the stack by firstly moving
@josephspurrier
josephspurrier / webserver.go
Created March 21, 2017 04:01
Simple Web Server in Go
package main
import (
"io"
"net/http"
)
func main() {
http.HandleFunc("/", index)
http.ListenAndServe(":8080", nil)
@bussiere
bussiere / compress.go
Created December 22, 2016 01:16
compress uncompress a string in golang
package main
import (
"bytes"
"compress/gzip"
"fmt"
"encoding/base64"
"io/ioutil"
)
@ammario
ammario / ipint.go
Last active February 7, 2025 05:24
Golang IP <-> int conversion
func ip2int(ip net.IP) uint32 {
if len(ip) == 16 {
return binary.BigEndian.Uint32(ip[12:16])
}
return binary.BigEndian.Uint32(ip)
}
func int2ip(nn uint32) net.IP {
ip := make(net.IP, 4)
binary.BigEndian.PutUint32(ip, nn)
@pwlin
pwlin / gist:8a0d01e6428b7a96e2eb
Last active February 25, 2025 03:27
Android : add cert to system store
https://code.google.com/p/android/issues/detail?id=32696#c5
If you have a certificate that is not
trusted by Android, when you add it, it goes in the personal cert store.
When you add a cert in this personal cert store, the system requires a
higher security level to unlock the device. But if you manage to add your
cert to the system store then you don't have this requirement. Obviously,
root is required to add a certificate to the system store, but it is quiet
easy.