This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 -" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |