-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
047a18f
commit 49208b1
Showing
29 changed files
with
695 additions
and
508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,45 @@ | ||
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.js"></script> | ||
<script type="text/javascript"> | ||
var domain = "google.com"; | ||
var key = "Your dns lookup api apiKey"; | ||
var secret = "Your dns lookup api secretKey"; | ||
var username = "Your dns lookup api username"; | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>DNS Lookup API jQuery Api Key Search Sample</title> | ||
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.js"></script> | ||
<script type="text/javascript"> | ||
|
||
$(function () { | ||
var time = (new Date()).getTime(); | ||
var req = btoa(unescape( | ||
encodeURIComponent(JSON.stringify({t:time,u:username})))); | ||
var digest = CryptoJS.HmacMD5( | ||
username+time+key,secret).toString(CryptoJS.enc.Hex); | ||
$.ajax({ | ||
url: "http://www.whoisxmlapi.com/whoisserver/DNSService", | ||
dataType: "jsonp", | ||
data: {type: "_all", requestObject: req, digest: digest, | ||
domainName: domain, outputFormat: "JSON"}, | ||
complete: function(data) { | ||
$("body").append("<pre>" + JSON.stringify(data, "",2) +"</pre>"); | ||
} | ||
var url = "https://www.whoisxmlapi.com/whoisserver/DNSService"; | ||
var domain = "google.com"; | ||
var username = "Your dns lookup api username"; | ||
var key = "Your dns lookup api key"; | ||
var secret = "Your dns lookup api secret key"; | ||
var type = "_all"; | ||
|
||
$(function() { | ||
var time = (new Date()).getTime(); | ||
var json = JSON.stringify({t: time, u: username}); | ||
var req = btoa(unescape(encodeURIComponent(json))); | ||
|
||
var digest = CryptoJS.HmacMD5(username + time + key, secret) | ||
.toString(CryptoJS.enc.Hex); | ||
$.ajax( | ||
{ | ||
url: url, | ||
dataType: "jsonp", | ||
data: { | ||
type: type, | ||
requestObject: req, | ||
digest: digest, | ||
domainName: domain, | ||
outputFormat: "JSON" | ||
}, | ||
complete: function(data) { | ||
$("body").append( | ||
"<pre>" + JSON.stringify(data,null,2) + "</pre>"); | ||
} | ||
} | ||
); | ||
}); | ||
}); | ||
</script> | ||
|
||
</script> | ||
</head> | ||
<body></body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.