fork download
  1. import re
  2. line = '''<link
  3. rel="stylesheet"
  4. type="text/css"
  5. href="http://n...content-available-to-author-only...e.org/css/level.css">
  6. <link
  7. rel="stylesheet"
  8. href="http://n...content-available-to-author-only...e.org/css/jquery-ui.css"
  9. />
  10. <link
  11. rel="stylesheet"
  12. href="http://n...content-available-to-author-only...e.org/css/wechall.css"
  13. />
  14. <script
  15. src="http://n...content-available-to-author-only...e.org/js/jquery-1.9.1.js"></script>
  16. <script
  17. src="http://n...content-available-to-author-only...e.org/js/jquery-ui.js"></script>
  18. <script
  19. src=http://n...content-available-to-author-only...e.org/js/wechall-data.js></script><script
  20. src="http://n...content-available-to-author-only...e.org/js/wechall.js"></script>
  21. <script>var
  22. wechallinfo
  23. =
  24. {
  25. "level":
  26. "natas8",
  27. "pass":
  28. "DBfUBfqQG69KvJvJ1iAbMoIpwSNQ9bWe"
  29. };</script></head>
  30. <body>
  31. <h1>natas8</h1>
  32. <div
  33. id="content">
  34.  
  35. Access
  36. granted.
  37. The
  38. password
  39. for
  40. natas9
  41. is
  42. W0mMhUcRRnG8dcghE4qvk3JA9lGt8nDl <-- here it is
  43. <form
  44. method=post>
  45. Input
  46. secret:
  47. <input
  48. name=secret><br>
  49. <input
  50. type=submit
  51. name=submit>
  52. </form>
  53.  
  54. <div
  55. id="viewsource"><a
  56. href="index-source.html">View
  57. sourcecode</a></div>
  58. </div>
  59. </body>
  60. </html>'''
  61. pattern = re.compile("^([A-Za-z0-9]{32})$", re.MULTILINE)
  62. if pattern.finditer(line):
  63. print ("matched")
  64. else:
  65. print ("No")
  66.  
Success #stdin #stdout 0.02s 28384KB
stdin
Standard input is empty
stdout
matched