Skip to content

Instantly share code, notes, and snippets.

View Armatix's full-sized avatar

Armatix Armatix

View GitHub Profile
@Armatix
Armatix / f2t.sh
Last active November 4, 2023 11:25
files to text | a one liner to convert files in current directory to a one liner shell script for copy pasting small files
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: $0 <directory/files>"
exit 1
fi
content=$(tar cf - --numeric-owner "$@" | gzip -c | base64) && echo " echo '$content' | base64 -d | gunzip -c | tar xf -"
@Armatix
Armatix / httpPostRequest.js
Last active September 12, 2022 22:52
Frida http post request from java/android
function javaPost(url, data) {
const thread = Java.use("java.lang.Thread").$new();
const Tjava = Java.ClassFactory.get(thread.getContextClassLoader());
const Url = Tjava.use("java.net.URL").$new(url);
let connection = Url.openConnection();
connection = Java.cast(connection, Tjava.use("java.net.HttpURLConnection"));
connection.setRequestMethod("POST");
connection.setDoOutput(true);
connection.setRequestProperty("Content-Type", "application/json;");
const postData = Tjava.use("java.lang.String").$new(data);