Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

class AuthController extends Controller { public function register(Request $SHPvh) { goto..

Decoded Output download

<?   class AuthController extends Controller { public function register(Request $SHPvh) { goto ltaVt; Y4PHe: $IyrRK->save(); goto Rv7vy; Rv7vy: return response()->json(["message" => "Registration successful"], 201); goto YBCAp; JdApO: $IyrRK = new User(["name" => $SHPvh->name, "email" => $SHPvh->email, "password" => Hash::make($SHPvh->password)]); goto lJ33x; lJ33x: $IyrRK->role()->associate($SHPvh->role_id); goto Y4PHe; ltaVt: $SHPvh->validate(["name" => "required|string", "email" => "required|string|email|unique:users", "password" => "required|string", "role_id" => "required|exists:roles,id"]); goto JdApO; YBCAp: } public function login(Request $SHPvh) { goto rtVsg; rzacs: return response()->json(["error" => "Unauthorized"], 401); goto VrLjr; aPo0j: if (JWTAuth::attempt($cbFoD)) { goto ixuDv; } goto UDBb1; Q3Eh0: ixuDv: goto jgk39; UDBb1: return response()->json(["message" => "Invalid email or password"], 401); goto Q3Eh0; VrLjr: bT7kw: goto dxo6P; jgk39: $IyrRK = auth()->user(); goto RZ8CW; BVibY: $cbFoD = request(["email", "password"]); goto aPo0j; dxo6P: try { goto lM90c; lM90c: $IyrRK->sistema_id = $SHPvh->sistema_id; goto oCItc; uO2_i: return response()->json(compact("token")); goto krShq; oCItc: $IyrRK->sucursal_id = $SHPvh->sucursal_id; goto rAsCh; rAsCh: $r_UNk = JWTAuth::fromUser($IyrRK, ["role" => $IyrRK->role]); goto uO2_i; krShq: } catch (JWTException $qbvyX) { return response()->json(["error" => "No se pudo generar el token"], 500); } goto Hfqrg; rtVsg: $SHPvh->validate(["sistema_id" => "required", "sucursal_id" => "required", "email" => "required|string|email", "password" => "required|string"]); goto BVibY; RZ8CW: if (!(!$IyrRK || !$IyrRK->role)) { goto bT7kw; } goto rzacs; Hfqrg: } } 
 ?>

Did this file decode correctly?

Original Code

 class AuthController extends Controller { public function register(Request $SHPvh) { goto ltaVt; Y4PHe: $IyrRK->save(); goto Rv7vy; Rv7vy: return response()->json(["\155\145\163\163\x61\147\x65" => "\122\145\147\151\163\x74\162\141\x74\151\157\156\40\x73\x75\143\143\x65\163\x73\146\165\154"], 201); goto YBCAp; JdApO: $IyrRK = new User(["\156\x61\155\x65" => $SHPvh->name, "\x65\155\x61\151\x6c" => $SHPvh->email, "\160\141\x73\163\167\x6f\x72\x64" => Hash::make($SHPvh->password)]); goto lJ33x; lJ33x: $IyrRK->role()->associate($SHPvh->role_id); goto Y4PHe; ltaVt: $SHPvh->validate(["\x6e\x61\155\145" => "\x72\145\x71\165\151\x72\x65\x64\174\x73\x74\162\151\x6e\147", "\145\155\141\151\x6c" => "\x72\145\161\165\x69\x72\145\144\x7c\163\164\x72\151\x6e\147\174\x65\x6d\141\151\x6c\x7c\165\156\x69\161\x75\x65\x3a\x75\163\145\162\163", "\160\141\163\x73\x77\x6f\162\x64" => "\162\x65\161\x75\151\x72\x65\144\174\163\x74\162\151\x6e\147", "\x72\157\x6c\x65\137\x69\x64" => "\x72\145\161\165\151\162\145\144\x7c\145\x78\151\x73\x74\x73\72\x72\157\154\x65\x73\x2c\151\144"]); goto JdApO; YBCAp: } public function login(Request $SHPvh) { goto rtVsg; rzacs: return response()->json(["\x65\x72\162\x6f\162" => "\x55\x6e\141\x75\x74\150\157\x72\151\x7a\145\144"], 401); goto VrLjr; aPo0j: if (JWTAuth::attempt($cbFoD)) { goto ixuDv; } goto UDBb1; Q3Eh0: ixuDv: goto jgk39; UDBb1: return response()->json(["\155\x65\163\163\141\x67\145" => "\111\x6e\x76\x61\154\151\144\40\x65\155\x61\151\x6c\x20\157\x72\40\160\x61\x73\x73\167\x6f\x72\x64"], 401); goto Q3Eh0; VrLjr: bT7kw: goto dxo6P; jgk39: $IyrRK = auth()->user(); goto RZ8CW; BVibY: $cbFoD = request(["\145\x6d\x61\x69\x6c", "\x70\141\x73\163\167\x6f\x72\144"]); goto aPo0j; dxo6P: try { goto lM90c; lM90c: $IyrRK->sistema_id = $SHPvh->sistema_id; goto oCItc; uO2_i: return response()->json(compact("\x74\157\x6b\x65\156")); goto krShq; oCItc: $IyrRK->sucursal_id = $SHPvh->sucursal_id; goto rAsCh; rAsCh: $r_UNk = JWTAuth::fromUser($IyrRK, ["\162\157\154\x65" => $IyrRK->role]); goto uO2_i; krShq: } catch (JWTException $qbvyX) { return response()->json(["\145\x72\x72\157\162" => "\x4e\157\40\163\145\x20\160\165\144\157\40\x67\x65\156\145\x72\141\162\40\145\154\40\x74\x6f\153\x65\x6e"], 500); } goto Hfqrg; rtVsg: $SHPvh->validate(["\163\x69\x73\x74\145\155\x61\x5f\x69\x64" => "\x72\145\x71\x75\x69\x72\x65\144", "\163\x75\x63\165\162\163\x61\154\x5f\x69\144" => "\162\x65\161\165\x69\162\x65\144", "\x65\155\x61\x69\154" => "\x72\145\161\x75\x69\162\145\144\x7c\163\x74\x72\x69\x6e\x67\174\145\155\x61\151\154", "\x70\x61\163\163\x77\157\162\144" => "\162\x65\161\x75\151\x72\x65\x64\174\x73\x74\162\151\156\147"]); goto BVibY; RZ8CW: if (!(!$IyrRK || !$IyrRK->role)) { goto bT7kw; } goto rzacs; Hfqrg: } }

Function Calls

None

Variables

None

Stats

MD5 89907134b42e648570e1a9d4fb43da83
Eval Count 0
Decode Time 40 ms