Actual job done in the readme.
authorOscar J Rodriguez <josuer08@gmail.com>
Wed, 6 Jan 2021 04:25:25 +0000 (23:25 -0500)
committerGitHub <noreply@github.com>
Wed, 6 Jan 2021 04:25:25 +0000 (23:25 -0500)
README.md

index 2306a14dd2a0e3b1483c1e1bb821edd04f3288a6..494886239a11916962c50335d8280a66494132fc 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,2 +1,32 @@
 # oneliner
 This is an example of a nice netcat one line server (Mostly just to show how cool pipes can be)
+## How to use
+
+You just need to do a script that we will call `test.sh`
+
+```bash
+#!/bin/bash
+echo "************PRINT SOME TEXT***************\n"
+echo "Hello World!!!"
+echo "\n"
+echo "Resources:"
+echo "\n"
+echo "Addresses:"
+echo "$(ifconfig)"
+echo "\n"
+
+```
+And then while in the same folder you run the one line server:
+```bash
+while true; do { echo -e 'HTTP/1.1 200 OK\r\n'; sh test.sh; } | nc -l 1234 -q 1; done &
+```
+
+### Consider changing
++ `test.sh` is the script that we will run and take its output 
++ `1234` is the port that we will use.
++ `-q 1` is the timeout value, change it if your script is slow
++ pretty much everything else should remain immutable.
+
+## Conclusion!!!
+
+**So thats it!!!** Thanks for ~joining my ted talk....I mean,~ reading my README.md