mIRC Home    About    Download    Register    News    Help

Print Thread
SockRead connection with ASP.NET... ? #200744 11/06/08 01:18 AM
Joined: Aug 2003
Posts: 144
M
Miguel_A Offline OP
Vogon poet
OP Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
Humm firts time that is append to me...
I have all the code ok but the returning sock connection text is unkow characters...

Why ? is it becouse this uses ASP.NET ??
How can o resolve it ?

Code:
alias Priberam {
  SockClose Priberam*
  SockOpen PriberamGetCookie www.priberam.pt 80
}

on *:SockOpen:Priberam*: {
  var %SockSend SockWrite -n $SockName
  if ( $SockName == PriberamGetCookie ) {
    %SockSend GET /dlpo/dlpo.aspx HTTP/1.1
  }
  %SockSend Host: www.priberam.pt
  %SockSend User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
  %SockSend Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
  %SockSend Accept-Language: pt-br,pt;q=0.8,en-us;q=0.5,en;q=0.3
  %SockSend Accept-Encoding: gzip,deflate
  %SockSend Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  %SockSend Keep-Alive: 300
  %SockSend Connection: keep-alive
  %SockSend $crlf $crlf
} 

on *:SockRead:Priberam*: {
  var %SockRead
  SockRead %SockRead
  if ( %SockRead != $null ) {
    echo -s %SockRead
  }
  if ( %SockRead == $null ) {
    echo -s $chr(160)
  }
}


in quote i present the result off the code...
Quote:

HTTP/1.1 200 OK
Cache-Control: private
Date: Wed, 11 Jun 2008 01:16:01 GMT
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Set-Cookie: Preferencias=h_vista=&h_abrev_cat=&h_abrev_flex=&h_abrev_dom=&h_abrev_exemp=&h_abrev_etim=&h_abrev_outras=; expires=Thu, 12-Jun-2008 01:16:01 GMT; path=/

a

7c0
}]sF3S0AvCi#~IlKhv#m9뽬!1`
,סv583≯~u{{ۼi޼5h!֖@480|vXẹܳ 2t\oS`(i;%+S2r'xVpJnet Kf5v2ς廍'O=mtX'љ𖁬d[;rnmrfo7g_'`!5x1 ^to
yV~[WdrL|%ď(.>i4dk-ќf-;inG7#7v>?Z93lo~
.Q!ř.!+ ʳA$Y1mP@#.yyqB~%KQl<

7 p|)ߤ6]2O&חxt!ͺWWӅH#|xے%s-+Oj|~@FW^15ͬdHwd>c6o<Y6+RLz5$#%[_-MWoMm&w3֐ap:JB" H A<qIcmEfe[Ĵnǁ4p&̥
0JfQc
C#
ʴ%n!r1<0o_J.T"\տe5Sca
|5" Kz+M/ﲪoc[u)tV6A처?AV
,zkcec=?n-3>j5;ڰՒ+UވF6ʡ Z
 6V vBLJ?-P_(T3lFcw7qo"%Pck4QO &pMMX
kB ?Ws'%18d=
)G$&"alQeDUB


and more like this...

Re: SockRead connection with ASP.NET... ? [Re: Miguel_A] #200752 11/06/08 02:28 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
Change HTTP/1.1 to HTTP/1.0

You should only rarely use 1.1.


Invision Support
#Invision on irc.irchighway.net
Re: SockRead connection with ASP.NET... ? [Re: Miguel_A] #200756 11/06/08 04:07 AM
Joined: Jun 2004
Posts: 14
B
Byte187 Offline
Pikka bird
Offline
Pikka bird
B
Joined: Jun 2004
Posts: 14
Quote:

Code:
on *:SockOpen:Priberam*: {
  var %SockSend SockWrite -n $SockName
  if ( $SockName == PriberamGetCookie ) {
    %SockSend GET /dlpo/dlpo.aspx HTTP/1.1
  }
  %SockSend Host: www.priberam.pt
  %SockSend User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
  %SockSend Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
  %SockSend Accept-Language: pt-br,pt;q=0.8,en-us;q=0.5,en;q=0.3
  %SockSend Accept-Encoding: gzip,deflate
  %SockSend Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  %SockSend Keep-Alive: 300
  %SockSend Connection: keep-alive
  %SockSend $crlf $crlf
}



%SockSend Accept-Encoding: gzip,deflate

You asked for gzip encoded data and you got it.


Re: SockRead connection with ASP.NET... ? [Re: Byte187] #200765 11/06/08 08:17 AM
Joined: Aug 2003
Posts: 144
M
Miguel_A Offline OP
Vogon poet
OP Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
Originally Posted By: Byte187
[quote]

%SockSend Accept-Encoding: gzip,deflate

You asked for gzip encoded data and you got it.



thanks it was that... lool

Re: SockRead connection with ASP.NET... ? [Re: Byte187] #200769 11/06/08 11:42 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
Actually, I had no problem after changing 1.1 to 1.0. I noticed gzip,deflate but it worked without removing that. I could read the "source" just fine, which is why I didn't bother mentioning it. smile


Invision Support
#Invision on irc.irchighway.net