Skip to content

Instantly share code, notes, and snippets.

@omarkurt

omarkurt/nss.js Secret

Created June 22, 2018 10:47
Show Gist options
  • Save omarkurt/01748ba7bf7ccbb309f0a931ea30a23d to your computer and use it in GitHub Desktop.
Save omarkurt/01748ba7bf7ccbb309f0a931ea30a23d to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name NC
// @namespace http://omar.ninja
// @version 0.2
// @description try to take over the world!
// @author You
// @match https://www.netsparkercloud.com/*
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==
/*$(document).on('keydown', function ( e ) {
// You may replace `c` with whatever key you want
if ((e.metaKey || e.ctrlKey) && ( String.fromCharCode(e.which).toLowerCase() === 'z') ) { */
$(document).ready(function(){
var site = $("body").find("#scan-detail-summary > div > div > div > div:nth-child(1) > div:nth-child(1) > div.col-md-7 > table > tbody > tr:nth-child(2) > td > a").text();
var scandate = $("body").find("#scan-detail-summary > div > div > div > div:nth-child(1) > div:nth-child(1) > div.col-md-7 > table > tbody > tr:nth-child(5) > td").text();
var duration = $("body").find("#scan-detail-summary > div > div > div > div:nth-child(1) > div:nth-child(1) > div.col-md-7 > table > tbody > tr:nth-child(6) > td").text();
var policy = $("body").find("#scan-detail-summary > div > div > div > div:nth-child(1) > div:nth-child(1) > div.col-md-7 > table > tbody > tr:nth-child(3) > td > a").text();
var SCANurl = location.href;
var ScanAuth = $("body").find("#scan-detail-summary > div > div > div > div:nth-child(1) > div:nth-child(1) > div.col-md-7 > table > tbody > tr:nth-child(7) > th").text();
var IsHeuristic = $("body").find("#scan-detail-summary > div > div > div > div:nth-child(1) > div:nth-child(2) > div > table > tbody > tr:nth-child(1) > td > a").text();
/* console.log("Site",$.trim(site));
console.log("Scan Date ",$.trim(scandate));
console.log("Duration ",$.trim(duration));
console.log("Policy",$.trim(policy));
console.log("ScansURL",$.trim(SCANurl));
console.log("Custom URL?",$.trim(IsHeuristic)); */
if(ScanAuth=="Scan Type"){
ScanAuth = "None";
}else{
ScanAuth = $.trim($("Body").find("#scan-detail-summary > div > div > div > div:nth-child(1) > div:nth-child(1) > div.col-md-7 > table > tbody > tr:nth-child(7) > td > a").text());
if(ScanAuth=="Form Authentication"){
ScanAuth="Form Auth";
}else{
ScanAuth = "ALEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEERT";
}
}
console.log("Auth",ScanAuth);
var misc = ScanAuth+" - "+$.trim(IsHeuristic)+" - "+$.trim(policy);
var complete = $.trim(site)+","+$.trim(scandate)+","+$.trim(duration)+","+$.trim(SCANurl)+", ,"+misc;
console.log(complete);
});
/* }
});*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment