mIRC Homepage

sockopen SSL problem

Posted By: Chamillionaire

sockopen SSL problem - 04/02/07 07:02 PM

Hello, I have a problem to open a internet site with SSL. I use sockopen -e and the standart port 443 for open but I get this error messages: [0] Unknown Error
Here are my code: http://nopaste.php-q.net/273482#

I hope someone can help me smile
Posted By: Damsulegna

Re: sockopen SSL problem - 05/02/07 11:55 PM

first:
Code:
  sockopen -e Mod.DCX.sHTTP https://opensvn.csie.org 443


should be
Code:
  sockopen -e Mod.DCX.sHTTP opensvn.csie.org 443


and wont you return error with
Code:
sockmark Mod.DCX.sHTTP $scon($1) $2

as $1 = !dcx

and $2 is not picked up..
Code:
on *:TEXT:!dcx:#:{


should be
Code:
on *:TEXT:!dcx *:#:{



What is the normal command you use !dcx 570
or something?



Could you show what you wish the outcome to be?
Posted By: Chamillionaire

Re: sockopen SSL problem - 06/02/07 02:20 PM

sockmark was my copy&paste mistake .... !dcx is only for testing ... I will replace it later with the on join event. I can't echo the source code (echo -s %Mod.DCX.sRead) of the site ... because it have SSL mad

Code:
on *:TEXT:!dcx:#:{
  sockclose Mod.DCX.sHTTP
  sockopen -e Mod.DCX.sHTTP opensvn.csie.org 443
  sockmark Mod.DCX.sHTTP #
}

on *:SOCKOPEN:Mod.DCX.sHTTP:{
  echo -s $sock($sockname).wsmsg
  if (!$sockerr) {
    sockwrite -n $sockname GET /traccgi/dcx/timeline HTTP/1.1
    sockwrite -n $sockname Host: https://opensvn.csie.org
    sockwrite -n $sockname $crlf
  }
}

on *:SOCKREAD:Mod.DCX.sHTTP:{
  tokenize 32 $sock($sockname).mark
  if (!$sockerr) {
    sockread %Mod.DCX.sRead
    while ($sockbr) {
      echo -s %Mod.DCX.sRead
      sockread %Mod.DCX.sRead
    }
  }
}
Posted By: Damsulegna

Re: sockopen SSL problem - 06/02/07 10:56 PM

I got the source code outside of an SSL mIRC connection.
Code:
on *:TEXT:!dcx:#:{
  sockclose Mod.DCX.sHTTP
  sockopen -e Mod.DCX.sHTTP opensvn.csie.org 443
  sockmark Mod.DCX.sHTTP #
}

on *:SOCKOPEN:Mod.DCX.sHTTP:{
  echo -s $sock($sockname).wsmsg
  if (!$sockerr) {
    sockwrite -n $sockname GET /traccgi/dcx/timeline HTTP/1.1
    sockwrite -n $sockname Host: opensvn.csie.org $+ $crlf $+ $crlf
    sockwrite -n $sockname $crlf
  }
}

on *:SOCKREAD:Mod.DCX.sHTTP:{
  tokenize 32 $sock($sockname).mark
  if (!$sockerr) {
    sockread %Mod.DCX.sRead
    while ($sockbr) {
      if (* iswm %Mod.DCX.sRead) { echo -s %Mod.DCX.sRead }
      sockread %Mod.DCX.sRead
    }
  }
}


has some
/echo: line too long (line 21, script10.mrc)
errors, but it worked.
© 2020 mIRC Discussion Forums