Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


namespace App\Http\Controllers; use App\Helpers\Helper;
 use Illuminate\Http\Request; use App\Models\DocumentaryGroups as Model;
 class DocumentaryGroupController extends Controller { public function index() { $credentials = Helper::getAuthAvatar();
 $data = array("user" => $credentials, "permissions" => Helper::getObfuscateAreas($credentials), "categories" => Helper::getObfuscateCategories($credentials), "documentary_groups" => Model::orderBy("position", "ASC")->where("state", "Activo")->get(array("id", "documentary_group")), "primary_groups" => Model::orderBy("documentary_group", "ASC")->where("primary", "Si")->where("state", "Activo")->get(array("id", "documentary_group"))); return view("modules.documentary-group.index")->with($data); } public function store(Request $request) { $request->validate(array("documentary_group" => "required|regex:/^[ ,-.\/0-9A-Z_a-zÁÉÍÑÓÚáéíñóú]+$/|maxҭ", "primary" => "required|regex:/^[NSio]+$/|max", "documentary_group_id.*" => "nullable|regex:/^[0-9]+$/|max:5", "metadata.*" => "required|regex:/^[ ,()-.\/0-9A-Z_a-zÁÉÍÑÓÚáéíñóú]+$/|max:255", "required.*" => "required|regex:/^[NSio]+$/|max:255", "type.*" => "required|regex:/^[abcdefhilmnorstux]+$/|max:5", "details.*" => "nullable|regex:/^[ ,-.\x-9A-Za-zÁÉÍÑÓÚáéíñóú]+$/|maxҭ")); $this->registerData($request); return redirect("/documentary-group")->with("success", "Grupo Documental Registrado Exitosamente"); } public function show($id) { $documentary_group = Model::where("id", $id)->get(array("id", "documentary_group", "metadatas", "files", "position", "primary", "groups_ids", "state"))->first(); $data = array("ok" => true, "data" => $documentary_group); return json_decode(json_encode($data)); } public function update(Request $request, $id) { $request->validate(array("documentary_group" => "required|regex:/^[ ,-.\/0-9A-Z_a-zÁÉÍÑÓÚáéíñóú]+$/|max55", "metadata.*" => "required|regex:/^[ ,()-.\/0-9A-Z_a-zÁÉÍÑÓÚáéíñóú]+$/|max:2", "required.*" => "required|regex:/^[NSio]+$/|max:255", "type.*" => "required|regex:/^[abcdefhilmnorstux]+$/|max:2", "details.*" => "nullable|regex:/^[ ,-.\/0-9A-Za-zÁÉÍÑÓÚáéíñóú]+$/|max:5", "position" => "required|regex:/^[0-9]+$/|max:")); $metadatas = array(); $files = array(); for ($i = 0; $i < count($request->get("metadata")); ++$i) { $aux = array("metadata" => $request->get("metadata")[$i], "required" => $request->get("required")[$i], "type" => $request->get("type")[$i], "details" => is_null($request->get("details")[$i]) ? '' : $request->get("details")[$i]); if ($request->get("type")[$i] == "file") { $files[] = $aux; } else { $metadatas[] = $aux; } } $data = Model::find($id); $data->documentary_group = $request->get("documentary_group"); $data->metadatas = json_encode($metadatas); $data->files = json_encode($files); $data->primary = $request->get("primary"); $data->user_id = Helper::getAuth()->id; $data->save(); return redirect("/documentary-group")->with("success", "Grupo Documental Actualizado Exitosamente"); } public function destroy($id) { $data = Model::find($id); $data->state = "Inactivo"; $data->save(); return redirect("/documentary-group")->with("success", "Grupo Documental Eliminado Exitosamente"); } public function getData($page, $idea) { $result_per_page = config("global.RESULT_PER_PAGE"); $page = ($page - 1) * $result_per_page; $idea = trim($idea); if ($idea == "-") { $idea = ''; } $idea = "%{$idea}%"; $response = Model::where("documentary_group", "like", $idea)->where("state", "Activo")->orderBy("position", "ASC")->offset($page)->limit($result_per_page)->get(array("id", "documentary_group", "primary", "state")); $results = Model::where("documentary_group", "like", $idea)->where("state", "Activo")->orderBy("position", "ASC")->get(array("id"))->count(); $results = Helper::calculatePages($results, $result_per_page); $data = array("data" => $response, "pages" => $results); return json_decode(json_encode($data)); } public function registerData(Request $request, $id = false) { $metadatas = array(); $files = array(); for ($i = 0; $i < count($request->get("metadata")); ++$i) { $aux = array("metadata" => $request->get("metadata")[$i], "required" => $request->get("required")[$i], "type" => $request->get("type")[$i], "details" => is_null($request->get("details")[$i]) ? '' : $request->get("details")[$i]); if ($request->get("type")[$i] == "file") { $files[] = $aux; } else { $metadatas[] = $aux; } } $data = new Model(); $data->documentary_group = $request->get("documentary_group"); $data->metadatas = json_encode($metadatas); $data->files = json_encode($files); $data->primary = $request->get("primary"); if ($id) { $data->previous = $id; } if (!is_null($request->get("position"))) { $data->position = $request->get("position"); } $data->user_id = Helper::getAuth()->id; $data->save(); $id_documentary_group = $data->id; } public function orderupdate(Request $request) { $datos = explode(",", base64_decode($request->get("datos"))); for ($i = 0; $i < count($datos); ++$i) { $data = Model::where("documentary_group", utf8_encode(trim($datos[$i])))->where("state", "Activo")->first(); $data->position = $i + 1; $data->save(); } $resp = array("title" => "Exitoso", "text" => "Posiciones Actualizadas Exitosamente", "icon" => "success"); return response()->json($resp, 200); } }



© 2023 Quttera Ltd. All rights reserved.