function show_whois_lookup_modal(){ $('#modal_title').html('WHOIS Lookup'); $('#modal-content').empty(); $('#modal-content').append(`
`); $('#modal_dialog').modal('show'); } function toolbox_lookup_whois(){ var domain = document.getElementById("whois_domain_name").value; if (domain) { get_domain_whois(domain, show_add_target_btn=true); } else{ swal.fire("Error!", 'Please enter the domain/IP Address!', "warning", { button: "Okay", }); } } function cms_detector(){ $('#modal_title').html('Detect CMS'); $('#modal-content').empty(); $('#modal-content').append(`
(reNgine uses CMSeeK to detect CMS.)
`); $('#modal_dialog').modal('show'); } $(document).on('click', '#detect_cms_submit_btn', function(){ var url = document.getElementById("cms_detector_input_url").value; if (!validURL(url)) { swal.fire("Error!", 'Please enter a valid URL!', "warning", { button: "Okay", }); return; } cms_detector_api_call(url); }); function cms_detector_api_call(url){ var api_url = `/api/tools/cms_detector/?format=json&url=${url}` Swal.fire({ title: `Detecting CMS`, text: `reNgine is detecting CMS on ${url} and this may take a while. Please wait...`, allowOutsideClick: false }); swal.showLoading(); fetch(api_url, { method: 'GET', credentials: "same-origin", headers: { "X-CSRFToken": getCookie("csrftoken"), "Content-Type": "application/json" }, }).then(response => response.json()).then(function(response) { if (response.status) { swal.close(); $('#modal_title').html('CMS Details for ' + url); $('#modal-content').empty(); content = `
${response.cms_name}

${response.cms_name}

Visit CMS
 CMS Details

CMS Name :

${response.cms_name}

CMS URL :

${response.cms_url}

Detection Method :

${response.detection_param}

URL :

(Includes redirected URL)
${response.url}

`; if (response.wp_license) { content += `

Wordpress License :

${response.wp_license}

`; } if (response.wp_readme_file) { content += `

Wordpress Readme file :

${response.wp_readme_file}

`; } if (response.wp_uploads_directory) { content += `

Wordpress Uploads Directory :

${response.wp_uploads_directory}

`; } if (response.wp_users) { content += `

Wordpress Users :

${response.wp_users}

`; } if (response.wp_version) { content += `

Wordpress Version :

${response.wp_version}

`; } if (response.wp_plugins) { content += `

Wordpress Plugins :

${response.wp_plugins}

`; } if (response.wp_themes) { content += `

Wordpress Themes :

${response.wp_themes}

`; } if (response.joomla_version) { content += `

Joomla Version :

${response.joomla_version}

`; } if (response.joomla_debug_mode) { content += `

Joomla Debug Mode :

${response.joomla_debug_mode}

`; } if (response.joomla_readme_file) { content += `

Joomla Readme File :

${response.joomla_readme_file}

`; } if (response.joomla_backup_files) { content += `

Joomla Backup Files :

${response.joomla_backup_files}

`; } if (response.directory_listing) { content += `

Joomla Directory Listing :

${response.directory_listing}

`; } if (response.joomla_config_files) { content += `

Joomla Config Files :

${response.joomla_config_files}

`; } if (response.user_registration_url) { content += `

Joomla User Registration :

${response.user_registration_url}

`; } content += `
`; content += `
    `; content += `
    ${htmlEncode(JSON.stringify(response, null, 4))}
    `; content += '
'; content += '
' $('#modal-content').append(content); $('#modal_dialog').modal('show'); } else { Swal.fire({ title: 'Oops!', text: `${response['message']}`, icon: 'error' }); } }); } function toolbox_cve_detail(){ $('#modal_title').html('CVE Details Lookup'); $('#modal-content').empty(); $('#modal-content').append(`
`); $('#modal_dialog').modal('show'); } $(document).on('click', '#cve_detail_submit_btn', function(){ var cve_id = document.getElementById("cve_id").value; if (cve_id) { get_and_render_cve_details(cve_id); } else{ swal.fire("Error!", 'Please enter CVE ID!', "warning", { button: "Okay", }); } }); function toolbox_waf_detector(){ $('#modal_title').html('WAF Detector'); $('#modal-content').empty(); $('#modal-content').append(`
(reNgine uses wafw00f to detect WAF.)
`); $('#modal_dialog').modal('show'); } $(document).on('click', '#detect_waf_submit_btn', function(){ var url = document.getElementById("waf_detector_input_url").value; if (!validURL(url)) { swal.fire("Error!", 'Please enter a valid URL!', "warning", { button: "Okay", }); return; } waf_detector_api_call(url); }); function waf_detector_api_call(url){ var api_url = `/api/tools/waf_detector/?format=json&url=${url}` Swal.fire({ title: `Detecting WAF`, text: `reNgine is detecting WAF on ${url} and this may take a while. Please wait...`, allowOutsideClick: false }); swal.showLoading(); fetch(api_url, { method: 'GET', credentials: "same-origin", headers: { "X-CSRFToken": getCookie("csrftoken"), "Content-Type": "application/json" }, }).then(response => response.json()).then(function(response) { if (response.status) { swal.close() Swal.fire({ title: 'WAF Detected!', text: `${url} is running ${response.results}`, icon: 'info' }); } else { Swal.fire({ title: 'Oops!', text: `${response['message']}`, icon: 'error' }); } }); }