Linux ubuntu22 5.15.0-133-generic #144-Ubuntu SMP Fri Feb 7 20:47:38 UTC 2025 x86_64
nginx/1.18.0
: 128.199.27.159 | : 216.73.216.1
Cant Read [ /etc/named.conf ]
8.1.31
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
sms-auth /
app /
Http /
Middleware /
[ HOME SHELL ]
Name
Size
Permission
Action
Authenticate.php
900
B
-rw-rw-r--
CorsMiddleware.php
3.47
KB
-rwxrwxr-x
ExampleMiddleware.php
337
B
-rw-rw-r--
LocalizationMiddleware.php
3.6
KB
-rwxrwxr-x
Permission.php
753
B
-rw-rw-r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : CorsMiddleware.php
<?php namespace App\Http\Middleware; use Closure; use Illuminate\Http\Response; class CorsMiddleware { protected $settings = array( 'origin' => '*', 'allowMethods' => 'POST, GET, OPTIONS, PUT, DELETE', ); protected function setOrigin($req, $rsp) { $origin = $this->settings['origin']; if (is_callable($origin)) { // Call origin callback with request origin $origin = call_user_func( $origin, $req->header("Origin") ); } $rsp->header('Access-Control-Allow-Origin', $origin); header("X-XSS-Protection: 1; mode=block"); header('Vary: User-Agent'); } protected function setExposeHeaders($req, $rsp) { if (isset($this->settings['exposeHeaders'])) { $exposeHeaders = $this->settings['exposeHeaders']; if (is_array($exposeHeaders)) { $exposeHeaders = implode(", ", $exposeHeaders); } $rsp->header('Access-Control-Expose-Headers', $exposeHeaders); } } protected function setMaxAge($req, $rsp) { if (isset($this->settings['maxAge'])) { $rsp->header('Access-Control-Max-Age', $this->settings['maxAge']); } } protected function setAllowCredentials($req, $rsp) { if (isset($this->settings['allowCredentials']) && $this->settings['allowCredentials'] === true) { $rsp->header('Access-Control-Allow-Credentials', 'true'); } } protected function setAllowMethods($req, $rsp) { if (isset($this->settings['allowMethods'])) { $allowMethods = $this->settings['allowMethods']; if (is_array($allowMethods)) { $allowMethods = implode(", ", $allowMethods); } $rsp->header('Access-Control-Allow-Methods', $allowMethods); } } protected function setAllowHeaders($req, $rsp) { if (isset($this->settings['allowHeaders'])) { $allowHeaders = $this->settings['allowHeaders']; if (is_array($allowHeaders)) { $allowHeaders = implode(", ", $allowHeaders); } } else { // Otherwise, use request headers $allowHeaders = $req->header("Access-Control-Request-Headers"); } if (isset($allowHeaders)) { $rsp->header('Access-Control-Allow-Headers', $allowHeaders); } } protected function setCorsHeaders($req, $rsp) { // http://www.html5rocks.com/static/images/cors_server_flowchart.png // Pre-flight if ($req->isMethod('OPTIONS')) { $this->setOrigin($req, $rsp); $this->setMaxAge($req, $rsp); $this->setAllowCredentials($req, $rsp); $this->setAllowMethods($req, $rsp); $this->setAllowHeaders($req, $rsp); } else { $this->setOrigin($req, $rsp); $this->setExposeHeaders($req, $rsp); $this->setAllowCredentials($req, $rsp); } } /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { if ($request->isMethod('OPTIONS')) { $response = new Response("", 200); } else { $response = $next($request); } $this->setCorsHeaders($request, $response); return $response; } }
Close