mIRC Home    About    Download    Register    News    Help

Topic Options
#75019 - 13/03/04 04:47 AM HTTP Proxy + SSL (https) possible?
dylan Offline
Ameglian cow

Registered: 10/12/02
Posts: 24
Loc: USA
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?
_________________________
-- dylan

Top
#75020 - 13/03/04 02:14 PM Re: HTTP Proxy + SSL (https) possible?
Adrenalin Offline
Fjord artisan

Registered: 18/04/03
Posts: 414
Loc: Moldova
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..
_________________________
mIRC Chm Help 6.16.0.3 Full Anchored!

Top
#75021 - 13/03/04 09:54 PM Re: HTTP Proxy + SSL (https) possible?
dylan Offline
Ameglian cow

Registered: 10/12/02
Posts: 24
Loc: USA
Okay, I'll try that. Thanks for your help
_________________________
-- dylan

Top
#75022 - 13/03/04 10:50 PM Re: HTTP Proxy + SSL (https) possible?
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
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

Top
#75023 - 13/03/04 11:08 PM Re: HTTP Proxy + SSL (https) possible?
dylan Offline
Ameglian cow

Registered: 10/12/02
Posts: 24
Loc: USA
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?
_________________________
-- dylan

Top
#75024 - 13/03/04 11:10 PM Re: HTTP Proxy + SSL (https) possible?
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
It uses IE's engine, so it follows its proxy settings too laugh

Top
#75025 - 13/03/04 11:13 PM Re: HTTP Proxy + SSL (https) possible?
dylan Offline
Ameglian cow

Registered: 10/12/02
Posts: 24
Loc: USA
Fantastic, thanks a lot!
_________________________
-- dylan

Top
#75026 - 13/03/04 11:16 PM Re: HTTP Proxy + SSL (https) possible?
dylan Offline
Ameglian cow

Registered: 10/12/02
Posts: 24
Loc: USA
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?
_________________________
-- dylan

Top
#75027 - 13/03/04 11:31 PM Re: HTTP Proxy + SSL (https) possible?
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
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

Top