CLI session command

I posted about this in one of the daily build topics, and it is still holding true. The file saved when using the session command seems to not be usable anymore. I don't know if it's a change server side, or something broken inside kolmafia.

I am working a little more with Greasemonkey now, and when attempting to write scripts which are both compatible with kolmafia's relay browser, and straight log-in through the browser I need a method of obtaining both kolmafia's modified page, and the default page. Long ago I wrote this application which solves that need if it would still work. The problem is when going to a page which requires you to be logged in, it get's redirected to login.php even after loading the session data, and using it where needed.

One of the possible causes that I came up with was the useragent field of the request header sent to the server. I know that server-side they do log the useragent field. I am using "Mozilla/3.0 (compatible; kolsourcegetter client)". I could further test this theory, but so far I have not been able to figure out which file to look at for the current user agent for kolmafia.

Could someone tell me what the contents of the useragent field is for kolmafia R5504, and I will attempt to switch to it, and see if that is the issue.

Included files:
htmlgetter.exe Runs on Windows XP/NT/ME Previously working program which simply displayed the html source for a typed URL in the kingdom of loathing after loading session data from kolmafia.
KolHTMLGetter-source.zip The Pascal (written in Borland Delphi 7) source code for the above. To compile you must have a version of the Indy library which uses IDCookieManager

Before anyone asks again, I use delphi for my private use applications like this because the resulting application has a small footprint in memory, and doesn't require the loading of a much larger application

The application should run using Wine on Ubuntu
 

Attachments

  • KolHTMLGetter-source.zip
    265.9 KB · Views: 35
  • htmlgetter.exe
    509 KB · Views: 159
Top