From 2a6005f1152f76890be2c7bd4b1550d39d1ac2d5 Mon Sep 17 00:00:00 2001 From: mikedpicks Date: Sun, 23 Jul 2017 21:45:30 -0500 Subject: [PATCH 01/13] simple UI Changes --- styles/style.css | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/styles/style.css b/styles/style.css index ae8e155..18cc363 100644 --- a/styles/style.css +++ b/styles/style.css @@ -1,35 +1,31 @@ h4 { - margin-top: 25px; + } .row { - margin: 20px; + } [class*="responseRow"] { - margin: 20px; - padding-top: 15px; - padding-bottom: 15px; - background-color: #eee; - background-color: rgba(86,61,124,.15); - border: 1px solid #ddd; - border: 1px solid rgba(86,61,124,.2); + } [class*="responseRow"] td { - margin: 5px; - background-color: white; + } hr { - margin-top: 40px; - margin-bottom: 40px; + } #top-row { - margin: 25px; + } -input { - margin: 10px; +input, select, .form-label { + +} + +.form-control, .form-control { + } \ No newline at end of file From b14234311e781c91895dab593377b48a1bcf1a86 Mon Sep 17 00:00:00 2001 From: mikedpicks Date: Sun, 23 Jul 2017 21:46:24 -0500 Subject: [PATCH 02/13] Class changes and index restructure --- index.html | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/index.html b/index.html index ea4bd90..e5072e3 100644 --- a/index.html +++ b/index.html @@ -24,27 +24,37 @@
-
- Domain:
- - -
+
+
+ Domain:
+ + + +
+
+
+ +
+
+
+ +
+
-
-
+ \ No newline at end of file From b2fad0eb21e933927d37c5e70b885e83ad5caeac Mon Sep 17 00:00:00 2001 From: mikedpicks Date: Mon, 24 Jul 2017 12:31:51 -0500 Subject: [PATCH 03/13] Major UI Changes to Form Controls --- index.html | 7 ++++++- javascript/main.js | 8 ++++---- styles/style.css | 40 +++++++++++++++++++++++++++++++++------- 3 files changed, 43 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index e5072e3..cdece19 100644 --- a/index.html +++ b/index.html @@ -24,9 +24,14 @@
+
+

SPFToolbox

+
+
+
- Domain:
+ Domain:  - + Domain:  - -
+
-
@@ -71,4 +67,4 @@

SPFToolbox

- \ No newline at end of file + From f3d67860582d7206a7886683881e52d7f915526c Mon Sep 17 00:00:00 2001 From: Charles Barnes Date: Mon, 24 Jul 2017 19:04:06 -0500 Subject: [PATCH 05/13] add separators for requests --- javascript/main.js | 4 ++-- styles/style.css | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/javascript/main.js b/javascript/main.js index e24c9d2..d908d12 100644 --- a/javascript/main.js +++ b/javascript/main.js @@ -28,11 +28,11 @@ //creates thes the table to store the response details each table has a unique class $(".responseTable").prepend("
"); - $(".responseRow" + requestNum).append("" + callType + ""); + $(".responseRow" + requestNum).append("" + callType + ""); for (i = 0, len = dnsResp.length; i < len; i++) { var jsonData = dnsResp[i]; console.log(jsonData); - + $(".responseRow" + requestNum).append('___________________________________'); //iterates through object keys for (j = 0, len = Object.keys(jsonData).length; j < len; j++) { $(".responseRow" + requestNum).append("" + Object.getOwnPropertyNames(jsonData)[j] + ":" + jsonData[Object.keys(jsonData)[j]] + ""); diff --git a/styles/style.css b/styles/style.css index 7f92db3..28bd526 100644 --- a/styles/style.css +++ b/styles/style.css @@ -22,6 +22,16 @@ hr { } +caption { + background-color: rgb(90,85,90); + font-weight: bold; + color: #44c0f0; + padding-top: .7em; + padding-bottom: .7em; + letter-spacing: .085em; + text-align: center !important; +} + #top-row { } @@ -54,4 +64,4 @@ input, select, .form-label { .logo-style1 { color:#44c0f0; font-weight: bold; -} \ No newline at end of file +} From 5098b6f98e07b5700de2403e4a954b286663485c Mon Sep 17 00:00:00 2001 From: mikedpicks Date: Mon, 24 Jul 2017 19:13:07 -0500 Subject: [PATCH 06/13] Style changes to tables --- javascript/main.js | 45 +++++++++++++++++++++++++++++++++------------ styles/style.css | 33 +++++++++++++++++++++++++++++---- 2 files changed, 62 insertions(+), 16 deletions(-) diff --git a/javascript/main.js b/javascript/main.js index e24c9d2..5d286fd 100644 --- a/javascript/main.js +++ b/javascript/main.js @@ -5,6 +5,21 @@ returnDnsDetails(document.getElementById("domain").value, callType) } + function requestTitle(callType){ + if (callType == "getTxt.php") { + return "SPF/TXT Lookup" + } else if (callType == "getMx.php") { + return "MX Lookup" + } else if (callType =="getA.php") { + return "IP Record Lookup" + } + + else { + return callType + } + + } + //Get DNS Details function returnDnsDetails(domain, callType) { //checks for valid input @@ -26,20 +41,26 @@ console.log(dnsResp); console.log(dnsResp.length); - //creates thes the table to store the response details each table has a unique class - $(".responseTable").prepend("
"); - $(".responseRow" + requestNum).append("" + callType + ""); - for (i = 0, len = dnsResp.length; i < len; i++) { - var jsonData = dnsResp[i]; - console.log(jsonData); - - //iterates through object keys - for (j = 0, len = Object.keys(jsonData).length; j < len; j++) { - $(".responseRow" + requestNum).append("" + Object.getOwnPropertyNames(jsonData)[j] + ":" + jsonData[Object.keys(jsonData)[j]] + ""); + if (dnsResp.length == 0) { + $(".responseTable").prepend("
"); + $(".responseRow" + requestNum).append("" + requestTitle(callType) + ""); + $(".responseRow" + requestNum).append("NO DATA FOUND"); + } else { + + //creates thes the table to store the response details each table has a unique class + $(".responseTable").prepend("
"); + $(".responseRow" + requestNum).append("" + requestTitle(callType) + ""); + for (i = 0, len = dnsResp.length; i < len; i++) { + var jsonData = dnsResp[i]; + console.log(jsonData); + + //iterates through object keys + for (j = 0, len = Object.keys(jsonData).length; j < len; j++) { + $(".responseRow" + requestNum).append("" + Object.getOwnPropertyNames(jsonData)[j] + ":" + jsonData[Object.keys(jsonData)[j]] + ""); + } } - } - + } //$(".responseRow" + requestNum).append("" + dnsResp[0].host + ""); diff --git a/styles/style.css b/styles/style.css index 7f92db3..278f2b7 100644 --- a/styles/style.css +++ b/styles/style.css @@ -1,4 +1,6 @@ - +* { + color: #333; +} [class*="responseRow"] { @@ -10,12 +12,35 @@ background-color: #ccc; } -.btn, th { +table { + width: 100%; + border: 0; + border-radius: 10px; +} + +.btn, .thead { background-color: #44c0f0 !important; } +.thead { + text-align: center; + font-weight: bold; + font-size: 1.5em; + color: white; + +} + +.thead { + + border-radius: 10px 10px 0 0; +} + +td { + padding: 5px; + text-align: left; +} -th { - column-span: 2; +.left-row { + width: 60px; } hr { From 7a09ba4d92011ccbda3cb697b96485580ef6b94e Mon Sep 17 00:00:00 2001 From: mikedpicks Date: Mon, 24 Jul 2017 22:12:39 -0500 Subject: [PATCH 07/13] More UI changes, added request seperation. --- index.html | 6 +++--- javascript/main.js | 21 +++++++++++++-------- styles/style.css | 5 +++++ 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/index.html b/index.html index 3ff7808..6a955ca 100644 --- a/index.html +++ b/index.html @@ -40,7 +40,7 @@

SPFToolbox

- Domain:  + Domain:  - +
diff --git a/javascript/main.js b/javascript/main.js index 66bb6c1..1a8abcb 100644 --- a/javascript/main.js +++ b/javascript/main.js @@ -1,8 +1,16 @@ +$(document).ready(function(){ + $("#domain").keyup(function(event){ + if(event.keyCode == 13){ + $("#submit").click(); + } + }); +}); +window.onload = function() { //Counts the number of requests in this session var requestNum = 0; //Choose the correct script to run based on dropdown selection - function callRoute(callType) { - returnDnsDetails(document.getElementById("domain").value, callType) + document.getElementById("submit").onclick = function callRoute() { + returnDnsDetails(document.getElementById("domain").value, document.getElementById("file").value) } function requestTitle(callType){ @@ -79,9 +87,10 @@ } }; - xmlhttp.open("GET", callType + "?domain=" + domain, true); + xmlhttp.open("GET", "http://charlesabarnes.com/SPFtoolbox/" + callType + "?domain=" + domain, true); xmlhttp.send(); } requestNum++; } +} \ No newline at end of file From 8a0641d7812bb8efeb1aeb27983e247d039b900f Mon Sep 17 00:00:00 2001 From: Charles Barnes Date: Tue, 25 Jul 2017 12:20:41 -0500 Subject: [PATCH 10/13] fix data in whois so it shows relevant info in an organized manner --- getWhois.php | 2 +- javascript/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/getWhois.php b/getWhois.php index 3154528..3ecbaab 100644 --- a/getWhois.php +++ b/getWhois.php @@ -11,6 +11,6 @@ $query = $_GET['domain']; $result = $whois->lookup($query); echo "[\n"; -echo json_encode($result, JSON_PRETTY_PRINT); +echo json_encode($result['rawdata'], JSON_PRETTY_PRINT); echo "\n]"; ?> \ No newline at end of file diff --git a/javascript/main.js b/javascript/main.js index 1a8abcb..465c5b9 100644 --- a/javascript/main.js +++ b/javascript/main.js @@ -87,7 +87,7 @@ window.onload = function() { } }; - xmlhttp.open("GET", "http://charlesabarnes.com/SPFtoolbox/" + callType + "?domain=" + domain, true); + xmlhttp.open("GET", callType + "?domain=" + domain, true); xmlhttp.send(); } From f0a909b389a5a38357815dfd6c9af7737c57ec11 Mon Sep 17 00:00:00 2001 From: Charles Barnes Date: Tue, 25 Jul 2017 13:00:37 -0500 Subject: [PATCH 11/13] add github link --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index eb1adba..dec3045 100644 --- a/index.html +++ b/index.html @@ -22,6 +22,7 @@ +
From 3a033c4fe65eca2af9e4d2cb69f6944a01a96e17 Mon Sep 17 00:00:00 2001 From: Charles Barnes Date: Tue, 25 Jul 2017 13:13:02 -0500 Subject: [PATCH 12/13] add github link --- index.html | 2 +- styles/style.css | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index dec3045..964bd46 100644 --- a/index.html +++ b/index.html @@ -22,7 +22,7 @@ - +
diff --git a/styles/style.css b/styles/style.css index 3969c0c..b391999 100644 --- a/styles/style.css +++ b/styles/style.css @@ -1,7 +1,9 @@ * { color: #333; } - +.github-corner{ + color:#fff !important; +} [class*="responseRow"] { background-color: #ccc; From 1b3cf0da7b4ff13b6ac5f770fd39f6408f0fbaa2 Mon Sep 17 00:00:00 2001 From: Charles Barnes Date: Tue, 25 Jul 2017 13:13:13 -0500 Subject: [PATCH 13/13] add github link --- styles/style.css | 3 --- 1 file changed, 3 deletions(-) diff --git a/styles/style.css b/styles/style.css index b391999..96c5049 100644 --- a/styles/style.css +++ b/styles/style.css @@ -1,9 +1,6 @@ * { color: #333; } -.github-corner{ - color:#fff !important; -} [class*="responseRow"] { background-color: #ccc;