mIRC Homepage
Posted By: dylan HTTP Proxy + SSL (https) possible? - 13/03/04 04:47 AM
I'm trying to write a script that uses a HTTP proxy to post information on a https site and then read the information sent back, Is it possible? Maybe I need a DLL to do this?
Posted By: Adrenalin Re: HTTP Proxy + SSL (https) possible? - 13/03/04 02:14 PM
Yap.. That is possible.. You need ssl tunnel program like stunnel.. Check the examples of ussing on their site..
Also to see how your browser works with a proxy you can use a sniffer like Iris.. Often that will save you to read the boring RFC docs..
Posted By: dylan Re: HTTP Proxy + SSL (https) possible? - 13/03/04 09:54 PM
Okay, I'll try that. Thanks for your help
Posted By: Online Re: HTTP Proxy + SSL (https) possible? - 13/03/04 10:50 PM
You can use a COM object called XMLHTTP for that. This script will request a page and return the HTTP response headers:
  • alias getpage {
    .comopen gp Microsoft.XMLHTTP
    !.echo -q $com(gp,Open,1,bstr,Get,bstr,$1,bool,false)
    !.echo -q $com(gp,Send,1)
    !.echo -q $com(gp,GetAllResponseHeaders,1)
    var %result = $com(gp).result
    .comclose gp
    return %result
    }
To test it, try: //echo -a $getpage(http://www.yahoo.com)

Edit: Keep in mind that due to mIRC limitations, you cannot use this object to retrieve a webpage body if it's longer than ~900 characters.

mIRC COM Tutorial
Article from 4GuysFromRolla
MSDN Object Reference
Posted By: dylan Re: HTTP Proxy + SSL (https) possible? - 13/03/04 11:08 PM
That's exactly what I was looking for. What about proxy support though? Do I have to script something else to get it to work with a proxy? Or does it use the proxy specified in Internet Explorer settings?
Posted By: Online Re: HTTP Proxy + SSL (https) possible? - 13/03/04 11:10 PM
It uses IE's engine, so it follows its proxy settings too laugh
Posted By: dylan Re: HTTP Proxy + SSL (https) possible? - 13/03/04 11:13 PM
Fantastic, thanks a lot!
Posted By: dylan Re: HTTP Proxy + SSL (https) possible? - 13/03/04 11:16 PM
Oh, Also, What would I search for if I wanted more commands (Open, GetAllResponseHeaders, etc) so that maybe I could use this to display an entire webpage?
Posted By: Online Re: HTTP Proxy + SSL (https) possible? - 13/03/04 11:31 PM
Right after $com(gp,Send,1) you can call $com(gp,responseText,2) and $com(gp).result will hold the entire page contents.

For more methods and properties, see the MSDN reference laugh
© mIRC Discussion Forums