hackerscommunity

Simple CGI (bash) PASSWORD GENERATOR

Jun 28th, 2016
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.58 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. #  Simple CGI (bash) PASSWORD GENERATOR
  4. #
  5. #  todor.donev@gmail.com
  6. #  http://www.ethical-hacker.org/
  7. #  https://www.facebook.com/ethicalhackerorg
  8. #  http://pastebin.com/u/hackerscommunity
  9. #
  10. #  Disclaimer:
  11. #  This  or  previous program  is  for Educational
  12. #  purpose ONLY. Do not use it without permission.
  13. #  The  usual  disclaimer  applies, especially the
  14. #  fact  that  Todor Donev  is  not liable for any
  15. #  damages caused by direct or indirect use of the
  16. #  information or functionality  provided by these
  17. #  programs.  The author or any  Internet provider
  18. #  bears  NO  responsibility for content or misuse
  19. #  of these programs or  any  derivatives thereof.
  20. #  By  using  these  programs  you accept the fact
  21. #  that any damage (dataloss, system crash, system
  22. #  compromise,  etc.)  caused  by the use of these
  23. #  programs is not  Todor Donev's  responsibility.
  24. #
  25. #  Use  at  your  own risk and educational purpose
  26. #  ONLY!
  27. #
  28. echo "Content-type: text/html"
  29. echo "
  30. <html>
  31. <head>
  32. <title>Simple CGI Password Generator</title>
  33. <meta http-equiv="pragma" content="no-cache">
  34. <meta http-equiv="expires" content="-1">
  35. <meta http-equiv="content-type" content="text/html\; charset=utf-8">
  36. </head>
  37. <body>
  38. Generating passwords..<br><br>
  39. <strong>tr -dc A-Za-z0-9 < /dev/urandom | head -c 25 | xargs</strong>
  40. <br>"
  41. length=25
  42. tr -dc A-Za-z0-9 < /dev/urandom | head -c ${length} | xargs
  43. echo "<br><br>
  44. <strong>tr -cd '[:alnum:]' < /dev/urandom | fold -w25 | head -n1</strong>
  45. <br>"
  46. tr -cd '[:alnum:]' < /dev/urandom | fold -w25 | head -n1
  47. echo "<br>
  48. </body>
  49. </html>"
Add Comment
Please, Sign In to add comment