Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.45 KB | None | 0 0
  1. #!/bin/bash
  2. a=$(echo $QUERY_STRING | cut -d"&" -f1 | cut -d"=" -f2)
  3. b=$(echo $QUERY_STRING | cut -d"&" -f2 | cut -d"=" -f2)
  4.  
  5. echo "Content-Type: text/html"
  6. echo ""
  7. echo "
  8. <html>
  9. <head>
  10. <title>Document</title>
  11. </head>
  12. <body>
  13. <h1>Hello world!</h1>
  14. <h2>$QUERY_STRING</h2>
  15. <form action='/script' method='GET'>
  16. <input value='$a' name=a type=text>
  17. +
  18. <input value='$b' name=b type=text>
  19. <button>=</button>
  20. $[ a + b ]
  21. </form>
  22. </body>
  23. </html>
  24. "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement