Jump to content

Oasiz Chat Mirc Authentication


err0r

Recommended Posts

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;; Miscellaneous Aliases;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

alias hex {
  var %l 1, %r
  while (%l <= $len($1-)) {
    %r = %r $+ $base($asc($mid($1-,%l,1)),10,16,2)
    inc %l
  }
  return %r
}

alias unhex {
  var %l 1, %r
  while (%l <= $len($1-)) {
    if (!$2) {
      if ($mid($1-,%l,2) != 20) %r = %r $+ $chr($base($mid($1-,%l,2),16,10))
      else %r = %r $chr($base($mid($1-,%l,2),16,10))
    }
    else %r = %r $+ $chr($base($mid($1-,%l,2),16,10))
    inc %l 2
  }
  return %r
}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;; Status Window Shortcut;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

menu status {
  Passport Updater: $oa_opdg(oapp) | set %att $as
}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;; Send Auth Data To Server;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

alias oa_opdg {
  if (!$dialog($1)) dialog -m $1 $1
}

;; Server list (not yet implemented)
alias oa_issv {
;; directory server
  if ($1 == 75.126.226.11) return $true
;; groups server
  if ($1 == 75.126.194.89) return $true
;; chat servers
  if ($1 == 75.126.194.90) return $true
  if ($1 == 75.126.194.91) return $true
  if ($1 == 75.126.194.92) return $true
;; local server (testing)
  if ($1 == 192.168.1.105) return $true
  return $false
}

;; Sanitize nickname
alias oa_sank {
  return $remove($1,>)
}

ON ^*:LOGON:*: {
  %DOPASSPORT = $true
  %OASIZCONNX = $oa_issv($server)
  if (%OASIZCONNX) {
    .MODE ISIRCX
    .HALT
  }
}

RAW *:*: {
  if (%OASIZCONNX) {
    if ($numeric == 421) || ($numeric == 451) {
      .RAW -q USER $gettok($emailaddr,1,64) * * : $+ $fullname
      .RAW -q NICK $oa_sank($me)
      .HALT
    }
    if ($numeric == 910) || ($numeric == 912) {
      .RAW -q USER $gettok($emailaddr,1,64) * * : $+ $fullname
      .RAW -q NICK $oa_sank($me)
    }
    if ($numeric == 800) && ($2 == 0) {
      .RAW -q AUTH $iif(%DOPASSPORT,OAServPassport,OAServ) I :OASSP00000097
      .HALT
    }
    if ($numeric == 004) && (OACHATDSA* iswm $server) {
     ;; tell directory server we are an ircx client
      .RAW -q IRCX
    }
    if ($1 == OAServPassport) || ($1 == OAServ) && ($2 == S) {
      if ($3 == OK) {
        if (%DOPASSPORT) {
          .RAW -q AUTH OAServPassport S : $+ $unhex(%authcode)
        }
        else {
          .RAW -q NICK $oa_sank($me)
        }
      }
      else {
        %result = OASSP00000099
        if (%result == $null) {
          .RAW -q AUTH $iif(%DOPASSPORT,OAServPassport,OAServ) *
        }
        else {
          .RAW -q AUTH $iif(%DOPASSPORT,OAServPassport,OAServ) S : $+ %result
        }
      }
      .HALT
    }
    if ($1 == OAServPassport) || ($1 == OAServ) && ($2 == *) {
      .HALT
    }
  }
}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;; Oasiz Passport Updater;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

