summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d3eac86
--- /dev/null
+++ b/README.md
@@ -0,0 +1,26 @@
+# bin2sh
+
+This converts any file to a shell script, which outputs itself.
+
+This makes it easy to copy/paste a binary into a netcat session to
+transfer a file to another system.
+
+## Building
+```
+make
+```
+
+## Example
+```
+ % ./bin2sh Makefile
+echo -ne "\x61\x6c\x6c\x3a\x0a\x09\x67\x63\x63\x20\x2d\x6f\x20\x62\x69\x6e"
+echo -ne "\x32\x73\x68\x20\x62\x69\x6e\x32\x73\x68\x2e\x63\x0a\x0a\x63\x6c"
+echo -ne "\x65\x61\x6e\x3a\x0a\x09\x72\x6d\x20\x2d\x72\x66\x20\x62\x69\x6e"
+echo -ne "\x32\x73\x68\x0a"
+
+ % ./bin2sh Makefile |bash > mf2
+
+ % md5sum mf2 Makefile
+2c36f087e9cc78f3a6406f89e70728db mf2
+2c36f087e9cc78f3a6406f89e70728db Makefile
+```