mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2003
Posts: 144
M
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
ì}]sÛF²è3S•ÿ0AvCi#~I²lK¢¶hŠv˜#‰ºmï9뽬!1¢`ƒ
,סv«583>ÿ̸‚å~«u{{Û¼ÝiºÞ¼5¾hÝ!´Ö–—@«Ú4Ó8‚Æ0|׿ôŽñ¢vXÍøeíܳ¦Ì£ 2t®\oñS`Í(i“¿;ó%箬æ+æS2r'–ÃxýVàpÁJ¿ûneÝt¾ëÌ ã÷Kf™øÕ5v´Í2»¦žÏ‚®å»'O=mtŒX'Ñ™ë𖁬d[Î;rí±«n½åïmÖr¬fo7g¾_'`!‡ßñ˜Ý5x1ÿš±À ‚ ‡—ý‹áù˜œôÎ^¼ì½toé
½œyVØ΍~[WdãÖrL÷–|Ñ%»Üď¦íÎ(¾‰˜.‰ý>ÀŠ­i4dk-Ñœüåófˆ-;©·ÝinG7Ô#7Ôv½>µîèúâÄÏ?»Z93lƒžµØðoóóÏ~
›.Q±!Å™.ãýƒƒ·øÿð!‡+àòáÒì… ÂáÝÆʳå˜A¾$§ÔY1»¿½Øm´÷íÇûäó®PÈ@#.yyqB~%KêQâ®ÏlÀ…Ž€<
˜ç°
´7 åp|)Œªß¤‚6]µ2žO&¯†ƒ×—ãÞxÐtè‚!ƒŸÆáͺª¤WòWÓ…Hî#|¬xÛ’ÝÝ%sÛ-˜+øOj|~½@F¦³ëWÔ^15ͬ«‚×dHw²d>ÈcŸ6o°<öØYÙ6ùê+R¹Lz5$#%ª[‚_-¨MíW–oMm&ëw«µ£3°Öap:JÔB" ÀH ËÛØüA<¯qIcm‰Efeº[Ä´núòǁ’þ½±æ4p½&Ì¥
0J§f¬Œ˜QcØ
ùC#
§‚ÜÐÊ´%n!r1„¾Œ¾‚ò›<0’o…_J.Të"\Õ¿ªe5Sca
|5"×ãçúõ„† Küz+Æ×Mê/ﲪoÕcåê[õÀuí)õºŽ»¥tV¼6A¥˜ì²˜?A©Vü
ç™,z«kceþÀc¾õ=¡?n-3¸î>j··®™5¿º;Ú°Õ’+UÞˆ®F‰6Ê¡ Z
Ð „6’V v¡ºBLJ–?Í-P_(¸T3¸­‹ŸÞlFÝcw€Å7Øq§où"Ì%P¸½cï´k4˜´—òQµO š&çÒ×p³Á°MM’‘ôÊÄ°ÔÚX
kø˜¡Bâý ?¯Ws×ß'ý˜ÖÜ%À18d¶”ó’=Ù
)ùñGò…$À&Ñ"ažlˆQe¶ˆD…UB¦


and more like this...

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Change HTTP/1.1 to HTTP/1.0

You should only rarely use 1.1.


Invision Support
#Invision on irc.irchighway.net
Joined: Jun 2004
Posts: 14
B
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.


Joined: Aug 2003
Posts: 144
M
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

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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

Link Copied to Clipboard