From 7367e95199bc89514dd23e973466b296fee10e16 Mon Sep 17 00:00:00 2001 From: Stricted Date: Sat, 8 Aug 2015 08:52:42 +0200 Subject: [PATCH] add experimental Speedportw724v class this is experimental, i dont have a speedport w724v so i cant test this feel free to test it and report if it dosent work --- Speedportw724v.class.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Speedportw724v.class.php diff --git a/Speedportw724v.class.php b/Speedportw724v.class.php new file mode 100644 index 0000000..6d2d76f --- /dev/null +++ b/Speedportw724v.class.php @@ -0,0 +1,28 @@ + + * @copyright 2015 Jan Altensen (Stricted) + */ +class Speedportw724v extends SpeedportHybrid { + public function login ($password) { + /* this is experimental, i dont have a speedport w724v so i cant test this + * feel free to test it and report if it dosent work + */ + $path = 'data/Login.json'; + $this->hash = md5($password); + $fields = array('password' => $this->hash, 'password_shadowed' => $this->hash, 'showpw' => 0); + $data = $this->sentRequest($path, $fields); + $json = $this->getValues($data['body']); + + if (isset($json['login']) && $json['login'] == 'success') { + $this->cookie = $data['header']['Set-Cookie']; + + return true; + } + + return false; + } +} -- 2.20.1