0

I am messing with OverTheWire games and stumbled upon a problem which I'd like to solve my way. Simple web page with authorization which gives me a code I need if my request has proper referrer. In w3m for example I can add to my initial request a header "Referer", but this request stumbles upon authorization. After I input my login and password I obviously automatically send a new request but this time it goes without my header and therefore I can't get the code. Then I am in interactive mode, where I can refresh the page, but again, I have no idea how (if it is possible) to push there a header I want.

I know that this is a one-liner with curl, but I'd like to know if I can do that midsession in w3m or other text browser.

I googled this a lot, all instructions on that matter have weird options that no longer exist (if they existed). Supposedly I can add referer to siteconf file, but I couldn't figure how. All I can find is "no_referer" option which is disabled. But there is still no referer among the headers.

If you want to try it yourself here is the page.

Credentials are:

natas4:tKOcJIbzM4lTs8hbCmzn5Zr4434fGZQm

5
  • If you're following a link or submitting a form, the browser should automatically send the referer, you don't need to do anything special.
    – Barmar
    Commented Oct 3, 2023 at 20:39
  • In any case, this isn't a programming question, it's a question about using w3m and lynx.
    – Barmar
    Commented Oct 3, 2023 at 20:40
  • I am pretty sure I am allowed to ask here about Linux and technicalities of HTTP. You on the other hand should read questions more thoroughly. I am using w3m and lynx, both are not regular browsers. No_referer option is disabled but they still don't send referer. If you don't have enough knowledge on the matter it is better to just pass by instead of writing whatever you wrote
    – Rinkashikachi
    Commented Oct 3, 2023 at 20:44
  • I mean they send the referer as intended, but I need to send different referer, which is not current page
    – Rinkashikachi
    Commented Oct 3, 2023 at 20:55
  • I can't imagine a way to do that other than by starting a new invocation where you configure the initial request. There might be a privacy option to not send any referer, but I don't think there would be a way to substitute a different one when following a link.
    – Barmar
    Commented Oct 3, 2023 at 21:05

0

You must log in to answer this question.

Browse other questions tagged .