// NS: >> VER {id} MSNP9 CVR0\r
// MSNP15\r
// NS: >>> VER {id} MSNP15 CVR0\r
- $this->ns_writeln("VER $this->id ".PROTOCOL.' CVR0');\r
+ $this->ns_writeln("VER $this->id ".self::PROTOCOL.' CVR0');\r
\r
$start_tm = time();\r
- while (!socketcheck($this->NSfp)) {\r
+ while (!self::socketcheck($this->NSfp)) {\r
$data = $this->ns_readln();\r
// no data?\r
if ($data === false) {\r
// MSNP15\r
// NS: <<< VER {id} MSNP15 CVR0\r
// NS: >>> CVR {id} 0x0409 winnt 5.1 i386 MSMSGS 8.1.0178 msmsgs {user}\r
- $this->ns_writeln("CVR $this->id 0x0409 winnt 5.1 i386 MSMSGS ".BUILDVER." msmsgs $user");\r
+ $this->ns_writeln("CVR $this->id 0x0409 winnt 5.1 i386 MSMSGS ".self::BUILDVER." msmsgs $user");\r
break;\r
\r
case 'CVR':\r
// MSNP15\r
// NS: <<< CVR {id} {ver_list} {download_serve} ....\r
// NS: >>> USR {id} SSO I {user}\r
- $this->ns_writeln("USR $this->id ".LOGIN_METHOD." I $user");\r
+ $this->ns_writeln("USR $this->id ".self::LOGIN_METHOD." I $user");\r
break;\r
\r
case 'USR':\r
$login_code = $this->generateLoginBLOB($secret, $nonce);\r
\r
// NS: >>> USR {id} SSO S {ticket} {login_code}\r
- $this->ns_writeln("USR $this->id ".LOGIN_METHOD." S $ticket $login_code");\r
+ $this->ns_writeln("USR $this->id ".self::LOGIN_METHOD." S $ticket $login_code");\r
$this->authed = true;\r
break;\r
\r
// NS: >> VER {id} MSNP9 CVR0\r
// MSNP15\r
// NS: >>> VER {id} MSNP15 CVR0\r
- $this->ns_writeln("VER $this->id ".PROTOCOL.' CVR0');\r
+ $this->ns_writeln("VER $this->id ".self::PROTOCOL.' CVR0');\r
break;\r
\r
case 'GCF':\r
$len = strlen($str);\r
$this->ns_writeln("UUX $this->id $len");\r
$this->ns_writedata($str);\r
- if (!socketcheck($this->NSfp)) {\r
+ if (!self::socketcheck($this->NSfp)) {\r
$this->debug_message('*** Connected, waiting for commands');\r
break;\r
} else {\r
*/\r
private function nsReceive() {\r
// Sign in again if not signed in or socket failed\r
- if (!is_resource($this->NSfp) || socketcheck($this->NSfp)) {\r
+ if (!is_resource($this->NSfp) || self::socketcheck($this->NSfp)) {\r
$this->callHandler('Reconnect');\r
$this->NSRetryWait($this->retry_wait);\r
$this->signon();\r
$fingerprint = $this->getChallenge($chl_code);\r
// NS: >>> QRY {id} {product_id} 32\r
// NS: >>> fingerprint\r
- $this->ns_writeln("QRY $this->id ".PROD_ID.' 32');\r
+ $this->ns_writeln("QRY $this->id ".self::PROD_ID.' 32');\r
$this->ns_writedata($fingerprint);\r
$this->ns_writeln("CHG $this->id NLN $this->clientid");\r
if ($this->PhotoStickerFile !== false)\r
* @return void\r
*/\r
private function endSBSession($socket, $killsession = false) {\r
- if (!socketcheck($socket)) {\r
+ if (!self::socketcheck($socket)) {\r
$this->sb_writeln($socket, $fake = 0, 'OUT');\r
}\r
@fclose($socket);\r
*/\r
private function sendMessageViaSB($to, $message) {\r
$socket = $this->switchBoardSessionLookup[$to];\r
- if (socketcheck($socket)) {\r
+ if (self::socketcheck($socket)) {\r
return false;\r
}\r
\r
</soap:Envelope>';\r
\r
$header_array = array(\r
- 'SOAPAction: '.OIM_MAILDATA_SOAP,\r
+ 'SOAPAction: '.self::OIM_MAILDATA_SOAP,\r
'Content-Type: text/xml; charset=utf-8',\r
- 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Messenger '.BUILDVER.')'\r
+ 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Messenger '.self::BUILDVER.')'\r
);\r
\r
- $this->debug_message('*** URL: '.OIM_MAILDATA_URL);\r
+ $this->debug_message('*** URL: '.self::OIM_MAILDATA_URL);\r
$this->debug_message("*** Sending SOAP:\n$XML");\r
$curl = curl_init();\r
- curl_setopt($curl, CURLOPT_URL, OIM_MAILDATA_URL);\r
+ curl_setopt($curl, CURLOPT_URL, self::OIM_MAILDATA_URL);\r
curl_setopt($curl, CURLOPT_HTTPHEADER, $header_array);\r
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);\r
</soap:Envelope>';\r
\r
$header_array = array(\r
- 'SOAPAction: '.OIM_READ_SOAP,\r
+ 'SOAPAction: '.self::OIM_READ_SOAP,\r
'Content-Type: text/xml; charset=utf-8',\r
- 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Messenger '.BUILDVER.')'\r
+ 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Messenger '.self::BUILDVER.')'\r
);\r
\r
- $this->debug_message('*** URL: '.OIM_READ_URL);\r
+ $this->debug_message('*** URL: '.self::OIM_READ_URL);\r
$this->debug_message("*** Sending SOAP:\n$XML");\r
$curl = curl_init();\r
- curl_setopt($curl, CURLOPT_URL, OIM_READ_URL);\r
+ curl_setopt($curl, CURLOPT_URL, self::OIM_READ_URL);\r
curl_setopt($curl, CURLOPT_HTTPHEADER, $header_array);\r
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);\r
</soap:Envelope>';\r
\r
$header_array = array(\r
- 'SOAPAction: '.OIM_DEL_SOAP,\r
+ 'SOAPAction: '.self::OIM_DEL_SOAP,\r
'Content-Type: text/xml; charset=utf-8',\r
- 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Messenger '.BUILDVER.')'\r
+ 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Messenger '.self::BUILDVER.')'\r
);\r
\r
- $this->debug_message('*** URL: '.OIM_DEL_URL);\r
+ $this->debug_message('*** URL: '.self::OIM_DEL_URL);\r
$this->debug_message("*** Sending SOAP:\n$XML");\r
$curl = curl_init();\r
- curl_setopt($curl, CURLOPT_URL, OIM_DEL_URL);\r
+ curl_setopt($curl, CURLOPT_URL, self::OIM_DEL_URL);\r
curl_setopt($curl, CURLOPT_HTTPHEADER, $header_array);\r
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);\r
xml:lang="zh-TW"\r
proxy="MSNMSGR"\r
xmlns="http://messenger.msn.com/ws/2004/09/oim/"\r
- msnpVer="'.PROTOCOL.'"\r
- buildVer="'.BUILDVER.'"/>\r
+ msnpVer="'.self::PROTOCOL.'"\r
+ buildVer="'.self::BUILDVER.'"/>\r
<To memberName="'.$to.'" xmlns="http://messenger.msn.com/ws/2004/09/oim/"/>\r
<Ticket passport="'.htmlspecialchars($this->ticket['oim_ticket']).'"\r
- appid="'.PROD_ID.'"\r
+ appid="'.self::PROD_ID.'"\r
lockkey="'.$lockkey.'"\r
xmlns="http://messenger.msn.com/ws/2004/09/oim/"/>\r
<Sequence xmlns="http://schemas.xmlsoap.org/ws/2003/03/rm">\r
</soap:Envelope>';\r
\r
$header_array = array(\r
- 'SOAPAction: '.OIM_SEND_SOAP,\r
+ 'SOAPAction: '.self::OIM_SEND_SOAP,\r
'Content-Type: text/xml',\r
- 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Messenger '.BUILDVER.')'\r
+ 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Messenger '.self::BUILDVER.')'\r
);\r
\r
- $this->debug_message('*** URL: '.OIM_SEND_URL);\r
+ $this->debug_message('*** URL: '.self::OIM_SEND_URL);\r
$this->debug_message("*** Sending SOAP:\n$XML");\r
$curl = curl_init();\r
- curl_setopt($curl, CURLOPT_URL, OIM_SEND_URL);\r
+ curl_setopt($curl, CURLOPT_URL, self::OIM_SEND_URL);\r
curl_setopt($curl, CURLOPT_HTTPHEADER, $header_array);\r
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);\r
</soap:Envelope>';\r
\r
$header_array = array(\r
- 'SOAPAction: '.DELMEMBER_SOAP,\r
+ 'SOAPAction: '.self::DELMEMBER_SOAP,\r
'Content-Type: text/xml; charset=utf-8',\r
'User-Agent: MSN Explorer/9.0 (MSN 8.0; TmstmpExt)'\r
);\r
\r
- $this->debug_message('*** URL: '.DELMEMBER_URL);\r
+ $this->debug_message('*** URL: '.self::DELMEMBER_URL);\r
$this->debug_message("*** Sending SOAP:\n$XML");\r
$curl = curl_init();\r
- curl_setopt($curl, CURLOPT_URL, DELMEMBER_URL);\r
+ curl_setopt($curl, CURLOPT_URL, self::DELMEMBER_URL);\r
curl_setopt($curl, CURLOPT_HTTPHEADER, $header_array);\r
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);\r
</soap:Body>\r
</soap:Envelope>';\r
$header_array = array(\r
- 'SOAPAction: '.ADDMEMBER_SOAP,\r
+ 'SOAPAction: '.self::ADDMEMBER_SOAP,\r
'Content-Type: text/xml; charset=utf-8',\r
'User-Agent: MSN Explorer/9.0 (MSN 8.0; TmstmpExt)'\r
);\r
\r
- $this->debug_message('*** URL: '.ADDMEMBER_URL);\r
+ $this->debug_message('*** URL: '.self::ADDMEMBER_URL);\r
$this->debug_message("*** Sending SOAP:\n$XML");\r
$curl = curl_init();\r
- curl_setopt($curl, CURLOPT_URL, ADDMEMBER_URL);\r
+ curl_setopt($curl, CURLOPT_URL, self::ADDMEMBER_URL);\r
curl_setopt($curl, CURLOPT_HTTPHEADER, $header_array);\r
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);\r
</soap:Body>\r
</soap:Envelope>';\r
$header_array = array(\r
- 'SOAPAction: '.MEMBERSHIP_SOAP,\r
+ 'SOAPAction: '.self::MEMBERSHIP_SOAP,\r
'Content-Type: text/xml; charset=utf-8',\r
'User-Agent: MSN Explorer/9.0 (MSN 8.0; TmstmpExt)'\r
);\r
- $this->debug_message('*** URL: '.MEMBERSHIP_URL);\r
+ $this->debug_message('*** URL: '.self::MEMBERSHIP_URL);\r
$this->debug_message("*** Sending SOAP:\n$XML");\r
$curl = curl_init();\r
- curl_setopt($curl, CURLOPT_URL, MEMBERSHIP_URL);\r
+ curl_setopt($curl, CURLOPT_URL, self::MEMBERSHIP_URL);\r
curl_setopt($curl, CURLOPT_HTTPHEADER, $header_array);\r
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);\r
// MSNP15\r
// http://msnpiki.msnfanatic.com/index.php/MSNP11:Challenges\r
// Step 1: The MD5 Hash\r
- $md5Hash = md5($code.PROD_KEY);\r
+ $md5Hash = md5($code.self::PROD_KEY);\r
$aMD5 = @explode("\0", chunk_split($md5Hash, 8, "\0"));\r
for ($i = 0; $i < 4; $i++) {\r
$aMD5[$i] = implode('', array_reverse(@explode("\0", chunk_split($aMD5[$i], 2, "\0"))));\r
}\r
\r
// Step 2: A new string\r
- $chl_id = $code.PROD_ID;\r
+ $chl_id = $code.self::PROD_ID;\r
$chl_id .= str_repeat('0', 8 - (strlen($chl_id) % 8));\r
\r
$aID = @explode("\0", substr(chunk_split($chl_id, 4, "\0"), 0, -1));\r
// $key = bcadd(bcmul($high, 0x100000000), $low);\r
\r
// Step 4: Using the key\r
- $md5Hash = md5($code.PROD_KEY);\r
+ $md5Hash = md5($code.self::PROD_KEY);\r
$aHash = @explode("\0", chunk_split($md5Hash, 8, "\0"));\r
\r
$hash = '';\r
$password = htmlspecialchars($this->password);\r
\r
if ($url === '')\r
- $passport_url = PASSPORT_URL;\r
+ $passport_url = self::PASSPORT_URL;\r
else\r
$passport_url = $url;\r
\r