Einzelne LAN Anschlüsse deaktivieren
Einklappen
X
-
So... ich habe mal ein wenig ausprobiert:
Code:<?php define('pass', ''); define('USER_AGENT', 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.2309.372 Safari/537.36'); define('COOKIE_FILE', 'cookie.txt'); // Login Referer define('LOGIN_FORM_URL', 'http://192.168.178.34/DGS-1100-08P_1.00.016/login2.htm'); // Login via Post an define('LOGIN_ACTION_URL', 'http://192.168.178.34/cgi/login.cgi'); $postValues = array( 'pass' => pass); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, LOGIN_ACTION_URL); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($postValues)); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_COOKIEJAR, COOKIE_FILE); curl_setopt($curl, CURLOPT_USERAGENT, USER_AGENT); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_REFERER, LOGIN_FORM_URL); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false); $text=curl_exec($curl); echo "<textarea>".$text."</textarea>"; if(curl_errno($curl)){ throw new Exception(curl_error($curl)); } curl_setopt($curl, CURLOPT_URL, 'http://192.168.178.34/DGS-1100-08P_1.00.016/'); curl_setopt($curl, CURLOPT_COOKIEJAR, COOKIE_FILE); curl_setopt($curl, CURLOPT_USERAGENT, USER_AGENT); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); $text=curl_exec($curl); echo "<textarea>".$text."</textarea>"; ?>
HTML-Code:<script> document.cookie='SessID=73;path=/'; document.cookie='Gambit=]7mx^A;path=/'; </script> <html> <script>top.location.href='/';</script> </html>
Jetzt könnte ich die natürlich auslesen und in der Textdatei speichern. Habe ich auch manuell schonmal gemacht. Nur denke ich, dass der Router die Cookies auch wieder lediglich per Javascript ausliest... das sieht man an der Antwort auf die zweite Textarea:
HTML-Code:<script>RT='/DGS-1100-08P_1.00.016/';</script> <html> <script> if(typeof(RT)=='undefined'){ RT=top.location.href; RT=RT.substr(0,RT.lastIndexOf('/')+1); } Prefix="<script src='"+RT+"Prefix.js'></"; Prefix+="script>"; document.write(Prefix); </script> <script> docW("<title>Login "+top.location.hostname+"</title>"); docW("<frameset onload='InitCookie();'><center>"); docW("<frame src='"+RD+"login2.htm' frameborder='no' scrolling='yes' noresize marginhight=0>"); </script> <noframes> sorry,your browser does not support frames. </noframes> </center> </frameset> </html>
mit InitCookie(); komme ich ja spätestens jetzt nicht mehr wirklich weiter?!
Kommentar
-
Ich möchte im Aussenbereich ein POE WLAN Access Point installieren. Dieser sollte aber nur senden, wenn die Sitzplatz Schiebetüre geöffnet ist.
Mit SNMP konnte ich diesen problemlos mit dem SNMP Packet-Generator auf Port 7 schalten. (siehe Printscreen)
Mit Loxone habe ich noch nicht verstanden wie ich den Wert schreiben kann. Ich habe mit Hilfe der Loxone Homepage einiges probiert, aber leider funktioniert es nicht: SNMP TRAPS VERSENDEN
SNMP wird vorwiegend in Rechenzentren zur Kontrolle der einzelnen Rechner verwendet.
Der Miniserver kann mit SNMP sogenannte Traps schicken. Diese werden via UDP auf Port 162 versendet.
Ins Adressfeld wird die Adresse des SNMP Servers so eingetragen:
snmp://“ServerIP“ oder /dev/snmp/“ServerIP“
Ins Feld „Befehl bei Ein“ oder „Befehl bei Aus“ wird der Befehl in dieser Form eingetragen:
&Community&OID&GenTrap&SpecTrap&VarOID&VarVal[&VarOID&VarVal]
Beispiel:
&MyCommunity&.1.3.6.1.4.1.27383.1.1.11.3.2&6&0&.1. 3.6.1.4.1.27383.1.2.1&1
Der Empfang von SNMP Nachrichten wird derzeit nicht unterstützt.
Es wird nur das SNMPv1 Protokoll unterstützt.
Wer hat eine Idee was ich bei dem Virtuellen Ausgängen "Befehl bei Ein" eingeben muss?1 BildKommentar
Kommentar