Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $mac = '00:43:32:43:54:67';
- set_time_limit(10);
- $accounts = array(
- array('login' => 'login1', 'password' => 'pass'),
- array('login' => 'login2', 'password' => 'pass'),
- //....
- );
- foreach($accounts as $data)
- {
- // Sprawdzamy downolny url - czy czyta
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'nowiny.pl');
- curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($curl, CURLOPT_COOKIEFILE, dirname(__FILE__) . '/cookie.txt');
- curl_setopt($curl, CURLOPT_COOKIEJAR, dirname(__FILE__) . '/cookie.txt');
- $out = curl_exec($curl);
- preg_match_all("/WISPAccessGatewayParam.xsd/", $out, $xy);
- if(!empty($xy[0][0]))
- {
- echo "Proba logowania się jako: ". $data['login'] ."\n";
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL,'http://192.168.1.1/login');
- curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($curl, CURLOPT_COOKIEFILE, dirname(__FILE__) . '/cookie.txt');
- curl_setopt($curl, CURLOPT_COOKIEJAR, dirname(__FILE__) . '/cookie.txt');
- curl_setopt($curl, CURLOPT_POST, 1);
- curl_setopt($curl, CURLOPT_POSTFIELDS, 'hs=mt&mac='.$mac.'&user=&uamport=mikrotik&loginlink=http%3A%2F%2F192.168.1.1%2Flogin&userurl=h$
- curl_exec($curl);
- }
- else
- exit;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement