aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsprunc15
1 files changed, 15 insertions, 0 deletions
diff --git a/sprunc b/sprunc
new file mode 100755
index 0000000..5e59bcf
--- /dev/null
+++ b/sprunc
@@ -0,0 +1,15 @@
+#!/usr/bin/busybox sh
+
+stdin=$(cat /dev/stdin)
+uuenc=$(perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$stdin")
+
+content_length=$(( ${#uuenc} + $(expr length "sprunge=") ))
+
+/usr/bin/nc sprunge.us 80 <<EOF | awk '/17/{getline; print}'
+POST / HTTP/1.1
+Host:sprunge.us
+Content-Type:application/x-www-form-urlencoded
+Content-Length:$content_length
+
+sprunge=$uuenc
+EOF