Table of Contents

HTTP Live header script

This reconnect script type has been inspired by the Firefox Live header extension.. We advise you to use the Scripter addon for editing or rewriting new scripts. For most routers, the Reconnect Recorder: Automates the process of getting a new IP address is able to record your reconnect completly automated.

Structure

The script is based on XML, but with [[[ instead of < and ]]] instead of >. Surrounded by the HSRC-tag, so called steps define the raw structure.

[[[HSRC]]]
   [[[STEP]]]
      ....statement...
   [[[/STEP]]]
   [[[STEP]]]
      ....statement...
   [[[/STEP]]]
...
[[[/HSRC]]]

Statements

Define variables

Variables can be defined and used later with %variablename%.

[[[DEFINE routerip="192.168.0.1" pass="My Password"/]]];

There are predefined variables:

Request

Requests are the most important statements. A request is a fully valid HTTP-Reuqest. In this example, the variables pass and user are used.

   [[[REQUEST]]]
           POST /cgi/dial/ HTTP/1.1
           Accept-Language: de, en-gb;q=0.9, en;q=0.8
           User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
           1.1.4322; .NET CLR 2.0.50727)
           Host: %%%routerip%%%
           Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
           Connection: keep-alive
         1=5&11=%%%user%%%&12=%%%pass%%%&14=on&21=0&22=pppoa_DIALUP_PPP1&23=DIALUP_PPP1&24=-7A0B-0-0-F-0-0_1_0_0_1_0_0_A000001_FFFFFF00_0_0_0_0&25=%%%user%%%&26=KOMCIDPEOKNIEDLN&27=&28=
[[[/REQUEST]]]

Response

..is used to read out variable from the html source. The read variables can be used later.

 [[[REQUEST]]]
   GET / HTTP/1.1
   Accept-Language: de, en-gb;q=0.9, en;q=0.8
   User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
   1.1.4322; .NET CLR 2.0.50727)
   Host: www.meineip.de
   Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
   Connection: keep-alive
[[[/REQUEST]]]
[[[RESPONSE keys="ip"]]]
   Ihre IP\-Adresse lautet\:\<\/th\>
   \<td\>\<b\>(.*?)\<\/b\>\<\/td\>
[[[/RESPONSE]]]
[[[RESPONSE keys="provider"]]]
   \<th style\=\"text\-align\: right\;\"\>Internetprovider\:\<\/th\>
   \<td\>(.*?)\<\/td\>
[[[/RESPONSE]]]


The variables %ip% and %provider% can be used as of now.

Waittime

Sometimes it os important to be patient. For example: You ahve to wait for the disconnect before csimulating the “connect”-click.

[[[WAIT seconds="10"/]]]

Examples

Links