Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'library/HttpClient.class.php';
- $http = new HttpClient('192.168.41.49', 80);
- $http->cookie_host = 'banserver.local';
- $http->get('/');
- $http->get('/login.jsp');
- $matches = array();
- preg_match('/name=\'csrfmiddlewaretoken\' value=\'([a-z0-9]*)\'/', $http->getContent(), $matches);
- $token = $matches[1];
- if (strlen($token) != 32)
- {
- die('Token não encontrado');
- }
- $http->post('/login.jsp', array(
- 'csrfmiddlewaretoken' => $token,
- 'bid' => '******',
- 'password' => '******'
- ));
- var_dump($http->getContent());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement