Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo mycommand >/dev/tcp/127.0.0.1/1234
- #!/bin/bash
- echo "HTTP/1.0 200 OK
- Content-Type: text/plain
- running command" |
- sed 's/$/r/'
- if echo mycommand >/dev/tcp/127.0.0.1/1234
- then echo OK
- else echo fail
- fi
- date
- socat tcp-listen:8001,reuseaddr,fork exec:/tmp/myscript
- * Connected to localhost (127.0.0.1) port 8001 (#0)
- > GET / HTTP/1.1
- > Host: localhost:8001
- > User-Agent: curl/7.43.0
- > Accept: */*
- >
- * HTTP 1.0, assume close after body
- < HTTP/1.0 200 OK
- < Content-Type: text/plain
- <
- running command
- OK
- Wed Aug 23 21:04:47 CEST 2017
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement