|
发表于 2016-6-4 21:59:40
|
显示全部楼层
5 K. B/ N: j6 a9 _0 G' t这个是我下载醉眼的,decoder 的0 p4 Z2 D6 w( T/ F/ J! ]( ^
<?php
+ o+ h: q7 G& Y+ B: l) M while (true) {8 ]( `, k, t+ i. s1 z
while (true) {
0 Z8 {9 a* u/ ]9 h" i+ _) R while (true) {
H# u! H- `; ~% a while (true) {. M! v. s: P5 ^
include( '../app/config/base.php' );
1 f0 E( S# V; V" ? include( 'mt/mt_pwd.php' );0 ~7 ^9 ?1 K3 e8 S. |6 W
include( 'license/request.inc.php' );
, k' D- R, H& i( ] $mysql = array( );
; z2 _- K. V6 s! \! e6 q2 Z $mysql['domain'] = '';4 [" s7 t! b$ s, t6 M
$mysql['click_ip'] = '';
' g% C Y% B' h $mysql['click_time'] = '';
" z) m: w6 i( D3 q1 x $error = '';$ H' \ k9 O9 y5 ?7 l
$html['userName'] = '';
3 A0 e5 h2 F! F7 p7 Q% G! G! m $isValid = 5;9 ?$ m* I. ^5 J" U3 h4 f* R3 x" ]
$statusError = 5;( w1 `+ B) |- _* Z* |
$coreError = '';4 u8 h$ h! N2 r. Z
$verified = false;2 F9 _* O8 }3 R
$msgHeader = '';
0 z- j' C" u& w8 }1 O9 C& A $msg = '';
0 ~, ?: b( T% }; d7 J4 e$ [ $tokenId = 5;2 I! B: S# D) x1 f2 R
$loginFailed = false; H7 i( j6 f' j6 }
$responseDataEncryptCipher_W8u2p3urm5 = '+K9)wNU7@{KD8,,}';
4 T' B& p7 s% S$ e) @ $responseApiKey_JqeXTfS3du = 'a)3n_U5NXL,,OfU]';
" C7 D5 K6 y4 V! y( t$ `
2 ~, K7 O9 L; Q5 v if ($['REQUEST_METHOD'] = 'POST') {
9 K( Z3 z2 v) G& Y" q" `/ _ $verified = true;. @: E& |4 y7 G4 o& T! Y1 h- O
$['tokenId'];4 ]' a) j5 C) ` j! p
$tokenId = ;
8 z. W9 M! ^( r* l$ l. o. S& f, t. _( k& k
if (!) {7 L! V7 {/ G+ Y5 s5 Z# S$ O x
$[$tokenId . . '_tokenName'];( D# j: z4 _/ s; X6 q u$ F
$tokenName_str = (true ? : );( w/ ~0 q, t" _- D
! i' r0 m9 K2 M5 d; n
if (!) {2 x1 |& Q9 U% ]' w, w* V' T
$[$tokenName_str];
5 I/ p' h5 D! p" W- K; D- r1 I $tokenValue_str = (true ? : );$ K3 x4 j% `8 J, Y+ U) x8 w% E
new ( $tokenId );9 l& G8 }* D. [
$postAuthorization = ;% M, d& c5 O% C3 r0 }
$postAuthorization->validated( $tokenName_str, $tokenValue_str );
, M+ N0 u4 l# Q" @ $validPost = ;8 k1 d# i6 K% }
# K/ ~1 [) S2 Q1 U2 H7 ~
if ($validPost) {5 \: U! I: }. x7 M
array_map( array( 'HtmlHelper' => , 'decodeHtml' => ), $ );- k; ~+ J2 f6 D* U( i w
$ = ;* o7 {9 R+ N1 h' e/ P
$['userName'];
V; n; V' {% ~0 b+ P $userName = ;
. Z/ r/ [8 c- ~" i $['userPassword'];
2 u4 c! k; v% l9 F0 S% v% h, \ $userPassword = ;8 J( W' ]2 }+ y2 d
$db->prepare( 'SELECT *
4 j/ a) @& `: m5 B2 C/ \, k FROM mt_account# [6 H8 R& k% ^3 n
WHERE user_name = :user_name' );
4 I" F0 E& }! { $loginSql = ;: i6 ~* J2 R9 ^- l% Z
$loginSql->bindParam( ':user_name', $userName, PARAM_STR );3 h! b! |! i+ m
$loginSql->execute( );6 S' W3 E& H6 g
$result = ; R5 k2 W% ~! V
" a( y5 m' c T1 G0 m
if ($result) {4 X3 v9 x' L( q: A/ n, K+ _
$loginSql->fetch;
4 ~8 ?2 J& b1 U2 l, N1 J }) b- ~5 p/ {) F7 Y3 |
}, W/ r8 s6 W, ?
}
$ @' a4 P8 N& N0 m! |* D8 n }! h) A; m; S! R! P
}$ n4 a9 V& {2 A) `( l! |" u
K, A, U" f5 a7 k& D# J
( FETCH_ASSOC );& t1 f; B0 Z9 T* T! Q( P. r7 N& O
! ]/ t. v- _& x5 a b8 h8 s if ($data = ) { G0 \* R {/ q1 u7 [
new ( );
1 K% Q% z$ @5 k( c; A: z P0 D $bcrypt = ;* N; @- Z5 t: n+ V% O4 M
$bcrypt->verify( $userPassword, $data['user_password'] );
3 n# m0 E- s/ Y5 _9 G0 } $isGood = ;; ~7 Q6 }- |6 z0 i7 r
' m. ]+ {* Q2 `9 z if (!) {" H$ F1 j# d H2 Y* q
$error = 'Your password is incorrect.';& B" ~; i) W0 F- C O
new ( 0, $userName, 'Password' );' L K1 O) g" w
$log = ;, R7 D% T! r% E; Z
$log->logger( );
; k( n+ }% z% k; T" ~ continue;
/ z2 }/ l- z6 G' |3 T: N+ c } }3 L! O( X7 d/ R0 I& ^: }
( P. u$ g3 V7 D# F jmp;8 x0 L& j M. C8 M) P
$location = . $['SCRIPT_NAME'];
' X- h# p6 a9 F# Z' }6 d* D0 G $location = 'http://' . str_ireplace( 'account/' . LOGIN_PAGE, '', $location );% I8 `3 y- z. ~
$db->prepare( 'UPDATE mt_account SET mt_location = :location; UPDATE mt_campaigns SET mt_location = :location;' );
6 E8 w- ^9 d' p' [1 R $stmt = ;3 q4 O$ L# y) y: i# R+ J/ b
$stmt->bindParam( ':location', $location, PARAM_STR );, b, n5 x* k. c) k
$stmt->execute( );
- C, l0 s5 f; u $redirect = 'campaigns.php';, B5 o- A4 ?7 h- L
% m& v6 g& Z2 {' H( ?) \
if (!) {
- W, Q; Q5 K2 v6 D' { $['lastPage'];
! u" R0 V- O' R3 t" Z $redirect = ;
Y" ^4 m2 ^: |' _( E unset( $[lastPage] );9 j' Z r/ L. b+ w1 ]
header( 'location: ' . . $redirect );( Z7 V+ N: v5 ^( m
exit( );# D) h+ k4 }: s8 l
continue;
8 |# Q9 {+ `! O( L }
6 @$ g! n* ^$ r+ _
2 M- H. ?" w9 R8 p6 g. a6 N# m' v7 p break 3;
, _; _* S6 ]; f5 a" v1 y }; n" N' s; D3 q9 y
$ c; l3 V; Y3 B$ G L ? $log = ;9 K0 A& D% Y: f8 Y) b
$log->logger( );
3 y2 Q/ @' K% u2 ^# m }! p( I/ r6 k* p# O0 N& B
+ j6 v: u$ ]4 u T7 f) G $mysqlError &= '<u>Login Page</u> - ' . $loginSql->errorCode( ) . ' - ' . $loginSql->errorInfo( ) . '<br><br>';
; k& k* C' ^ X& V# P }
- ^) o8 J' @. a: L
7 C9 Z8 B/ l. O( s: o $postAuthorization->failedPost( );
$ b9 c% P0 E5 m( R2 l $error = ;3 C; q) Z; V) U5 ^4 N0 g
$loginFailed = true;" g2 d: E! P7 p
$postAuthorization->createTokens( 5 );7 C) q- V1 E9 K
$postAuthorization->tokenName;
" s' o7 m7 D1 D# F, g $postTokenName = ;& O2 g! T1 ~3 ^8 @5 _# |
$postAuthorization->tokenValue;
/ r2 U( o) l) q3 Q $postTokenValue = ;- [! y; X& `" B+ z# d- i
$html['userName'] = HtmlHelper::encodeHtml( $['userName'] );$ f* U7 N' W* g3 x0 L
}+ D' }5 T0 c( j6 |3 \2 R/ T9 d
1 f& h# y- e/ S2 `# C $c_data = array( );, }: y& Q+ O$ z3 ^# o* ]; d
& n i" y' i8 i# w, g8 [ if (LOGIN_LOG) {5 J: _* f! Q8 D3 _# o) {& I, @
new ( 2 );
: f5 d1 b; `- R* O$ n# W6 O8 r7 n $log = ;. Z1 y ]: S+ F m
$log->logger( );
; Q2 l. M5 X5 |2 ` new ( null, 'POST' );% z% j2 A$ A4 \; h- S6 q6 ]' w, q
$request = ;
- K6 G5 }6 E( y# @* } $request->execute( );4 v6 {; O/ w& A. K( t( O/ d, E J
$request->errorNum;
9 c$ n% H0 W1 N& N4 @ $curlError = ;" B7 D% k0 ?$ z
json_decode( $request->responseBody );0 Z$ y5 G8 S @1 Q) A" U# f9 U
$c_data = ;
; r8 z, \$ _1 J6 S $c_info = array( );
% l* n/ i4 x: R+ [" T4 w $http_code = 5;
% y6 D9 H U6 t" z: p1 o2 k $success = false;
* P' S6 G' y9 @8 f! e# U' E
* T( C2 u$ c; N& T @* A if (!) {. r l' l Z( c! K5 g! H7 D
trim( mcrypt_decrypt( MCRYPT_BLOWFISH, $responseDataEncryptCipher_W8u2p3urm5, rawurldecode( $c_data->info1 ), MCRYPT_MODE_ECB ) );
# @- t& Q8 \# D! Z8 P- ~. D" Y" D $isValid = ;
* |2 l g9 k6 `) k* e/ m trim( mcrypt_decrypt( MCRYPT_BLOWFISH, $responseDataEncryptCipher_W8u2p3urm5, rawurldecode( $c_data->info2 ), MCRYPT_MODE_ECB ) );
# D# h2 A! }4 O& U) N5 o/ ~9 w $statusCode = ;
! a" ^& S7 r, e! `9 e) c6 M. y trim( mcrypt_decrypt( MCRYPT_BLOWFISH, $responseDataEncryptCipher_W8u2p3urm5, rawurldecode( $c_data->info ), MCRYPT_MODE_ECB ) );
/ |* J; }) o' h2 T $responseApiKey_mnwTcIrW3c = ;
) P! T" W7 \$ ~# I1 I
7 ]! i& D+ f, a3 B& J+ v& v if ($responseApiKey_mnwTcIrW3c = $responseApiKey_JqeXTfS3du) {/ Q- s5 _. q2 X+ C+ A$ m
$['imobi_data'] = array( 'imVersion' => $c_data->iVersion, 'xmlVersion' => $c_data->dVersion );
8 I) G" @6 ]! I- T1 f continue;6 x- {$ C$ R$ P+ C+ m" n
}
: I) L1 K: Z6 ^! |0 D }
C& N8 x% N q$ m$ J. ]. gelse {
' d& l" A u/ `% J $c_info = ;* H# b* O" P- b
$c_info['http_code'];
" [% h: o' Z: i# A $http_code = ;- V8 _ v* U7 X/ F" O
!;
7 z* Q; g- j* Y6 x+ V9 ] H, Q0 a $http_code = 404;
5 t! b, o3 u: d1 H1 t, M $http_code = 408;: D6 Z" k/ {( v8 o) J; N
$http_code = 500;
9 x2 F7 V% t6 c $http_code = 503;$ L- J% i9 a/ {. P# X% [& Q
" K- H3 Q2 k$ v- H, h1 d R if (( ( ( ( ( $curlError || ) || ) || ) || ) || )) {4 _5 j% I9 ]6 r* y- x
new ( 'http://www.revivedmedia.net/imobitrax/uhadroewiur5y67ru.php', 'POST' );7 Q* J6 b# w1 D" ^ `0 n
$request = ;6 s |7 ]4 C* x8 H
$request->execute( );
6 b( b0 m/ _( D2 o2 a json_decode( $request->responseBody );
5 r D' f) }$ e K: k% z$ p $c_data = ;+ k% a5 X- d1 R s4 j( h( o9 y7 y
trim( mcrypt_decrypt( MCRYPT_BLOWFISH, $responseDataEncryptCipher_W8u2p3urm5, rawurldecode( $c_data->info1 ), MCRYPT_MODE_ECB ) );/ d1 w' V' ^+ t: `; @
$isValid = ;! p2 x" [3 O( }; _6 c- k
trim( mcrypt_decrypt( MCRYPT_BLOWFISH, $responseDataEncryptCipher_W8u2p3urm5, rawurldecode( $c_data->info2 ), MCRYPT_MODE_ECB ) );
7 V% M _7 G4 n0 A; J; l7 L. h $statusCode = ;2 ?7 ]: Y3 S/ J* k; E
trim( mcrypt_decrypt( MCRYPT_BLOWFISH, $responseDataEncryptCipher_W8u2p3urm5, rawurldecode( $c_data->info ), MCRYPT_MODE_ECB ) );
4 O* C9 V: K0 J$ u* O% k) w7 G $responseApiKey_mnwTcIrW3c = ;
' u- f9 ~& T8 H, W1 t# D $responseApiKey_mnwTcIrW3c = $responseApiKey_JqeXTfS3du;& j" u3 X$ t3 U
}! X- T/ N; U- \ U
/ J! K. X) h8 H
4 @4 d( \0 y# Y0 b if () {8 [/ u }$ Y' }( U: E
$['imobi_data'] = array( 'imVersion' => $c_data->iVersion, 'xmlVersion' => $c_data->dVersion );
" V$ }/ v3 `$ S7 X9 ^ ^ continue;
* i& w* Q) A: S8 ] |0 n3 a, z }* h) X4 ~. h' W* s! }1 c
F/ D3 B8 f0 Q/ J7 @ jmp;
7 C: G# X2 o$ l switch (true) {3 ?8 v! Z+ g5 V" {( i/ c" w
case (bool): {
! _# Z! x: e S) e2 |) f: K0 G) h new ( 'http://www.imobitrax.com/license/logger.php', 'POST', null, true, 1 );
1 Q1 }4 h( n' q $request1 = ;! |. W9 c3 K V
$request1->execute( );9 ?" t0 q: M3 K4 o: n$ |; }
$msgHeader = 'This domain (' . $['SERVER_NAME'] . ') is not licensed to run iMobiTrax.';
) a d, G9 l, t* }' ]8 U $msg = 'If you have a licensed copy of iMobitrax, there may be an error in the domain in our system. You can log into your user panel at <a href="http://www.imobitrax.com/users/profile" target="_blank">iMobiTrax.com</a> and update your domain. Please contact support if you have any questions.';
6 X$ l# }8 R8 E! w9 _ break ;# B5 S, ~) J2 _9 d: U
!;
7 l/ V! o( d0 l9 X switch (true) {
m) |3 \( m3 O2 _8 r& F/ y) ] case ( $isValid && ): {. a5 I: w8 C: G3 W, _9 M& T
'This domain (' . $['SERVER_NAME'] . ') is licensed to run iMobiTrax, but you need to pay for your license.';
) S: I+ Y9 s- Y- _9 b, q }5 f" d4 z8 \6 [& _; n2 `$ U
}
, ?8 A) P# Z, }" K9 H* O- X }/ O4 u3 z; [1 {$ m$ i' y
}( h; r8 f+ m/ w; W
6 l1 r/ {5 X4 d6 f
$msgHeader = ;. I* X* K1 }" f9 a
$msg = 'Please contact support to arrange payment for your license.';/ G# `- c- h/ K4 m* R0 K% n7 E' t
}
+ Q4 D Q, @. S9 ]0 g
) z% s! ]* W" G. v4 M/ F+ ]8 A break ;, g* d! ]# w3 `+ u
$statusCode = 1;
! y- X. g6 s+ \' ]" n switch (true) {/ s# e) j5 P+ @" J) s/ m: S. r1 B
case ( $isValid && ): {! B/ j, R/ c! s; k3 o
$verified = true;4 k; f8 R1 P, v& k3 v6 e2 R. ]
break ;
: m1 O9 z* s" V1 b $statusCode = 2;
* H# J* y) W- N! { switch (true) {% h9 k v0 l( ?6 b7 G, p: m
case ( $isValid && ): {
" r3 p1 i* ~$ Q1 I7 p6 m9 U/ S $msgHeader = 'Your monthly subscription to use iMobiTrax on this domain has expired.';
0 J' U* |0 f8 g $msg = 'In order to use iMobiTrax, you must have a current subscription. Please login into your <a href="http://www.imobitrax.com/users/member/index">user panel</a> to renew and/or update your monthly subscription.';
& @. }" G6 A h: v; Q break ;
+ [( x, f. M2 X2 a !;
: H9 X% t# \$ g9 Z4 G9 v }6 i0 l1 M( |% r9 h
; q/ u, D- R8 L9 a% Z( n
case ( && ): {
Q: M" A% F E L. _( L new ( 'http://www.imobitrax.com/license/logger.php', 'POST', null, true, 3 ); k, p$ \) U& b$ I' U6 n
$request1 = ;
. u5 O5 N& z% d9 A% H% w $request1->execute( );
! r4 V w9 {; W# g7 G7 {- G/ { $msgHeader = 'There appears to be an error in iMobiTrax.';, d- A, V: ~& B/ ^) H& r
$msg = 'Please contact support.';
4 ?3 k% W& R3 ]7 D break ;
" M4 E8 F% h. w $statusCode = 4;
1 V6 e) ]% z/ c% A. I6 [" b& u6 z switch (true) {9 r9 D1 m0 U" h8 m4 s# e
case ( ! && ): {
3 w* B% ]8 {# k5 O! u $msgHeader = 'iMobiTrax Technicians are currently upgrading our API core.';
7 q) S$ q: ^/ I; x1 V; Y $msg = 'Unfortunately during this time you are unable to login but your campaigns are still tracking as normal. We should be finished with this core upgrade within the next hour. Thank you for your patience as we continue to make iMobiTrax even better! If you have any questions please do not hesitate to reach out to us at [email protected].';$ c. P) ]: F8 E" p) A$ F) ~) {8 x
break ;2 p0 {, f+ u! f& j8 {' B5 u
new ( 'http://www.imobitrax.com/license/logger.php', 'POST', null, true, 5 );
8 o+ @' K9 [) H) j/ T# ^/ a6 g $request1 = ;
6 z; `/ d- m/ ~4 L$ G $request1->execute( );# C0 D; x. t( b* m
$msgHeader = 'There appears to be an error in iMobiTrax.';4 P% \5 p7 B% G
$msg = 'Please contact support!';! E$ O% ~, X3 P" K: W
break ;; l. C0 V3 V3 D# P' s6 G
;6 z+ k1 {2 R; O$ R8 Q1 [
}
4 n# p5 O$ E+ c/ n; K# C$ S8 X }
+ v9 a5 a4 _9 ]. K& s) u3 O4 G, J& r }7 W* l% ^& Y+ l+ f# o2 [
}! W. T$ P* p6 g* u, E- K5 `( q* r
t( X& L, \7 i
$statusCode = 3;
* S- }- S, Q& {$ U+ x }
; O l2 ]- k# f9 {. Z }
# }' j" f5 R) p6 }1 U }- U$ B8 `' b& A o4 D* }$ @
0 y$ [: K) i& i$ {4 {/ r- g1 ]
new ( );
* f2 U* @; K8 r8 _( L $postAuthorization = ;
. @) }1 j, n% Q7 B, o" x' E $postAuthorization->createTokens( 5 );
+ h* Y8 N+ x( f3 L& L Q% B0 C $postAuthorization->tokenName;
$ C! G& j% W1 m$ e7 s2 V $postTokenName = ;
, A3 `( o8 C8 }" u7 W4 T $postAuthorization->tokenValue;+ M, `7 P% i$ U/ a# h( {
$postTokenValue = ;1 x& r& Q# W5 C4 Z+ K* I
$postAuthorization->tokenId;, a5 f8 N! T2 h( u1 r& A7 h/ u
$tokenId = ;" Q7 |0 f8 g o# @4 F
PageElement::topTemplateLogin( 'iMobiTrax Login' );
; J7 y" |+ w& i4 y Y2 L7 ?* H% v; L2 |6 Z) j7 x( a: S2 \# A# q9 C8 P9 i# B
if ($loginFailed) {
# [( x( Q! S. o2 E8 {, P% N% w if (!) {, g$ t: H, s! n
echo ;
& o( B" d3 e# S2 Q9 R" O5 r continue;- w$ W% i) L4 T# Y7 W) K- S
}. Q: P6 H$ |) N8 t% v
/ d' I& H. q$ T8 w8 z
jmp;
# U- |# B: p) ~' s! Z
: I3 z: t8 u7 A/ T# j1 P1 x1 Z. L$ w if () {
* |! `" X( N j5 f3 w& c echo ;/ I0 }2 |' B; `1 A
echo ;
" }7 Y2 D' T- j3 j/ {. U6 E! {: p6 ] echo ;
h# ~ b) ^) V5 o8 U5 z" m$ r0 B. y* L echo ;
' Y; T; p( _" L) i5 v/ g/ ` echo ;7 I3 I* D3 T0 j& L
echo ;
+ v; G% k& Z5 D' q echo ;6 |# W& t ^: V, Z2 y( X& \' X
echo ;; j T6 A5 g" I( m0 k+ _* }9 h3 T
4 A) O$ b0 k4 ~5 ^& s3 j
if ($html['userName'] != '') {& h- f: t. }5 v! p( e/ L
echo ;
7 W3 W p2 }" F/ O+ u% D }
7 w, @; a. v2 T/ {" I }8 V. q# e6 B# x5 f. s) P6 w! ]# T
* c r+ n5 }0 v% c" a9 [
echo ;
9 O2 q3 K( Z8 K* M/ D continue;
) K# X4 A( U8 v" E }
3 u5 j: h' M2 g5 I1 f1 k8 E Q& F8 G- F, D1 `9 `1 X
jmp;& o& K3 d- M! \
( $mysqlErrorMain );- r/ n! ^. w9 T. k7 P& ~
}
( d z% V: _& l/ z" W
) f/ ~. w! e' _9 f0 b !;
8 q* e3 C$ k1 e8 L
( c+ [: ]: c. Z# L if (( ( $verified && ) && )) {( Z& B3 r% G& t+ `3 w" G s0 r2 |
$page = 'login.php';
9 h" i; Y; b6 n _mysqlError( $mysqlError, $page, false );
# N" ~$ |" g) ~5 i4 k7 \ I }
! n, z0 ?7 C4 y: r5 y5 w8 U3 T$ ~2 {
jmp;# o9 v1 M: p0 k& @! h& d
( );
/ `9 ]0 d6 Q1 C: k: {/ \ return ;" ?3 g) s' z$ j* Z; S
?> |
|