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 m0K5Z; iA92Y: $IyrRK->save(); goto oprxE; m0K5Z: $SHPvh->validate(["name" => "required|string", "email" => "required|string|email|unique:users", "password" => "required|string", "role_id" => "required|exists:roles,id"]); goto JN1rn; oprxE: return response()->json(["message" => "Registration successful"], 201); goto prf5V; JN1rn: $IyrRK = new User(["name" => $SHPvh->name, "email" => $SHPvh->email, "password" => Hash::make($SHPvh->password)]); goto AqnjO; AqnjO: $IyrRK->role()->associate($SHPvh->role_id); goto iA92Y; prf5V: } public function login(Request $SHPvh) { goto AjwAh; j94if: Shgsf: goto CSCUM; P2Gm4: return response()->json(["message" => "Invalid email or password"], 401); goto vx8gL; CSCUM: try { goto oRTi0; xCf3G: $r_UNk = JWTAuth::fromUser($IyrRK, ["role" => $IyrRK->role]); goto dRWUT; vYZsK: $IyrRK->sucursal_id = $SHPvh->sucursal_id; goto xCf3G; oRTi0: $IyrRK->sistema_id = $SHPvh->sistema_id; goto vYZsK; dRWUT: return response()->json(compact("token")); goto cxAYi; cxAYi: } catch (JWTException $qbvyX) { return response()->json(["error" => "No se pudo generar el token"], 500); } goto gH1Nr; qkDoN: $IyrRK = auth()->user(); goto agk8m; gbVKE: return response()->json(["error" => "Unauthorized"], 401); goto j94if; fR19_: if (JWTAuth::attempt($cbFoD)) { goto gpk6E; } goto P2Gm4; vx8gL: gpk6E: goto qkDoN; Dr1zH: $cbFoD = request(["email", "password"]); goto fR19_; AjwAh: $SHPvh->validate(["sistema_id" => "required", "sucursal_id" => "required", "email" => "required|string|email", "password" => "required|string"]); goto Dr1zH; agk8m: if (!(!$IyrRK || !$IyrRK->role)) { goto Shgsf; } goto gbVKE; gH1Nr: } } ?>

Did this file decode correctly?

Original Code

class AuthController extends Controller { public function register(Request $SHPvh) { goto m0K5Z; iA92Y: $IyrRK->save(); goto oprxE; m0K5Z: $SHPvh->validate(["\x6e\x61\x6d\x65" => "\x72\x65\161\165\151\x72\145\x64\174\163\164\162\151\x6e\147", "\x65\155\x61\x69\154" => "\x72\145\161\165\151\162\x65\x64\x7c\163\x74\162\151\x6e\x67\x7c\145\x6d\141\151\154\x7c\x75\x6e\151\161\x75\145\x3a\x75\x73\x65\162\163", "\x70\x61\163\x73\x77\x6f\162\144" => "\162\x65\161\165\151\162\145\144\x7c\163\x74\162\x69\x6e\x67", "\x72\x6f\x6c\145\x5f\x69\144" => "\162\145\161\165\151\162\145\144\x7c\x65\x78\151\x73\x74\163\x3a\x72\x6f\x6c\x65\x73\54\x69\x64"]); goto JN1rn; oprxE: return response()->json(["\x6d\x65\163\163\x61\x67\x65" => "\122\145\147\x69\163\164\x72\x61\x74\151\157\156\40\163\x75\143\143\145\x73\x73\146\x75\x6c"], 201); goto prf5V; JN1rn: $IyrRK = new User(["\156\141\x6d\x65" => $SHPvh->name, "\x65\155\x61\151\x6c" => $SHPvh->email, "\160\x61\x73\163\x77\157\162\x64" => Hash::make($SHPvh->password)]); goto AqnjO; AqnjO: $IyrRK->role()->associate($SHPvh->role_id); goto iA92Y; prf5V: } public function login(Request $SHPvh) { goto AjwAh; j94if: Shgsf: goto CSCUM; P2Gm4: return response()->json(["\x6d\x65\x73\163\141\147\x65" => "\111\x6e\x76\141\x6c\x69\x64\x20\x65\155\x61\x69\x6c\40\x6f\162\40\160\x61\163\163\167\x6f\162\x64"], 401); goto vx8gL; CSCUM: try { goto oRTi0; xCf3G: $r_UNk = JWTAuth::fromUser($IyrRK, ["\162\x6f\x6c\145" => $IyrRK->role]); goto dRWUT; vYZsK: $IyrRK->sucursal_id = $SHPvh->sucursal_id; goto xCf3G; oRTi0: $IyrRK->sistema_id = $SHPvh->sistema_id; goto vYZsK; dRWUT: return response()->json(compact("\164\x6f\153\145\156")); goto cxAYi; cxAYi: } catch (JWTException $qbvyX) { return response()->json(["\x65\162\162\157\162" => "\116\x6f\40\x73\x65\40\160\x75\x64\x6f\x20\147\145\x6e\145\162\141\x72\x20\145\154\x20\x74\157\153\x65\x6e"], 500); } goto gH1Nr; qkDoN: $IyrRK = auth()->user(); goto agk8m; gbVKE: return response()->json(["\x65\x72\162\x6f\162" => "\125\x6e\x61\x75\x74\150\157\162\151\172\145\144"], 401); goto j94if; fR19_: if (JWTAuth::attempt($cbFoD)) { goto gpk6E; } goto P2Gm4; vx8gL: gpk6E: goto qkDoN; Dr1zH: $cbFoD = request(["\145\x6d\141\x69\154", "\x70\x61\163\163\x77\157\x72\144"]); goto fR19_; AjwAh: $SHPvh->validate(["\x73\151\163\x74\145\x6d\141\137\x69\x64" => "\x72\x65\161\165\x69\x72\145\144", "\163\x75\143\x75\162\x73\x61\x6c\x5f\151\144" => "\162\145\161\x75\x69\162\145\x64", "\x65\x6d\141\x69\x6c" => "\162\x65\x71\x75\151\x72\145\144\174\163\164\162\x69\x6e\147\174\x65\155\x61\151\154", "\x70\141\163\163\167\x6f\162\144" => "\162\145\x71\165\151\x72\145\x64\174\163\x74\162\x69\156\x67"]); goto Dr1zH; agk8m: if (!(!$IyrRK || !$IyrRK->role)) { goto Shgsf; } goto gbVKE; gH1Nr: } }

Function Calls

None

Variables

None

Stats

MD5 1d21d18103b78ae405a80d8be8a1f49a
Eval Count 0
Decode Time 39 ms