| 1 | <?php |
| 2 | require_once('SpeedportHybrid.class.php'); |
| 3 | |
| 4 | /** |
| 5 | * @author Jan Altensen (Stricted) |
| 6 | * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php> |
| 7 | * @copyright 2015 Jan Altensen (Stricted) |
| 8 | */ |
| 9 | class Speedportw724v extends SpeedportHybrid { |
| 10 | public function login ($password) { |
| 11 | /* this is experimental, i dont have a speedport w724v so i cant test this |
| 12 | * feel free to test it and report if it dosent work |
| 13 | */ |
| 14 | $path = 'data/Login.json'; |
| 15 | $this->hash = md5($password); |
| 16 | $fields = array('password' => $this->hash, 'password_shadowed' => $this->hash, 'showpw' => 0); |
| 17 | $data = $this->sentRequest($path, $fields); |
| 18 | $json = $this->getValues($data['body']); |
| 19 | |
| 20 | if (isset($json['login']) && $json['login'] == 'success') { |
| 21 | $this->cookie = $data['header']['Set-Cookie']; |
| 22 | |
| 23 | return true; |
| 24 | } |
| 25 | |
| 26 | return false; |
| 27 | } |
| 28 | } |