wpxf 2.0.0a
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/wpxf +52 -0
- data/data/banners/default.txt +16 -0
- data/data/js/ajax_download.js +33 -0
- data/data/js/ajax_post.js +18 -0
- data/data/js/create_wp_user.js +24 -0
- data/data/js/post.js +20 -0
- data/data/json/browser_usage_by_frequency.json +64 -0
- data/data/json/commands.json +116 -0
- data/data/php/bind_php.php +43 -0
- data/data/php/download_exec.php +36 -0
- data/data/php/exec.php +3 -0
- data/data/php/exec_methods.php +47 -0
- data/data/php/meterpreter_bind_tcp.php +1 -0
- data/data/php/meterpreter_bind_tcp_ipv6.php +1 -0
- data/data/php/meterpreter_reverse_tcp.php +1 -0
- data/data/php/preamble.php +17 -0
- data/data/php/reverse_tcp.php +76 -0
- data/db/config.yml +17 -0
- data/db/env.rb +19 -0
- data/db/migrations/001_create_workspaces.rb +15 -0
- data/db/migrations/002_create_credentials.rb +20 -0
- data/db/migrations/003_add_credential_type.rb +13 -0
- data/db/migrations/004_add_unique_workspace_name_index.rb +19 -0
- data/db/migrations/005_add_logs.rb +16 -0
- data/db/migrations/006_create_modules.rb +18 -0
- data/db/migrations/007_create_loot_items.rb +21 -0
- data/lib/wpxf.rb +54 -0
- data/lib/wpxf/cli/auto_complete.rb +121 -0
- data/lib/wpxf/cli/banner.rb +47 -0
- data/lib/wpxf/cli/console.rb +146 -0
- data/lib/wpxf/cli/context.rb +35 -0
- data/lib/wpxf/cli/creds.rb +56 -0
- data/lib/wpxf/cli/help.rb +125 -0
- data/lib/wpxf/cli/loaded_module.rb +67 -0
- data/lib/wpxf/cli/loot.rb +81 -0
- data/lib/wpxf/cli/module_cache.rb +59 -0
- data/lib/wpxf/cli/module_info.rb +62 -0
- data/lib/wpxf/cli/modules.rb +94 -0
- data/lib/wpxf/cli/options.rb +105 -0
- data/lib/wpxf/cli/output.rb +110 -0
- data/lib/wpxf/cli/workspace.rb +80 -0
- data/lib/wpxf/core.rb +18 -0
- data/lib/wpxf/core/data_file.rb +27 -0
- data/lib/wpxf/core/event_emitter.rb +30 -0
- data/lib/wpxf/core/module.rb +140 -0
- data/lib/wpxf/core/module_authentication.rb +48 -0
- data/lib/wpxf/core/module_info.rb +74 -0
- data/lib/wpxf/core/options.rb +175 -0
- data/lib/wpxf/core/opts/boolean_option.rb +37 -0
- data/lib/wpxf/core/opts/enum_option.rb +15 -0
- data/lib/wpxf/core/opts/integer_option.rb +74 -0
- data/lib/wpxf/core/opts/option.rb +121 -0
- data/lib/wpxf/core/opts/path_option.rb +15 -0
- data/lib/wpxf/core/opts/port_option.rb +25 -0
- data/lib/wpxf/core/opts/string_option.rb +33 -0
- data/lib/wpxf/core/output_emitters.rb +67 -0
- data/lib/wpxf/core/payload.rb +135 -0
- data/lib/wpxf/db.rb +17 -0
- data/lib/wpxf/db/credentials.rb +37 -0
- data/lib/wpxf/db/loot.rb +19 -0
- data/lib/wpxf/helpers/export.rb +48 -0
- data/lib/wpxf/models/credential.rb +29 -0
- data/lib/wpxf/models/log.rb +22 -0
- data/lib/wpxf/models/loot_item.rb +37 -0
- data/lib/wpxf/models/module.rb +32 -0
- data/lib/wpxf/models/workspace.rb +28 -0
- data/lib/wpxf/modules.rb +62 -0
- data/lib/wpxf/modules/auxiliary/dos/load_scripts_dos.rb +129 -0
- data/lib/wpxf/modules/auxiliary/dos/long_password_dos.rb +141 -0
- data/lib/wpxf/modules/auxiliary/dos/post_grid_file_deletion.rb +67 -0
- data/lib/wpxf/modules/auxiliary/dos/wp_v4.7.2_csrf_dos.rb +83 -0
- data/lib/wpxf/modules/auxiliary/file_download/ad_widget_php_file_download.rb +54 -0
- data/lib/wpxf/modules/auxiliary/file_download/all_in_one_migration_export.rb +68 -0
- data/lib/wpxf/modules/auxiliary/file_download/antioch_arbitrary_file_download.rb +41 -0
- data/lib/wpxf/modules/auxiliary/file_download/candidate_application_form_arbitrary_file_download.rb +41 -0
- data/lib/wpxf/modules/auxiliary/file_download/cp_image_store_arbitrary_file_download.rb +82 -0
- data/lib/wpxf/modules/auxiliary/file_download/direct_download_for_woocommerce_file_download.rb +60 -0
- data/lib/wpxf/modules/auxiliary/file_download/duplicator_csrf_db_export.rb +169 -0
- data/lib/wpxf/modules/auxiliary/file_download/ghost_unrestricted_export_download.rb +85 -0
- data/lib/wpxf/modules/auxiliary/file_download/history_collection_arbitrary_file_download.rb +50 -0
- data/lib/wpxf/modules/auxiliary/file_download/imdb_profile_widget_arbitrary_file_download.rb +42 -0
- data/lib/wpxf/modules/auxiliary/file_download/mail_masta_unauthenticated_local_file_inclusion.rb +48 -0
- data/lib/wpxf/modules/auxiliary/file_download/membership_simplified_arbitrary_file_download.rb +50 -0
- data/lib/wpxf/modules/auxiliary/file_download/memphis_documents_library_arbitrary_file_download.rb +41 -0
- data/lib/wpxf/modules/auxiliary/file_download/recent_backups_arbitrary_file_download.rb +42 -0
- data/lib/wpxf/modules/auxiliary/file_download/simple_download_monitor_file_disclosure.rb +79 -0
- data/lib/wpxf/modules/auxiliary/file_download/simple_download_monitor_file_download.rb +69 -0
- data/lib/wpxf/modules/auxiliary/file_download/simple_image_manipulator_arbitrary_file_download.rb +43 -0
- data/lib/wpxf/modules/auxiliary/file_download/site_editor_file_download.rb +53 -0
- data/lib/wpxf/modules/auxiliary/file_download/wp_background_takeover_file_download.rb +42 -0
- data/lib/wpxf/modules/auxiliary/file_download/wp_hide_security_enhancer_file_download.rb +51 -0
- data/lib/wpxf/modules/auxiliary/file_download/wp_marketplace_v2.4_file_download.rb +141 -0
- data/lib/wpxf/modules/auxiliary/file_download/wp_vault_file_download.rb +46 -0
- data/lib/wpxf/modules/auxiliary/file_download/wptf_image_gallery_arbitrary_file_download.rb +43 -0
- data/lib/wpxf/modules/auxiliary/hash_dump/events_hash_dump.rb +59 -0
- data/lib/wpxf/modules/auxiliary/hash_dump/gallery_album_hash_dump.rb +61 -0
- data/lib/wpxf/modules/auxiliary/hash_dump/jtrt_responsive_tables_hash_dump.rb +69 -0
- data/lib/wpxf/modules/auxiliary/hash_dump/registrationmagic_hash_dump.rb +62 -0
- data/lib/wpxf/modules/auxiliary/hash_dump/simple_ads_manager_hash_dump.rb +67 -0
- data/lib/wpxf/modules/auxiliary/hash_dump/simple_events_calendar_hash_dump.rb +69 -0
- data/lib/wpxf/modules/auxiliary/hash_dump/sql_shortcode_hash_dump.rb +59 -0
- data/lib/wpxf/modules/auxiliary/hash_dump/ultimate_csv_importer_user_extract.rb +133 -0
- data/lib/wpxf/modules/auxiliary/hash_dump/ultimate_product_catalogue_hash_dump.rb +60 -0
- data/lib/wpxf/modules/auxiliary/info/download_manager_directory_listing_disclosure.rb +106 -0
- data/lib/wpxf/modules/auxiliary/info/download_monitor_log_export.rb +111 -0
- data/lib/wpxf/modules/auxiliary/info/email_subscribers_user_list_disclosure.rb +103 -0
- data/lib/wpxf/modules/auxiliary/info/file_manager_database_credentials.rb +86 -0
- data/lib/wpxf/modules/auxiliary/info/user_meta_manager_information_disclosure.rb +96 -0
- data/lib/wpxf/modules/auxiliary/info/woocommerce_email_test_order_disclosure.rb +53 -0
- data/lib/wpxf/modules/auxiliary/info/woocommerce_order_import_export_order_disclosure.rb +60 -0
- data/lib/wpxf/modules/auxiliary/info/wp_v4.7_user_info_disclosure.rb +86 -0
- data/lib/wpxf/modules/auxiliary/misc/email_users_csrf_bulk_mail.rb +89 -0
- data/lib/wpxf/modules/auxiliary/misc/qards_local_port_scan.rb +66 -0
- data/lib/wpxf/modules/auxiliary/misc/simple_ads_manager_sql_injection.rb +124 -0
- data/lib/wpxf/modules/auxiliary/misc/wp_v4.7.1_content_injection.rb +107 -0
- data/lib/wpxf/modules/auxiliary/priv_esc/custom_contact_forms_privilege_escalation.rb +125 -0
- data/lib/wpxf/modules/auxiliary/priv_esc/download_manager_authenticated_privilege_escalation.rb +71 -0
- data/lib/wpxf/modules/auxiliary/priv_esc/download_manager_privilege_escalation.rb +92 -0
- data/lib/wpxf/modules/auxiliary/priv_esc/easy_cart_privilege_escalation.rb +92 -0
- data/lib/wpxf/modules/auxiliary/priv_esc/platform_privilege_escalation.rb +93 -0
- data/lib/wpxf/modules/auxiliary/priv_esc/super_socializer_auth_bypass.rb +154 -0
- data/lib/wpxf/modules/auxiliary/priv_esc/user_meta_manager_privilege_escalation.rb +76 -0
- data/lib/wpxf/modules/auxiliary/priv_esc/user_role_editor_privilege_escalation.rb +57 -0
- data/lib/wpxf/modules/auxiliary/priv_esc/wp_front_end_profile_privilege_escalation.rb +92 -0
- data/lib/wpxf/modules/auxiliary/priv_esc/wplms_privilege_escalation.rb +117 -0
- data/lib/wpxf/modules/exploit/rfi/advanced_custom_fields_remote_file_inclusion.rb +98 -0
- data/lib/wpxf/modules/exploit/rfi/fast_image_adder_v1.1_rfi_shell_upload.rb +91 -0
- data/lib/wpxf/modules/exploit/rfi/flickr_picture_backup_rfi_shell_upload.rb +94 -0
- data/lib/wpxf/modules/exploit/rfi/gwolle_guestbook_remote_file_inclusion.rb +96 -0
- data/lib/wpxf/modules/exploit/rfi/wp_mobile_detector_rfi_shell_upload.rb +90 -0
- data/lib/wpxf/modules/exploit/shell/accesspress_anonymous_post_pro_shell_upload.rb +71 -0
- data/lib/wpxf/modules/exploit/shell/acf_frontend_display_shell_upload.rb +41 -0
- data/lib/wpxf/modules/exploit/shell/adblock_blocker_shell_upload.rb +41 -0
- data/lib/wpxf/modules/exploit/shell/admin_shell_upload.rb +47 -0
- data/lib/wpxf/modules/exploit/shell/aries_revslider_shell_upload.rb +17 -0
- data/lib/wpxf/modules/exploit/shell/avada_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/awake_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/beach_apollo_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/bretheon_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/centum_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/charity_theme_shell_upload.rb +38 -0
- data/lib/wpxf/modules/exploit/shell/construct_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/creative_contact_form_shell_upload.rb +82 -0
- data/lib/wpxf/modules/exploit/shell/delete_all_comments_shell_upload.rb +65 -0
- data/lib/wpxf/modules/exploit/shell/designfolio_plus_shell_upload.rb +50 -0
- data/lib/wpxf/modules/exploit/shell/divi_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/easy_cart_shell_upload.rb +174 -0
- data/lib/wpxf/modules/exploit/shell/echelon_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/elegance_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/estatik_v2.2.5_shell_upload.rb +53 -0
- data/lib/wpxf/modules/exploit/shell/evo_theme_shell_upload.rb +37 -0
- data/lib/wpxf/modules/exploit/shell/front_end_file_upload_and_manager_shell_upload.rb +42 -0
- data/lib/wpxf/modules/exploit/shell/fusion_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/gallery_pro_theme_shell_upload.rb +37 -0
- data/lib/wpxf/modules/exploit/shell/gravity_forms_v1.8.19_shell_upload.rb +92 -0
- data/lib/wpxf/modules/exploit/shell/holding_pattern_shell_upload.rb +56 -0
- data/lib/wpxf/modules/exploit/shell/inboundio_marketing_shell_upload.rb +82 -0
- data/lib/wpxf/modules/exploit/shell/incredible_wp_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/infusionsoft_shell_upload.rb +76 -0
- data/lib/wpxf/modules/exploit/shell/mailcwp_authenticated_shell_upload.rb +35 -0
- data/lib/wpxf/modules/exploit/shell/mailcwp_unauthenticated_shell_upload.rb +51 -0
- data/lib/wpxf/modules/exploit/shell/mailpoet_newsletters_shell_upload.rb +90 -0
- data/lib/wpxf/modules/exploit/shell/manbiz2_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/medicate_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/method_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/micro_theme_shell_upload.rb +37 -0
- data/lib/wpxf/modules/exploit/shell/mobile_app_builder_shell_upload.rb +31 -0
- data/lib/wpxf/modules/exploit/shell/mobile_app_native_v3_shell_upload.rb +46 -0
- data/lib/wpxf/modules/exploit/shell/mobile_friendly_app_builder_shell_upload.rb +29 -0
- data/lib/wpxf/modules/exploit/shell/modular_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/myriad_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/n_media_website_contact_form_shell_upload.rb +82 -0
- data/lib/wpxf/modules/exploit/shell/n_media_website_contact_form_v1.9_shell_upload.rb +45 -0
- data/lib/wpxf/modules/exploit/shell/neosense_shell_upload.rb +41 -0
- data/lib/wpxf/modules/exploit/shell/ninja_forms_unauthenticated_shell_upload.rb +83 -0
- data/lib/wpxf/modules/exploit/shell/participants_database_v1.5.4.8_shell_upload.rb +153 -0
- data/lib/wpxf/modules/exploit/shell/persuasion_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/photo_album_plus_xss_shell_upload.rb +89 -0
- data/lib/wpxf/modules/exploit/shell/photo_gallery_shell_upload.rb +128 -0
- data/lib/wpxf/modules/exploit/shell/premium_seo_pack_shell_upload.rb +35 -0
- data/lib/wpxf/modules/exploit/shell/reflex_gallery_shell_upload.rb +91 -0
- data/lib/wpxf/modules/exploit/shell/revslider_shell_upload.rb +93 -0
- data/lib/wpxf/modules/exploit/shell/seabird_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/showbiz_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/simplecart_shell_upload.rb +91 -0
- data/lib/wpxf/modules/exploit/shell/soulmedic_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/striking_r_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/super_socializer_shell_upload.rb +110 -0
- data/lib/wpxf/modules/exploit/shell/symposium_shell_upload.rb +85 -0
- data/lib/wpxf/modules/exploit/shell/tevolution_shell_upload.rb +50 -0
- data/lib/wpxf/modules/exploit/shell/ultimate_member_shell_upload.rb +132 -0
- data/lib/wpxf/modules/exploit/shell/ultimate_product_catalogue_shell_upload.rb +47 -0
- data/lib/wpxf/modules/exploit/shell/ultimatum_revslider_shell_upload.rb +15 -0
- data/lib/wpxf/modules/exploit/shell/userpro_shell_upload.rb +70 -0
- data/lib/wpxf/modules/exploit/shell/webapp_builder_shell_upload.rb +29 -0
- data/lib/wpxf/modules/exploit/shell/windows_desktop_and_iphone_photo_uploader_shell_upload.rb +45 -0
- data/lib/wpxf/modules/exploit/shell/woocommerce_amazon_affiliates_v8_shell_upload.rb +81 -0
- data/lib/wpxf/modules/exploit/shell/woocommerce_product_addons_shell_upload.rb +42 -0
- data/lib/wpxf/modules/exploit/shell/work_the_flow_shell_upload.rb +57 -0
- data/lib/wpxf/modules/exploit/shell/wp2android_shell_upload.rb +29 -0
- data/lib/wpxf/modules/exploit/shell/wp_front_end_repository_manager_shell_upload.rb +42 -0
- data/lib/wpxf/modules/exploit/shell/wp_marketplace_shell_upload.rb +40 -0
- data/lib/wpxf/modules/exploit/shell/wp_support_plus_responsive_ticket_system_shell_upload.rb +46 -0
- data/lib/wpxf/modules/exploit/shell/wpshop_shell_upload.rb +45 -0
- data/lib/wpxf/modules/exploit/shell/wptouch_authenticated_shell_upload.rb +66 -0
- data/lib/wpxf/modules/exploit/shell/wsecure_lite_shell_upload.rb +57 -0
- data/lib/wpxf/modules/exploit/xss/reflected/2kb_amazon_affiliates_store_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/admin_custom_login_reflected_xss_shell_upload.rb +42 -0
- data/lib/wpxf/modules/exploit/xss/reflected/adsense_plugin_reflected_xss_shell_upload.rb +21 -0
- data/lib/wpxf/modules/exploit/xss/reflected/affiliate_ads_builder_xss_shell_upload.rb +53 -0
- data/lib/wpxf/modules/exploit/xss/reflected/affiliatewp_reflected_xss_shell_upload.rb +39 -0
- data/lib/wpxf/modules/exploit/xss/reflected/ajax_random_post_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/all_in_one_migration_reflected_xss_shell_upload.rb +33 -0
- data/lib/wpxf/modules/exploit/xss/reflected/all_in_one_schema_rich_snippets_reflected_xss_shell_upload.rb +39 -0
- data/lib/wpxf/modules/exploit/xss/reflected/all_in_one_wp_security_reflected_xss_shell_upload.rb +37 -0
- data/lib/wpxf/modules/exploit/xss/reflected/alpine_photo_tile_for_instagram_reflected_xss_shell_upload.rb +40 -0
- data/lib/wpxf/modules/exploit/xss/reflected/answer_my_question_reflected_xss_shell_upload.rb +41 -0
- data/lib/wpxf/modules/exploit/xss/reflected/anti_plagiarism_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/anyvar_reflected_xss_shell_upload.rb +40 -0
- data/lib/wpxf/modules/exploit/xss/reflected/atahualpa_reflected_xss_shell_upload.rb +66 -0
- data/lib/wpxf/modules/exploit/xss/reflected/backup_guard_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/brafton_content_importer_reflected_xss_shell_upload.rb +35 -0
- data/lib/wpxf/modules/exploit/xss/reflected/bws_featured_posts_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/bws_google_analytics_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/bws_google_maps_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/bws_latest_posts_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/bws_linkedin_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/bws_panel_reflected_xss_shell_upload.rb +45 -0
- data/lib/wpxf/modules/exploit/xss/reflected/bws_pinterest_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/bws_popular_posts_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/bws_portfolio_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/bws_smtp_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/bws_testimonials_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/caldera_forms_v1.5.4_xss_shell_upload.rb +33 -0
- data/lib/wpxf/modules/exploit/xss/reflected/captcha_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/car_rental_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/check_email_reflected_xss_shell_upload.rb +44 -0
- data/lib/wpxf/modules/exploit/xss/reflected/claptastic_clap_button_reflected_xss_shell_upload.rb +46 -0
- data/lib/wpxf/modules/exploit/xss/reflected/code_snippets_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/colorway_reflected_xss_shell_upload.rb +47 -0
- data/lib/wpxf/modules/exploit/xss/reflected/concours_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/connections_reflected_xss_shell_upload.rb +35 -0
- data/lib/wpxf/modules/exploit/xss/reflected/contact_form_multi_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/contact_form_plugin_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/contact_form_to_db_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/content_grabber_reflected_xss_shell_upload.rb +43 -0
- data/lib/wpxf/modules/exploit/xss/reflected/content_slide_reflected_xss_shell_upload.rb +38 -0
- data/lib/wpxf/modules/exploit/xss/reflected/count_per_day_reflected_xss_shell_upload.rb +40 -0
- data/lib/wpxf/modules/exploit/xss/reflected/csv_import_export_xss_shell_upload.rb +35 -0
- data/lib/wpxf/modules/exploit/xss/reflected/csv_import_reflected_xss_shell_upload.rb +37 -0
- data/lib/wpxf/modules/exploit/xss/reflected/custom_admin_page_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/custom_fields_search_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/custom_map_xss_shell_upload.rb +35 -0
- data/lib/wpxf/modules/exploit/xss/reflected/custom_metas_reflected_xss_shell_upload.rb +35 -0
- data/lib/wpxf/modules/exploit/xss/reflected/custom_permalinks_xss_shell_upload.rb +33 -0
- data/lib/wpxf/modules/exploit/xss/reflected/custom_search_plugin_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/defa_online_image_protector_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/donate_button_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/download_manager_reflected_xss_shell_upload.rb +39 -0
- data/lib/wpxf/modules/exploit/xss/reflected/duplicator_csrf_xss_shell_upload.rb +37 -0
- data/lib/wpxf/modules/exploit/xss/reflected/easy_contact_form_builder_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/emag_marketplace_connector_xss_shell_upload.rb +38 -0
- data/lib/wpxf/modules/exploit/xss/reflected/email_queue_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/email_users_reflected_xss_shell_upload.rb +40 -0
- data/lib/wpxf/modules/exploit/xss/reflected/enhanced_tooltip_glossary_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/error_log_viewer_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/events_made_easy_reflected_xss_shell_upload.rb +111 -0
- data/lib/wpxf/modules/exploit/xss/reflected/facebook_button_plugin_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/faq_wd_reflected_xss_shell_upload.rb +41 -0
- data/lib/wpxf/modules/exploit/xss/reflected/formbuilder_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/gallery_categories_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/gallery_plugin_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/gd_rating_system_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/google_analytics_dashboard_reflected_xss_shell_upload.rb +41 -0
- data/lib/wpxf/modules/exploit/xss/reflected/google_captcha_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/google_maps_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/google_one_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/google_shortlink_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/google_sitemap_plugin_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/gravity_forms_v1.9.15.11_reflected_xss_shell_upload.rb +35 -0
- data/lib/wpxf/modules/exploit/xss/reflected/hdw_tube_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/hero_maps_pro_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/htaccess_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/huge_it_image_gallery_reflected_xss_shell_upload.rb +41 -0
- data/lib/wpxf/modules/exploit/xss/reflected/import_woocommerce_reflected_xss_shell_upload.rb +37 -0
- data/lib/wpxf/modules/exploit/xss/reflected/impress_listings_reflected_xss_shell_upload.rb +87 -0
- data/lib/wpxf/modules/exploit/xss/reflected/indexisto_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/infusionsoft_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/instagram_feed_csrf_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/instalinker_reflected_xss_shell_upload.rb +40 -0
- data/lib/wpxf/modules/exploit/xss/reflected/job_board_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/job_manager_reflected_xss_shell_upload.rb +55 -0
- data/lib/wpxf/modules/exploit/xss/reflected/leenkme_reflected_xss_shell_upload.rb +41 -0
- data/lib/wpxf/modules/exploit/xss/reflected/lightbox_reflected_xss_shell_upload.rb +64 -0
- data/lib/wpxf/modules/exploit/xss/reflected/limit_attempts_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/link_library_reflected_xss_shell_upload.rb +33 -0
- data/lib/wpxf/modules/exploit/xss/reflected/magic_fields_reflected_xss_shell_upload.rb +36 -0
- data/lib/wpxf/modules/exploit/xss/reflected/mailchimp_for_wp_reflected_xss_shell_upload.rb +33 -0
- data/lib/wpxf/modules/exploit/xss/reflected/mailpoet_newsletters_reflected_xss_shell_upload.rb +49 -0
- data/lib/wpxf/modules/exploit/xss/reflected/mailpoet_newsletters_v272_reflected_xss_shell_upload.rb +36 -0
- data/lib/wpxf/modules/exploit/xss/reflected/master_slider_reflected_xss_shell_upload.rb +41 -0
- data/lib/wpxf/modules/exploit/xss/reflected/maxbuttons_reflected_xss_shell_upload.rb +38 -0
- data/lib/wpxf/modules/exploit/xss/reflected/minimax_page_layout_builder_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/msmc_redirect_after_comment_reflected_xss_shell_upload.rb +38 -0
- data/lib/wpxf/modules/exploit/xss/reflected/multilanguage_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/new_year_firework_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/ninja_forms_reflected_xss_shell_upload.rb +37 -0
- data/lib/wpxf/modules/exploit/xss/reflected/no_external_links_reflected_xss_shell_upload.rb +39 -0
- data/lib/wpxf/modules/exploit/xss/reflected/ocim_mp3_reflected_xss_shell_upload.rb +38 -0
- data/lib/wpxf/modules/exploit/xss/reflected/pagination_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/pdf_print_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/peters_login_redirect_reflected_xss_shell_upload.rb +53 -0
- data/lib/wpxf/modules/exploit/xss/reflected/photo_gallery_xss_shell_upload.rb +46 -0
- data/lib/wpxf/modules/exploit/xss/reflected/pinterest_feed_xss_shell_upload.rb +37 -0
- data/lib/wpxf/modules/exploit/xss/reflected/podlove_podcast_publisher_reflected_xss_shell_upload.rb +36 -0
- data/lib/wpxf/modules/exploit/xss/reflected/pondol_form_to_mail_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/pootle_button_reflected_xss_shell_upload.rb +32 -0
- data/lib/wpxf/modules/exploit/xss/reflected/popcash_integration_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/popup_maker_reflected_xss_shell_upload.rb +39 -0
- data/lib/wpxf/modules/exploit/xss/reflected/portfolio_reflected_xss_shell_upload.rb +36 -0
- data/lib/wpxf/modules/exploit/xss/reflected/post_to_csv_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/profile_builder_reflected_xss_shell_upload.rb +40 -0
- data/lib/wpxf/modules/exploit/xss/reflected/profile_extra_fields_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/promobar_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/propertyhive_csrf_xss_shell_upload.rb +37 -0
- data/lib/wpxf/modules/exploit/xss/reflected/quiz_and_survey_master_reflected_xss_shell_upload.rb +44 -0
- data/lib/wpxf/modules/exploit/xss/reflected/quotes_and_tips_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/quotes_collection_reflected_xss_shell_upload.rb +38 -0
- data/lib/wpxf/modules/exploit/xss/reflected/rating_bws_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/re_attacher_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/realty_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/registrationmagic_reflected_xss_shell_upload.rb +38 -0
- data/lib/wpxf/modules/exploit/xss/reflected/relevant_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/responsive_lightbox_reflected_xss_shell_upload.rb +39 -0
- data/lib/wpxf/modules/exploit/xss/reflected/rockhoist_badges_reflected_xss_shell_upload.rb +41 -0
- data/lib/wpxf/modules/exploit/xss/reflected/sender_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/simpel_reserveren_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/simple_slideshow_manager_reflected_xss_shell_upload.rb +39 -0
- data/lib/wpxf/modules/exploit/xss/reflected/slideshow_gallery_reflected_xss_shell_upload.rb +35 -0
- data/lib/wpxf/modules/exploit/xss/reflected/smart_marketing_xss_shell_upload.rb +37 -0
- data/lib/wpxf/modules/exploit/xss/reflected/social_buttons_pack_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/social_login_bws_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/social_pug_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/sp_project_document_manager_reflected_xss_shell_upload.rb +41 -0
- data/lib/wpxf/modules/exploit/xss/reflected/spamfree_reflected_xss_shell_upload.rb +44 -0
- data/lib/wpxf/modules/exploit/xss/reflected/spiffy_calendar_reflected_xss_shell_upload.rb +49 -0
- data/lib/wpxf/modules/exploit/xss/reflected/splashing_images_reflected_xss_shell_upload.rb +39 -0
- data/lib/wpxf/modules/exploit/xss/reflected/subscriber_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/tidio_gallery_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/timesheet_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/tracking_code_manager_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/tribulant_newsletter_reflected_xss_shell_upload.rb +39 -0
- data/lib/wpxf/modules/exploit/xss/reflected/tribulant_slideshow_gallery_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/trust_form_reflected_xss_shell_upload.rb +37 -0
- data/lib/wpxf/modules/exploit/xss/reflected/twitter_plugin_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/ultimate_csv_importer_reflected_xss_shell_upload.rb +83 -0
- data/lib/wpxf/modules/exploit/xss/reflected/ultimate_form_builder_lite_reflected_xss_shell_upload.rb +30 -0
- data/lib/wpxf/modules/exploit/xss/reflected/updater_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/user_access_manager_reflected_xss_shell_upload.rb +35 -0
- data/lib/wpxf/modules/exploit/xss/reflected/user_login_history_xss_shell_upload.rb +35 -0
- data/lib/wpxf/modules/exploit/xss/reflected/user_role_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/visitors_online_reflected_xss_shell_upload.rb +20 -0
- data/lib/wpxf/modules/exploit/xss/reflected/w3_total_cache_reflected_xss_shell_upload.rb +38 -0
- data/lib/wpxf/modules/exploit/xss/reflected/wang_guard_reflected_xss_shell_upload.rb +33 -0
- data/lib/wpxf/modules/exploit/xss/reflected/whizz_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/woo_email_control_reflected_xss_shell_upload.rb +41 -0
- data/lib/wpxf/modules/exploit/xss/reflected/wordpress_firewall_reflected_xss_shell_upload.rb +38 -0
- data/lib/wpxf/modules/exploit/xss/reflected/wp_advanced_importer_reflected_xss_shell_upload.rb +37 -0
- data/lib/wpxf/modules/exploit/xss/reflected/wp_filebase_download_manager_reflected_xss_shell_upload.rb +37 -0
- data/lib/wpxf/modules/exploit/xss/reflected/wp_live_chat_support_reflected_xss_shell_upload.rb +40 -0
- data/lib/wpxf/modules/exploit/xss/reflected/wp_mailster_reflected_xss_shell_upload.rb +38 -0
- data/lib/wpxf/modules/exploit/xss/reflected/wp_members_reflected_xss_shell_upload.rb +39 -0
- data/lib/wpxf/modules/exploit/xss/reflected/wp_retina_2x_xss_shell_upload.rb +39 -0
- data/lib/wpxf/modules/exploit/xss/reflected/wp_statistics_12.0.9_reflected_xss_shell_upload.rb +39 -0
- data/lib/wpxf/modules/exploit/xss/reflected/wp_statistics_reflected_xss_shell_upload.rb +38 -0
- data/lib/wpxf/modules/exploit/xss/reflected/wp_v4.4_xss_shell_upload.rb +54 -0
- data/lib/wpxf/modules/exploit/xss/reflected/wp_whois_domain_reflected_xss_shell_upload.rb +41 -0
- data/lib/wpxf/modules/exploit/xss/reflected/wpsolr_reflected_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/yoast_seo_xss_shell_upload.rb +34 -0
- data/lib/wpxf/modules/exploit/xss/reflected/zurl_preview_xss_shell_upload.rb +38 -0
- data/lib/wpxf/modules/exploit/xss/stored/admin_management_xtended_xss_shell_upload.rb +172 -0
- data/lib/wpxf/modules/exploit/xss/stored/all_in_one_seo_pack_xss_shell_upload.rb +208 -0
- data/lib/wpxf/modules/exploit/xss/stored/alo_easymail_csrf_xss_shell_upload.rb +48 -0
- data/lib/wpxf/modules/exploit/xss/stored/appointment_schedule_booking_system_stored_xss_shell_upload.rb +41 -0
- data/lib/wpxf/modules/exploit/xss/stored/arabic_font_csrf_stored_xss_shell_upload.rb +39 -0
- data/lib/wpxf/modules/exploit/xss/stored/caldera_forms_stored_xss_shell_upload.rb +38 -0
- data/lib/wpxf/modules/exploit/xss/stored/content_audit_csrf_stored_xss_shell_upload.rb +83 -0
- data/lib/wpxf/modules/exploit/xss/stored/dw_question_answer_stored_xss_shell_upload.rb +91 -0
- data/lib/wpxf/modules/exploit/xss/stored/dwnldr_xss_shell_upload.rb +58 -0
- data/lib/wpxf/modules/exploit/xss/stored/embed_comment_images_stored_xss_shell_upload.rb +57 -0
- data/lib/wpxf/modules/exploit/xss/stored/flickr_rss_csrf_xss_shell_upload.rb +38 -0
- data/lib/wpxf/modules/exploit/xss/stored/four04_to_three01_stored_xss_shell_upload.rb +50 -0
- data/lib/wpxf/modules/exploit/xss/stored/gwolle_guestbook_stored_xss_shell_upload.rb +47 -0
- data/lib/wpxf/modules/exploit/xss/stored/imageinject_csrf_xss_shell_upload.rb +53 -0
- data/lib/wpxf/modules/exploit/xss/stored/instagram_feed_csrf_stored_xss_shell_upload.rb +51 -0
- data/lib/wpxf/modules/exploit/xss/stored/ithemes_security_stored_xss_shell_upload.rb +40 -0
- data/lib/wpxf/modules/exploit/xss/stored/ithemes_security_v6.9.0_stored_xss_shell_upload.rb +40 -0
- data/lib/wpxf/modules/exploit/xss/stored/mdc_private_message_xss_shell_upload.rb +118 -0
- data/lib/wpxf/modules/exploit/xss/stored/newsletter_by_supsystic_csrf_stored_xss_shell_upload.rb +43 -0
- data/lib/wpxf/modules/exploit/xss/stored/participants_database_v1.7.5.9_stored_xss_shell_upload.rb +80 -0
- data/lib/wpxf/modules/exploit/xss/stored/safe_editor_xss_shell_upload.rb +60 -0
- data/lib/wpxf/modules/exploit/xss/stored/smart_google_code_inserter_xss_shell_upload.rb +39 -0
- data/lib/wpxf/modules/exploit/xss/stored/social_media_widget_csrf_xss_shell_upload.rb +39 -0
- data/lib/wpxf/modules/exploit/xss/stored/srbtranslatin_csrf_xss_shell_upload.rb +42 -0
- data/lib/wpxf/modules/exploit/xss/stored/ultimate_addons_for_vc_authenticated_stored_xss_shell_upload.rb +48 -0
- data/lib/wpxf/modules/exploit/xss/stored/ultimate_addons_for_vc_reflected_stored_xss_shell_upload.rb +37 -0
- data/lib/wpxf/modules/exploit/xss/stored/universal_analytics_authenticated_xss_shell_upload.rb +90 -0
- data/lib/wpxf/modules/exploit/xss/stored/user_login_log_authenticated_stored_xss_shell_upload.rb +45 -0
- data/lib/wpxf/modules/exploit/xss/stored/woo_custom_checkout_field_xss_shell_upload.rb +44 -0
- data/lib/wpxf/modules/exploit/xss/stored/wp_google_maps_stored_xss_shell_upload.rb +55 -0
- data/lib/wpxf/modules/exploit/xss/stored/wp_live_chat_support_stored_xss_shell_upload.rb +99 -0
- data/lib/wpxf/modules/exploit/xss/stored/wp_piwik_stored_xss_shell_upload.rb +36 -0
- data/lib/wpxf/modules/exploit/xss/stored/wp_v4.3_shortcode_xss_shell_upload.rb +55 -0
- data/lib/wpxf/net.rb +16 -0
- data/lib/wpxf/net/cookie_jar.rb +37 -0
- data/lib/wpxf/net/http_client.rb +206 -0
- data/lib/wpxf/net/http_options.rb +98 -0
- data/lib/wpxf/net/http_response.rb +44 -0
- data/lib/wpxf/net/http_server.rb +186 -0
- data/lib/wpxf/net/typhoeus_helper.rb +46 -0
- data/lib/wpxf/net/user_agent.rb +193 -0
- data/lib/wpxf/payloads/bind_php.rb +95 -0
- data/lib/wpxf/payloads/custom.rb +42 -0
- data/lib/wpxf/payloads/download_exec.rb +43 -0
- data/lib/wpxf/payloads/exec.rb +43 -0
- data/lib/wpxf/payloads/meterpreter_bind_tcp.rb +64 -0
- data/lib/wpxf/payloads/meterpreter_reverse_tcp.rb +50 -0
- data/lib/wpxf/payloads/reverse_tcp.rb +152 -0
- data/lib/wpxf/payloads/socket_helper.rb +50 -0
- data/lib/wpxf/utility.rb +12 -0
- data/lib/wpxf/utility/body_builder.rb +151 -0
- data/lib/wpxf/utility/reference_inflater.rb +34 -0
- data/lib/wpxf/utility/text.rb +81 -0
- data/lib/wpxf/versioning.rb +11 -0
- data/lib/wpxf/versioning/browser_versions.rb +56 -0
- data/lib/wpxf/versioning/os_versions.rb +18 -0
- data/lib/wpxf/wordpress.rb +24 -0
- data/lib/wpxf/wordpress/comments.rb +89 -0
- data/lib/wpxf/wordpress/file_download.rb +168 -0
- data/lib/wpxf/wordpress/fingerprint.rb +238 -0
- data/lib/wpxf/wordpress/hash_dump.rb +264 -0
- data/lib/wpxf/wordpress/login.rb +60 -0
- data/lib/wpxf/wordpress/options.rb +27 -0
- data/lib/wpxf/wordpress/plugin.rb +102 -0
- data/lib/wpxf/wordpress/posts.rb +26 -0
- data/lib/wpxf/wordpress/reflected_xss.rb +40 -0
- data/lib/wpxf/wordpress/shell_upload.rb +172 -0
- data/lib/wpxf/wordpress/staged_reflected_xss.rb +82 -0
- data/lib/wpxf/wordpress/stored_xss.rb +73 -0
- data/lib/wpxf/wordpress/urls.rb +131 -0
- data/lib/wpxf/wordpress/user.rb +35 -0
- data/lib/wpxf/wordpress/xss.rb +143 -0
- data/wpxf.gemspec +33 -0
- metadata +708 -0
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Wpxf
|
4
|
+
module Net
|
5
|
+
# A response from a request made by a HttpClient.
|
6
|
+
class HttpResponse
|
7
|
+
# @param res [Object] a response to parse.
|
8
|
+
def initialize(res)
|
9
|
+
parse_typhoeus_response(res) if res.is_a? Typhoeus::Response
|
10
|
+
end
|
11
|
+
|
12
|
+
# Parse a Typhoeus response into the object.
|
13
|
+
# @param res [Typhoeus::Response] the response object to parse.
|
14
|
+
# @return [nil]
|
15
|
+
def parse_typhoeus_response(res)
|
16
|
+
self.code = res.code
|
17
|
+
self.body = res.body.nil? ? '' : res.body
|
18
|
+
self.headers = res.headers
|
19
|
+
self.timed_out = res.timed_out? || res.return_code == :couldnt_connect
|
20
|
+
self.cookies = CookieJar.new.parse(res.headers['Set-Cookie']) if res.headers
|
21
|
+
end
|
22
|
+
|
23
|
+
# @return [Boolean] a boolean that indicates whether a request timed out.
|
24
|
+
def timed_out?
|
25
|
+
timed_out
|
26
|
+
end
|
27
|
+
|
28
|
+
# @return [Integer] the HTTP status code.
|
29
|
+
attr_accessor :code
|
30
|
+
|
31
|
+
# @return [String] the response body.
|
32
|
+
attr_accessor :body
|
33
|
+
|
34
|
+
# @return [Hash] a hash of all returned headers.
|
35
|
+
attr_accessor :headers
|
36
|
+
|
37
|
+
# @return [Boolean] a boolean that indicates whether a request timed out.
|
38
|
+
attr_accessor :timed_out
|
39
|
+
|
40
|
+
# @return [Hash] a {CookieJar} with all returned cookies.
|
41
|
+
attr_accessor :cookies
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,186 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'cgi'
|
4
|
+
require 'socket'
|
5
|
+
|
6
|
+
# Provides basic, single threaded HTTP server functionality.
|
7
|
+
module Wpxf::Net::HttpServer
|
8
|
+
include Wpxf
|
9
|
+
|
10
|
+
# Initialize a new instance of {HttpServer}.
|
11
|
+
def initialize
|
12
|
+
super
|
13
|
+
|
14
|
+
register_options([
|
15
|
+
StringOption.new(
|
16
|
+
name: 'http_server_bind_address',
|
17
|
+
desc: 'Address to bind the HTTP server to',
|
18
|
+
default: '0.0.0.0',
|
19
|
+
required: true
|
20
|
+
),
|
21
|
+
PortOption.new(
|
22
|
+
name: 'http_server_bind_port',
|
23
|
+
desc: 'Port for the HTTP server to listen on',
|
24
|
+
default: 80,
|
25
|
+
required: true
|
26
|
+
)
|
27
|
+
])
|
28
|
+
|
29
|
+
@http_server_kill_switch = false
|
30
|
+
end
|
31
|
+
|
32
|
+
# @return [String] the address the HTTP server is bound to.
|
33
|
+
def http_server_bind_address
|
34
|
+
normalized_option_value('http_server_bind_address')
|
35
|
+
end
|
36
|
+
|
37
|
+
# @return [Integer] the port the HTTP server is listening on.
|
38
|
+
def http_server_bind_port
|
39
|
+
normalized_option_value('http_server_bind_port')
|
40
|
+
end
|
41
|
+
|
42
|
+
# Invoked when a HTTP request is made to the server.
|
43
|
+
# @param path [String] the path requested.
|
44
|
+
# @param params [Hash] the query string parameters.
|
45
|
+
# @param headers [Hash] the HTTP headers.
|
46
|
+
# @return [String, Hash] if a string is returned, it will be used as the response body
|
47
|
+
# to send to the client. If a hash is returned, it should contain the keys:
|
48
|
+
# * +:body+ - the body text of the response.
|
49
|
+
# * +:type+ - the MIME type of the response.
|
50
|
+
# * +:headers+ - an array of header strings.
|
51
|
+
def on_http_request(path, params, headers) end
|
52
|
+
|
53
|
+
# @return [String] the AJAX download helper script.
|
54
|
+
def js_ajax_download
|
55
|
+
File.read(File.join(Wpxf.data_directory, 'js', 'ajax_download.js'))
|
56
|
+
end
|
57
|
+
|
58
|
+
# @return [String] the AJAX post helper script.
|
59
|
+
def js_ajax_post
|
60
|
+
File.read(File.join(Wpxf.data_directory, 'js', 'ajax_post.js'))
|
61
|
+
end
|
62
|
+
|
63
|
+
# @return [String] the JS post helper script.
|
64
|
+
def js_post
|
65
|
+
File.read(File.join(Wpxf.data_directory, 'js', 'post.js'))
|
66
|
+
end
|
67
|
+
|
68
|
+
# Start the HTTP server.
|
69
|
+
# @param non_block [Boolean] run the server in non-blocking mode.
|
70
|
+
def start_http_server(non_block = false)
|
71
|
+
@tcp_server = TCPServer.new(http_server_bind_address, http_server_bind_port)
|
72
|
+
emit_info "Started HTTP server on #{http_server_bind_address}:"\
|
73
|
+
"#{http_server_bind_port}"
|
74
|
+
|
75
|
+
if non_block
|
76
|
+
@http_server_thread = Thread.new do
|
77
|
+
_http_server_loop
|
78
|
+
end
|
79
|
+
else
|
80
|
+
_http_server_loop
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# Stop the HTTP server after it has finished processing the current request.
|
85
|
+
def stop_http_server
|
86
|
+
return false if @is_stopping
|
87
|
+
@is_stopping = true
|
88
|
+
|
89
|
+
emit_info 'Stopping HTTP server...', true
|
90
|
+
@http_server_kill_switch = true
|
91
|
+
@http_server_thread&.exit
|
92
|
+
@tcp_server.close if !@tcp_server.nil? && !@tcp_server.closed?
|
93
|
+
emit_info 'HTTP server stopped'
|
94
|
+
@is_stopping = false
|
95
|
+
end
|
96
|
+
|
97
|
+
# @return [Thread] thread that the server runs on when in non-blocking mode.
|
98
|
+
def http_server_thread
|
99
|
+
@http_server_thread
|
100
|
+
end
|
101
|
+
|
102
|
+
private
|
103
|
+
|
104
|
+
def _send_headers(socket, body, content_type, custom_headers)
|
105
|
+
headers = []
|
106
|
+
headers.push 'HTTP/1.1 200 OK'
|
107
|
+
headers.push "Content-Type: #{content_type}"
|
108
|
+
headers.push "Content-Length: #{body.bytesize}"
|
109
|
+
headers += custom_headers unless custom_headers.nil?
|
110
|
+
headers.push 'Connection: close'
|
111
|
+
|
112
|
+
headers.each do |header|
|
113
|
+
socket.print "#{header}\r\n"
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
def _send_response(response, socket)
|
118
|
+
content_type = 'text/plain'
|
119
|
+
body = ''
|
120
|
+
custom_headers = nil
|
121
|
+
|
122
|
+
if response.is_a? String
|
123
|
+
body = response
|
124
|
+
else
|
125
|
+
body = response[:body]
|
126
|
+
content_type = response[:type]
|
127
|
+
custom_headers = response[:headers]
|
128
|
+
end
|
129
|
+
|
130
|
+
_send_headers(socket, body, content_type, custom_headers)
|
131
|
+
socket.print "\r\n"
|
132
|
+
socket.print body
|
133
|
+
end
|
134
|
+
|
135
|
+
def _http_server_loop
|
136
|
+
begin
|
137
|
+
loop do
|
138
|
+
socket = @tcp_server.accept
|
139
|
+
|
140
|
+
begin
|
141
|
+
response = _handle_incoming_http_request(socket)
|
142
|
+
_send_response(response, socket) if response
|
143
|
+
socket.close
|
144
|
+
rescue Errno::EPIPE
|
145
|
+
emit_warning 'A socket was closed by the requester', true
|
146
|
+
end
|
147
|
+
|
148
|
+
break if @http_server_kill_switch
|
149
|
+
end
|
150
|
+
rescue SignalException
|
151
|
+
emit_warning 'Caught kill signal', true
|
152
|
+
rescue StandardError => e
|
153
|
+
emit_error "Socket error: #{e}"
|
154
|
+
end
|
155
|
+
|
156
|
+
stop_http_server
|
157
|
+
end
|
158
|
+
|
159
|
+
def _handle_incoming_http_request(socket)
|
160
|
+
request = socket.gets
|
161
|
+
return unless request
|
162
|
+
|
163
|
+
emit_info "Incoming HTTP request: #{request}", true
|
164
|
+
|
165
|
+
headers = ''
|
166
|
+
while (line = socket.gets) != "\r\n"
|
167
|
+
headers += line
|
168
|
+
emit_info line, true
|
169
|
+
end
|
170
|
+
|
171
|
+
headers = Hash[headers.each_line.map { |l| l.chomp.split(': ', 2) }]
|
172
|
+
path = request.gsub(/^[A-Za-z]+\s(.+?)\s.*$/, '\1').chomp
|
173
|
+
params = {}
|
174
|
+
|
175
|
+
if path.include?('?')
|
176
|
+
params = CGI.parse(path.split('?')[-1])
|
177
|
+
params.each do |k, v|
|
178
|
+
params[k] = v.join(' ')
|
179
|
+
end
|
180
|
+
path = path.split('?')[0]
|
181
|
+
end
|
182
|
+
|
183
|
+
# Dispatch parsed data to the callback in the module.
|
184
|
+
on_http_request(path, params, headers)
|
185
|
+
end
|
186
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Wpxf
|
4
|
+
module Net
|
5
|
+
# Provides helper functions for interfacing with Typhoeus in a module.
|
6
|
+
module TyphoeusHelper
|
7
|
+
def advanced_typhoeus_options
|
8
|
+
{
|
9
|
+
userpwd: datastore['basic_auth_creds'],
|
10
|
+
proxy: datastore['proxy'],
|
11
|
+
proxyuserpwd: datastore['proxy_auth_creds'],
|
12
|
+
ssl_verifyhost: normalized_option_value('verify_host') ? 2 : 0,
|
13
|
+
ssl_verifypeer: normalized_option_value('verify_peer'),
|
14
|
+
timeout: normalized_option_value('http_client_timeout')
|
15
|
+
}
|
16
|
+
end
|
17
|
+
|
18
|
+
def standard_typhoeus_options(method, params, body, headers)
|
19
|
+
{
|
20
|
+
method: method,
|
21
|
+
body: body,
|
22
|
+
params: params,
|
23
|
+
headers: base_http_headers.merge(headers),
|
24
|
+
followlocation: normalized_option_value('follow_http_redirection')
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
def create_typhoeus_request_options(method, params, body, headers)
|
29
|
+
standard_typhoeus_options(method, params, body, headers)
|
30
|
+
.merge(advanced_typhoeus_options)
|
31
|
+
end
|
32
|
+
|
33
|
+
def create_typhoeus_request(opts)
|
34
|
+
headers = opts[:headers] || {}
|
35
|
+
headers['Cookie'] = opts[:cookie] if opts[:cookie]
|
36
|
+
options = create_typhoeus_request_options(
|
37
|
+
opts[:method],
|
38
|
+
opts[:params],
|
39
|
+
opts[:body],
|
40
|
+
headers
|
41
|
+
)
|
42
|
+
Typhoeus::Request.new(normalize_relative_uri(opts[:url]), options)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,193 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Wpxf
|
4
|
+
module Net
|
5
|
+
# Provides functionality for generating user agent strings.
|
6
|
+
module UserAgent
|
7
|
+
include Wpxf::Versioning::BrowserVersions
|
8
|
+
include Wpxf::Versioning::OSVersions
|
9
|
+
|
10
|
+
# A random browser and OS combination.
|
11
|
+
# @return [Hash] a hash containing a :browser and :os
|
12
|
+
def random_browser_and_os
|
13
|
+
frequencies = clients_by_frequency
|
14
|
+
target_frequency = rand(1..100)
|
15
|
+
sum = 0
|
16
|
+
|
17
|
+
frequencies.each do |browser_frequency, combinations|
|
18
|
+
sum += browser_frequency.to_i
|
19
|
+
next if target_frequency > sum
|
20
|
+
|
21
|
+
# This browser encompasses our target frequency, so reset the
|
22
|
+
# frequency sum and generate a new target frequency for the
|
23
|
+
# operating system selection.
|
24
|
+
target_frequency = rand(1..100)
|
25
|
+
sum = 0
|
26
|
+
|
27
|
+
# Once we find an OS that covers the target frequency, return
|
28
|
+
# the browser/OS combination.
|
29
|
+
combinations.each do |os_frequency, combo|
|
30
|
+
sum += os_frequency.to_i
|
31
|
+
if target_frequency <= sum
|
32
|
+
return {
|
33
|
+
browser: combo['browser'].to_sym,
|
34
|
+
os: combo['os'].to_sym
|
35
|
+
}
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# This point should never be reached, as the frequencies should
|
41
|
+
# always total 100 and thus we should always retrieve a combo.
|
42
|
+
raise 'Browser and OS frequencies exceeded 100'
|
43
|
+
end
|
44
|
+
|
45
|
+
# @return [Hash] a hash of browser and OS combinations grouped by
|
46
|
+
# frequencies drawn from real-world statistics.
|
47
|
+
def clients_by_frequency
|
48
|
+
json = Wpxf::DataFile.new('json', 'browser_usage_by_frequency.json').content
|
49
|
+
JSON.parse(json)
|
50
|
+
end
|
51
|
+
|
52
|
+
# A random date between two dates in a specific format.
|
53
|
+
# @param min the minimum date to return.
|
54
|
+
# @param max the maximum date to return.
|
55
|
+
# @param format the format string to use when formatting the date.
|
56
|
+
# @return [String] a formatted random date.
|
57
|
+
def random_time_string(min, max = Time.now.to_s, format = '%Y%m%d')
|
58
|
+
rand(Time.parse(min)..Time.parse(max)).strftime(format)
|
59
|
+
end
|
60
|
+
|
61
|
+
# A random CPU type.
|
62
|
+
# @param os the operating system that the CPU would be used with.
|
63
|
+
# @return [String] a random CPU type.
|
64
|
+
def random_processor_string(os)
|
65
|
+
return ['i686', 'x86_64'].sample if os == :linux
|
66
|
+
return ['Intel', 'PPC', 'U; Intel', 'U; PPC'].sample if os == :osx
|
67
|
+
end
|
68
|
+
|
69
|
+
# @return [String] a random Firefox version string.
|
70
|
+
def random_firefox_version_string
|
71
|
+
[
|
72
|
+
"Gecko/#{random_time_string('2011-01-01')} "\
|
73
|
+
"Firefox/#{rand(5..7)}.0",
|
74
|
+
"Gecko/#{random_time_string('2011-01-01')} "\
|
75
|
+
"Firefox/#{rand(5..7)}.0.1",
|
76
|
+
"Gecko/#{random_time_string('2010-01-01')} "\
|
77
|
+
"Firefox/3.6.#{rand(1..20)}",
|
78
|
+
"Gecko/#{random_time_string('2010-01-01')} "\
|
79
|
+
'Firefox/3.8'
|
80
|
+
].sample
|
81
|
+
end
|
82
|
+
|
83
|
+
# A random Firefox platform string.
|
84
|
+
# @param os the operating system that Firefox would be running on.
|
85
|
+
# @return [String] a random Firefox platform string.
|
86
|
+
def random_firefox_platform_string(os)
|
87
|
+
version = random_firefox_version_string
|
88
|
+
cpu = random_processor_string(os)
|
89
|
+
|
90
|
+
if os == :linux
|
91
|
+
return "(X11; Linux #{cpu}; rv:#{rand(5..7)}.0) #{version}"
|
92
|
+
end
|
93
|
+
|
94
|
+
if os == :osx
|
95
|
+
return "(Macintosh; #{cpu} Mac OS X #{random_osx_version} "\
|
96
|
+
"rv:#{rand(2..6)}.0) #{version}"
|
97
|
+
end
|
98
|
+
|
99
|
+
if os == :windows
|
100
|
+
return "(Windows NT #{random_nt_version}; en-US; rv:1.9."\
|
101
|
+
"#{rand(0..2)}.20) #{version}"
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
# A random Safari platform string.
|
106
|
+
# @param os the operating system that Safari would be running on.
|
107
|
+
# @return [String] a random Safari platform string.
|
108
|
+
def random_safari_platform_string(os)
|
109
|
+
build = random_safari_build_number
|
110
|
+
cpu = random_processor_string(os)
|
111
|
+
version = random_safari_version
|
112
|
+
|
113
|
+
if os == :osx
|
114
|
+
return "(Macintosh; U; #{cpu} Mac OS X #{random_osx_version} rv:"\
|
115
|
+
"#{rand(2..6)}.0; en-US) AppleWebKit/#{build} "\
|
116
|
+
"(KHTML, like Gecko) Version/#{version} Safari/#{build}"
|
117
|
+
else
|
118
|
+
return "(Windows; U; Windows NT #{random_nt_version}) AppleWebKit/"\
|
119
|
+
"#{build} (KHTML, like Gecko) Version/#{version} "\
|
120
|
+
"Safari/#{build}"
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
# A random Internet Explorer platform string.
|
125
|
+
# @return [String] a random Internet Explorer platform string.
|
126
|
+
def random_iexplorer_platform_string
|
127
|
+
"(compatible; MSIE #{random_ie_version}; Windows NT "\
|
128
|
+
"#{random_nt_version}; Trident/#{random_trident_version})"
|
129
|
+
end
|
130
|
+
|
131
|
+
# A random Opera platform string.
|
132
|
+
# @param os the operating system that Opera would be running on.
|
133
|
+
# @return [String] a random Opera platform string.
|
134
|
+
def random_opera_platform_string(os)
|
135
|
+
cpu = random_processor_string(os)
|
136
|
+
presto = random_presto_version
|
137
|
+
version = random_presto_version2
|
138
|
+
|
139
|
+
if os == :linux
|
140
|
+
return "(X11; Linux #{cpu}; U; en-US) Presto/#{presto} "\
|
141
|
+
"Version/#{version}"
|
142
|
+
else
|
143
|
+
return "(Windows NT #{random_nt_version}; U; en-US) "\
|
144
|
+
"Presto/#{presto} Version/#{version}"
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# A random Chrome platform string.
|
149
|
+
# @param os the operating system that Chrome would be running on.
|
150
|
+
# @return [String] a random Chrome platform string.
|
151
|
+
def random_chrome_platform_string(os)
|
152
|
+
cpu = random_processor_string(os)
|
153
|
+
build = random_chrome_build_number
|
154
|
+
version = random_chrome_version
|
155
|
+
|
156
|
+
if os == :linux
|
157
|
+
return "(X11; Linux #{cpu}) AppleWebKit/#{build} (KHTML, like Gecko)"\
|
158
|
+
" Chrome/#{version} Safari/#{build}"
|
159
|
+
end
|
160
|
+
|
161
|
+
if os == :osx
|
162
|
+
return "(Macintosh; U; #{cpu} Mac OS X #{random_osx_version}) "\
|
163
|
+
"AppleWebKit/#{build} (KHTML, like Gecko) Chrome/"\
|
164
|
+
"#{version} Safari/#{build}"
|
165
|
+
end
|
166
|
+
|
167
|
+
if os == :windows
|
168
|
+
return "(Windows NT #{random_nt_version}) AppleWebKit/#{build} "\
|
169
|
+
"(KHTML, like Gecko) Chrome/#{version} Safari/#{build}"
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# @return [String] a random browser user agent.
|
174
|
+
def random_user_agent
|
175
|
+
platform = random_browser_and_os
|
176
|
+
os = platform[:os]
|
177
|
+
|
178
|
+
if platform[:browser] == :firefox
|
179
|
+
return "Mozilla/5.0 #{random_firefox_platform_string(os)}"
|
180
|
+
elsif platform[:browser] == :safari
|
181
|
+
return "Mozilla/5.0 #{random_safari_platform_string(os)}"
|
182
|
+
elsif platform[:browser] == :iexplorer
|
183
|
+
return "Mozilla/5.0 #{random_iexplorer_platform_string}"
|
184
|
+
elsif platform[:browser] == :opera
|
185
|
+
return "Opera/#{random_opera_version} "\
|
186
|
+
"#{random_opera_platform_string(os)}"
|
187
|
+
else
|
188
|
+
return "Mozilla/5.0 #{random_chrome_platform_string(os)}"
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|