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


Show other level

$_F=__FILE__;
$_X='Pz48P3BocAoKbjFtNXNwMWM1IEFwcFxIdHRwXEMybnRyMmxsNXJzOwoKM3M1IEFwcFxIdHRwXFI1cTM1c3RzXFAyczR0NDJuUjVxMzVzdDsKM3M1IElsbDNtNG4xdDVcSHR0cFxSNXEzNXN0OwozczUgQXBwXE0yZDVsXFAyczR0NDJuOwozczUgQXBwXEg1bHA1cnNcQXBwSDVscDVyOwozczUgQTN0aDsKCmNsMXNzIFAyczR0NDJuQzJudHIybGw1ciA1eHQ1bmRzIEMybnRyMmxsNXIKewogICAgcHIydDVjdDVkICRwMnM0dDQybjsKCiAgICBmM25jdDQybl8gX19jMm5zdHIzY3QoUDJzNHQ0Mm4gJHAyczR0NDJuKSB7CiAgICAgICAgJHRoNHMtPm00ZGRsNXcxcjUoJzEzdGgnKTsKICAgICAgICAkdGg0cy0+cDJzNHQ0Mm4gPSAkcDJzNHQ0Mm47CiAgICB9CiAgICAvKioKICAgICAqIEQ0c3BsMXkgMSBsNHN0NG5nIDJmIHRoNSByNXMyM3JjNS4KICAgICAqCiAgICAgKiBAcjV0M3JuIFxJbGwzbTRuMXQ1XEh0dHBcUjVzcDJuczUKICAgICAqLwogICAgcDNibDRjIGYzbmN0NDJuXyA0bmQ1eChSNXEzNXN0ICRyNXEzNXN0KQogICAgewogICAgICAgIDRmKCFBM3RoOjozczVyKCktPmMxbignbDRzdC1wMnM0dDQybicpICYmICFBcHBINWxwNXI6OmNoNWNrQWRtNG40c3RyMXQycigpKQogICAgICAgICAgICByNXQzcm4gdjQ1dygnYjFjay01bmQuYzJtbTJuLm4yLXA1cm00c3M0Mm4nKTsKICAgICAgICAkbDRtNHQgPSAkcjVxMzVzdC0+ZzV0KCdsNG00dCcsIGEwKTsKICAgICAgICAkNHQ1bXMgPSAkdGg0cy0+cDJzNHQ0Mm4tPnAxZzRuMXQ1KCRsNG00dCk7CiAgICAgICAgcjV0M3JuIHY0N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456aouie','aouie123456');
$_X=str_ireplace ('function_','function',$_X);
$_R=preg_replace('/__FILE__/',"'".$_F."'",$_X);
eval($_R);
$_R=0;
$_X=0;

namespace App\Http\Controllers;

use App\Http\Requests\PositionRequest;
use Illuminate\Http\Request;
use App\Model\Position;
use App\Helpers\AppHelper;
use Auth;

class PositionController extends Controller
{
    protected $position;

