Sync poc to spec
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
This commit is contained in:
@@ -16,4 +16,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
kroute add -X GET '/list/{ip}' -c 'nmap -sL $(request /match/ip) | response /body'
|
||||
kroute add -X GET '/list/{ip}' -c 'nmap -sL $(request /matches/ip) | response /body'
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
kroute add /list/files -c 'ls -la $(request /param/path) | response /body'
|
||||
kroute add /list/files -c 'ls -la $(request /params/path) | response /body'
|
||||
|
||||
kroute add /list/processes -c 'ps -aux | response /body'
|
||||
|
||||
@@ -31,11 +31,11 @@ kroute add /show/connections -c 'ss -pluton | response /body'
|
||||
kroute add /show/mounts -c 'mount | response /body'
|
||||
|
||||
kroute add /tail/dmesg - <<-'EOF'
|
||||
response /header/Content-Type text/plain
|
||||
response /headers/Content-Type text/plain
|
||||
dmesg -w | response /stream
|
||||
EOF
|
||||
|
||||
kroute add /tail/journal - <<-'EOF'
|
||||
response /header/Content-Type text/plain
|
||||
response /headers/Content-Type text/plain
|
||||
journalctl -f | response /stream
|
||||
EOF
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
#
|
||||
|
||||
kroute add -X POST --entrypoint '/bin/zsh -c' '/convert/{from}/{to}' - <<-'EOF'
|
||||
pandoc --from=$(request /match/from) \
|
||||
--to=$(request /match/to) \
|
||||
pandoc --from=$(request /matches/from) \
|
||||
--to=$(request /matches/to) \
|
||||
--output=>(response /body) \
|
||||
=(request /body)
|
||||
EOF
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
#
|
||||
|
||||
kroute add -X POST --entrypoint ./topdf '/editor/pdf'
|
||||
kroute add / -c 'response /header/Content-Type text/html && response /body < pdfeditor.html'
|
||||
kroute add / -c 'response /headers/Content-Type text/html && response /body < pdfeditor.html'
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
tmpfile=$(mktemp --suffix=.pdf)
|
||||
pandoc --from=$(request /form/from) --to=pdf --output=${tmpfile} -t latex =(request /form/content)
|
||||
if [ $? -eq 0 ]; then
|
||||
response /header/Content-Type application/pdf
|
||||
response /headers/Content-Type application/pdf
|
||||
response /body < ${tmpfile}
|
||||
response /status 200
|
||||
else
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#
|
||||
|
||||
kroute add / - <<-'EOF'
|
||||
response /header/Content-Type text/html
|
||||
response /headers/Content-Type text/html
|
||||
response /body <<-HTML
|
||||
<html>
|
||||
<body>
|
||||
@@ -28,7 +28,7 @@ kroute add / - <<-'EOF'
|
||||
EOF
|
||||
|
||||
kroute add /save/magnet -e '/bin/bash -c' - <<-'EOF'
|
||||
link=$(request /param/link)
|
||||
link=$(request /params/link)
|
||||
[ -z $link ] && response /status 400 && exit 0
|
||||
|
||||
watch_folder=/tmp
|
||||
@@ -37,7 +37,7 @@ kroute add /save/magnet -e '/bin/bash -c' - <<-'EOF'
|
||||
echo "d10:magnet-uri${#link}:${link}e" > "meta-${BASH_REMATCH[1]}.torrent"
|
||||
|
||||
response /status 302
|
||||
response /header/Location /torrent/list
|
||||
response /headers/Location /torrent/list
|
||||
EOF
|
||||
|
||||
kroute add /torrent/list -c 'response /body "Not Implemented Yet"'
|
||||
|
||||
Reference in New Issue
Block a user