/**
* get the csrf_token
- *
- * @return string
*/
- protected function getToken ();
+ public function getToken ();
+
+ /**
+ * check if we are logged in
+ *
+ * @param boolean $exception
+ */
+ public function checkLogin ($exception = true);
}
* @copyright 2015 Jan Altensen (Stricted)
*/
class Speedportw724v extends SpeedportHybrid implements ISpeedport {
+ /**
+ * login into the router with the given password
+ *
+ * @param string $password
+ * @return boolean
+ */
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
return false;
}
+ /**
+ * get the csrf_token
+ *
+ * @return string
+ */
+ protected function getToken () {
+ // TODO: check if this is needed
+ }
+
/**
* sends the request to router
*
$fields = array('csrf_token' => 'nulltoken', 'showpw' => 0, 'challengev' => 'null');
$data = $this->sentRequest($path, $fields);
$data = $this->getValues($data['body']);
- print_r($data);
+
if (isset($data['challengev']) && !empty($data['challengev'])) {
return $data['challengev'];
}