[YLUG] Router

Patrick Dupre pd520 at york.ac.uk
Sun Sep 28 18:24:31 UTC 2008


On Sun, 28 Sep 2008, David Harker wrote:

> Seeing as it works with wget without a cookie once authenticated through the
> browser, doesn't it seem most likely to be just authenticating by IP
> address? If so, your best bet is, as James said, to submit a POST request to
> wherever the login form points. Maybe do this via a script which then runs
> wget?

I am not sure to know how to do it, I can do:
wget --user="admin" --password="" -O out.log http://192.168.0.1/login.htm
but it does not really let loging me.

How can I log without using a browser ?

Thank.
>
> 2008/9/28 James Jeffrey <james at jgj.org.uk>
>
>> As I think Alex and Steve hinted, your router may just not be designed
>> for you to obtain the file this way. It seems that it isn't expecting
>> a username and password to be supplied in the way that wget supplies
>> it (i.e. via http basic auth).
>>
>> To work around it, you might need to write a script which logs in by
>> submitting a POST containing the login details to wherever the form
>> defined in login.htm goes, and retrieves the session cookie which you
>> then use when you try to download the log. If you get stuck then if
>> you post the section of login.html containing everything between
>> <form> and </form> then someone might be able to supply such a script
>> (unless it's all done with javascript) - but...
>>
>> There might be a simpler option - does your router support syslog?
>>
>> What model router is it?
>>
>> James
>>
>> On 28 Sep 2008, at 18:12, Patrick Dupre wrote:
>>
>>> On Sun, 28 Sep 2008, Steve Kemp wrote:
>>>
>>>> On Sun Sep 28, 2008 at 17:39:37 +0100, Patrick Dupre wrote:
>>>>
>>>>> function startUp() {location = "login.htm"}
>>>>> </script>
>>>>> </head>
>>>>> <body bgcolor="#FFFFFF" text="#000000"
>>>>> onLoad='setTimeout("startUp()",1);'>
>>>>> </body>
>>>>
>>>> So it downloads a page which :
>>>>
>>>>   1.  Defines the function startUp();
>>>>   2.  After the page has been loaded (by a browser) redirects to:
>>>>       http://..../login.htm
>>>>
>>>> I guess then that it doesn't like your login - either because it
>>>> was wrong, or because HTTP basic-auth isn't being used.
>>>
>>> OK, but, if I am logged through a browser, then every thing works
>>> fine !
>>> I do not see what I could change in the setup.
>>>
>>> Regards
>>>
>>> --
>>> ---
>>> =
>>> =
>>> =
>>> =
>>> ======================================================================
>>> Patrick DUPRÉ                      |   |
>>> Department of Chemistry            |   |    Phone: (44)-
>>> (0)-1904-434384
>>> The University of York             |   |    Fax:   (44)-
>>> (0)-1904-432516
>>> Heslington                         |   |
>>> York YO10 5DD  United Kingdom      |   |    email: pd520 at york.ac.uk
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =======================_______________________________________________
>>> York mailing list
>>> York at lists.lug.org.uk
>>> https://mailman.lug.org.uk/mailman/listinfo/york
>>
>>
>> _______________________________________________
>> York mailing list
>> York at lists.lug.org.uk
>> https://mailman.lug.org.uk/mailman/listinfo/york
>>
>
>
>
>

-- 
---
==========================================================================
  Patrick DUPRÉ                      |   |
  Department of Chemistry            |   |    Phone: (44)-(0)-1904-434384
  The University of York             |   |    Fax:   (44)-(0)-1904-432516
  Heslington                         |   |
  York YO10 5DD  United Kingdom      |   |    email: pd520 at york.ac.uk
==========================================================================


More information about the York mailing list