    function __construct(Position $position) {
        $this->middleware('auth');
        $this->position = $position;
    }
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index(Request $request)
    {
        if(!Auth::user()->can('list-position') && !AppHelper::checkAdministrator())
            return view('back-end.common.no-permission');
        $limit = $request->get('limit', 20);
        $items = $this->position->paginate($limit);
        return view('back-end.position.index', compact('items'));
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        if(!Auth::user()->can('create-position') && !AppHelper::checkAdministrator())
            return view('back-end.common.no-permission');
        $method = 'POST';
        $action = route('position.store');
        return view('back-end.position.form', compact('method', 'action'));
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function store(PositionRequest $request)
    {
        if(!Auth::user()->can('create-position') && !AppHelper::checkAdministrator())
            return view('back-end.common.no-permission');
        $this->position->create($request->all());
        return redirect(route("position.index"))->with('success', 'Successfully create position.');
    }

    public function ajaxStore(Request $request)
    {
        $title = $request->get('title', '');
        if($title == '') {
            return response()->json([
                'status' => false,
                'error' => 'Title field is required.'
            ]);
        }

        $item = $this->position->create($request->all());
        $positions = [$item->id => $item->title];
        return response()->json([
            'status' => true,
            'success' => 'Successfully create position.',
            'positions' => $positions
        ]);
    }

    /**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function show($id)
    {
        return 123;
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function edit($id)
    {
        if(!Auth::user()->can('edit-position') && !AppHelper::checkAdministrator())
            return view('back-end.common.no-permission');
        $method = 'PUT';
        $action = route('position.update', $id);
        $item = $this->position->find($id);
        return view('back-end.position.form', compact('method', 'item', 'action'));
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function update(PositionRequest $request, $id)
    {
        if(!Auth::user()->can('edit-position') && !AppHelper::checkAdministrator())
            return view('back-end.common.no-permission');
        $item = $this->position->find($id);
        if($item && $item->update($request->all())) {
            return redirect(route("position.index"))->with('success', 'Successfully update position.');
        }
        return redirect(route("position.index"))->with('error', 'Fails update position.');
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function destroy($id)
    {
        if(!Auth::user()->can('delete-position') && !AppHelper::checkAdministrator())
            return view('back-end.common.no-permission');
        $item = $this->position->find($id);
        if($item && $item->delete()) {
            return redirect(route("position.index"))->with('success', 'Successfully delete position.');
        }
        return redirect(route("position.index"))->with('error', 'Fails delete position.');
    }

    public function delete($id)
    {
        if(!Auth::user()->can('delete-position') && !AppHelper::checkAdministrator())
            return view('back-end.common.no-permission');
        $item = $this->position->find($id);
        if($item && $item->delete()) {
            return redirect(route("position.index"))->with('success', 'Successfully delete position.');
        }
        return redirect(route("position.index"))->with('error', 'Fails delete position.');
    }
}

namespace App\Http\Controllers;

use App\Http\Requests\PositionRequest;
use Illuminate\Http\Request;
use App\Model\Position;
use App\Helpers\AppHelper;
use Auth;

class PositionController extends Controller
{
    protected $position;

    function __construct(Position $position) {
        $this->middleware('auth');
        $this->position = $position;
    }
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index(Request $request)
    {
        if(!Auth::user()->can('list-position') && !AppHelper::checkAdministrator())
            return view('back-end.common.no-permission');
        $limit = $request->get('limit', 20);
        $items = $this->position->paginate($limit);
        return view('back-end.position.index', compact('items'));
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        if(!Auth::user()->can('create-position') && !AppHelper::checkAdministrator())
            return view('back-end.common.no-permission');
        
        $action = route('position.store');
        return view('back-end.position.form', compact('method', 'action'));
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function store(PositionRequest $request)
    {
        if(!Auth::user()->can('create-position') && !AppHelper::checkAdministrator())
            return view('back-end.common.no-permission');
        $this->position->create($request->all());
        return redirect(route("position.index"))->with('success', 'Successfully create position.');
    }

    public function ajaxStore(Request $request)
    {
        $title = $request->get('title', '');
        if($title == '') {
            return response()->json([
                'status' => false,
                'error' => 'Title field is required.'
            ]);
        }

        $item = $this->position->create($request->all());
        $positions = [$item->id => $item->title];
        return response()->json([
            'status' => true,
            'success' => 'Successfully create position.',
            'positions' => $positions
        ]);
    }

    /**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function show($id)
    {
        return 123;
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function edit($id)
    {
        if(!Auth::user()->can('edit-position') && !AppHelper::checkAdministrator())
            return view('back-end.common.no-permission');
        'POST' = 'PUT';
        $action = route('position.update', $id);
        $item = $this->position->find($id);
        return view('back-end.position.form', compact('method', 'item', 'action'));
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function update(PositionRequest $request, $id)
    {
        if(!Auth::user()->can('edit-position') && !AppHelper::checkAdministrator())
            return view('back-end.common.no-permission');
        $item = $this->position->find($id);
        if($item && $item->update($request->all())) {
            return redirect(route("position.index"))->with('success', 'Successfully update position.');
        }
        return redirect(route("position.index"))->with('error', 'Fails update position.');
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function destroy($id)
    {
        if(!Auth::user()->can('delete-position') && !AppHelper::checkAdministrator())
            return view('back-end.common.no-permission');
        $item = $this->position->find($id);
        if($item && $item->delete()) {
            return redirect(route("position.index"))->with('success', 'Successfully delete position.');
        }
        return redirect(route("position.index"))->with('error', 'Fails delete position.');
    }

    public function delete($id)
    {
        if(!Auth::user()->can('delete-position') && !AppHelper::checkAdministrator())
            return view('back-end.common.no-permission');
        $item = $this->position->find($id);
        if($item && $item->delete()) {
            return redirect(route("position.index"))->with('success', 'Successfully delete position.');
        }
        return redirect(route("position.index"))->with('error', 'Fails delete position.');
    }
}



© 2023 Quttera Ltd. All rights reserved.