on *:SOCKOPEN:auth.*:{
  var %x = irc/pp-011008.php?e= $+ $hex(%e) $+ &p= $+ $hex(%p)
  sockwrite $sockname GET / $+ %x HTTP/1.1 $+ $crlf $+ Accept: */* $+ $crlf $+ Accept-Language: en-us $+ $crlf $+ User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) $+ $crlf $+ Host: www.oasiz.net $+ $crlf $+ Connection: close $+ $crlf $+ $crlf
}

alias as { return Please enter your Oasiz account email address & password. Once done, click "Update" to retrieve your details... }
alias np { return Please enter your account password. }
alias em { return Please enter a valid email address. }
alias er { return Incorrect email and/or password details. Please try again making sure the information you are providing is correct. }
alias sc { return Success! Click the "Connect" button to join the Oasiz Chat Service. }

on *:SOCKREAD:auth.*:{
  if ((*@* !iswm %e) || (!%e)) { set %att $em | return }
  if (!%p) { set %att $np | return }
  if ($sockerr > 0) return
  var %z | sockread %z
  while ($sockbr > 0) {
    tokenize 32 %z
   ;;echo -a $1-
    if (Error* iswm $1) { set %att $er | return }
    if (($3) && (oasAUTH* iswm $1)) {
      %DOPASSPORT = $true | %authcode = $2 | %ppauth = $true | %att = $sc
    }
    return
  }
  sockread %z
}

dialog oapp {
  title "Oasiz Passport Updater v1.7"
  size -1 -1 124 118
  option dbu
  edit %e, 1, 5 9 115 10, autohs left
  edit %p, 2, 5 28 115 10, pass autohs left
;; id left top width height
  text "Chat Server:", 10, 5 51 35 8, left
  radio "Main", 11, 41 51 23 8, group
  radio "Groups", 13, 66 51 26 8,
  radio "Both", 14, 97 51 26 8,
  button "Update", 3, 5 61 36 11
  button "Connect", 5, 43 61 36 11, disable
  button "Reset", 8, 82 61 36 11
  text "Email Address:", 6, 5 1 60 8, left
  text "Password:", 7, 5 20 60 6, left
  check " Save Password?", 15, 5 41 55 8, right
  edit Enter your Oasiz account email address & password and click "Update" to retrieve your details., 4, 5 76 115 30, read multi left
  text "Copyright © 2009", 9, 24 108 46 8, left
  link "oasiz.net", 12, 70 108 30 8
}

alias Gs {
  if ($1 == G) return 75.126.194.89
  return 75.126.194.90
}

alias GsA {
  if (%svr == G) return 13
  if (%svr == B) return 14
  else return 11
}

alias Doserv {
  if (%svr != B) {
    server $Gs(%svr)
  }
  else {
    server $Gs(M)
    server -m $Gs(G)
  }
}

on *:dialog:oapp:close:*:{ if (%pps != 1) { unset %p } }
on *:dialog:oapp:sclick:15:{ set %pps $did(15).state }
on *:dialog:oapp:sclick:11:{ set %svr M }
on *:dialog:oapp:sclick:13:{ set %svr G }
on *:dialog:oapp:sclick:14:{ set %svr B }
on *:dialog:oapp:init:*:{ did -c $dname $GsA | if (%pps == 1) { did -c $dname 15 } }
on *:dialog:oapp:sclick:12:{ url -an http://www.oasiz.net }
on *:dialog:oapp:sclick:3:{ set %e $did($dname,1) | set %p $did($dname,2) | did -r $dname 4 | did -a $dname 4 Please wait... | sockopen auth.passport www.oasiz.net 80 }
on *:dialog:oapp:sclick:8:{ did -r $dname 1 | did -r $dname 2 | unset %p | unset %e }
on *:dialog:oapp:sclick:5:{ $Doserv | dialog -x oapp }
on *:sockclose:auth.*:{ did -r oapp 4 | did -a oapp 4 %att | $iif(%ppauth,did -e oapp 5,) | unset %ppauth }

 

oasizauth.txt

Link to comment
Share on other sites

I'm having trouble getting this to work.

 

If I put this remote in to a blank version of mIRC and try to connect, when I try to update my passport nothing happens. It just says Please Wait... forever. If I click 'update' again, I get * /sockopen: 'auth.passport' socket in use

 

If I open a blank version of mIRC and load up oasiz.mrc, and then load this remote, I can connect to the server, and update/authenticate my passport, but I can't get into any rooms; it just says 'No Permissions to Perform Command'

 

Halp!

Link to comment
Share on other sites

unfortunately due to some glitch in the forum software if you edit a post it seems to remove the $+... I have re-added them and also added a download-able text document with the code.

Link to comment
Share on other sites

  • 4 months later...

Ive got a new machine and trying to sort my script out. Me being blonde is having trouble updating my script so i can connect. With the code on this thread it won't recognise my email or password.

 

Anybody got any advice??

 

Please remember i am blonde here lol.

Link to comment
Share on other sites

i would use the txt file attachment.. Sometimes the code post changes/removes characters.. If that doesn't work i would suggest checking the oasiz forum for possible updates to the connection

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...