Sinisterly
Shodanier - A expanded version of Shodan search engine - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Hacking (https://sinister.li/Forum-Hacking)
+--- Forum: Hacking Tools (https://sinister.li/Forum-Hacking-Tools)
+---- Forum: Hacxx's Posts (https://sinister.li/Forum-Hacxx-s-Posts)
+---- Thread: Shodanier - A expanded version of Shodan search engine (/Thread-Shodanier-A-expanded-version-of-Shodan-search-engine)

Pages: 1 2 3 4


RE: Shodanier - A expanded version of Shodan search engine - zorrophreak - 12-29-2018

The lack of information with your Shodanier script has always been what made me stick with regular Shodan but its still a really great script. As always, thanks for the share!

(12-29-2018, 07:15 PM)samuraje77 Wrote: can a friend tell me what code to enter the "shodanier"

Like what type of device I believe, webcam, radio, router, etc...


RE: Shodanier - A expanded version of Shodan search engine - samuraje77 - 12-29-2018

for (x in myObj.matches) {

document.write('<a href="http://'+ myObj.matches[x].ip_str +'" target="_blank">'+ myObj.matches[x].ip_str +'</a><br>');
}
document.write('</td></tr></table></center>');
document.write('</center></center></div></body></html>');
}
};
xmlhttp.open("GET", "https://api.shodan.io/shodan/host/search?key=CevVNIYrV6gUzMoxiMhcaO3JIJOmpCY1&facets=&query="+keyword+"", true);
xmlhttp.send();
}
</script>

it should be changed to the script to show it
for example
92.249.157.142 (en)
95.226.165.10 (en)
92.80.22.33 (ro)
188.6.25.13 (en)
151.74.211.160 (en)
2.232.250.212 (en)
83.41.182.143 (es)


RE: Shodanier - A expanded version of Shodan search engine - hacxx - 12-29-2018

@samuraje77 - You have to program in JSON. Point the XmlHTTP query to a hoster you control (http://127.0.0.1 or http://yoursite.com) and format the text to a JSON string.

Code:
{"name":"John", "age":31, "city":"New York"}



RE: Shodanier - A expanded version of Shodan search engine - samuraje77 - 12-29-2018

I do not know how to program a friend, can you make a shodanier edit your friend to see the name of the state next to the IP address?


RE: Shodanier - A expanded version of Shodan search engine - hacxx - 12-29-2018

Yes, just add the ip string to the html page


RE: Shodanier - A expanded version of Shodan search engine - samuraje77 - 12-29-2018

<script>
var keyword = prompt("Type a targeted keyword!", "radio");
if (keyword != null) {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var myObj = JSON.parse(this.responseText);
document.write("<html><head><title>Shodani


document.write('<a href="http://'+ myObj.matches[x].ip_str +'" target="_blank">'+ myObj.matches[x].ip_str +'</a><br>');
}
document.write('</td></tr></table></center>');
document.write('</center></center></div></body></html>');
}
};
xmlhttp.open("GET", "https://api.shodan.io/shodan/host/search?key=CevVNIYrV6gUzMoxiMhcaO3JIJOmpCY1&facets=&query="+keyword+"", true);
xmlhttp.send();
}
</script>
my friend, where in the script to add this
{"name":"John", "age":31, "city":"New York"} ?????


RE: Shodanier - A expanded version of Shodan search engine - hacxx - 12-30-2018

No, it doesn't work that way.

The JSON entry must be hosted in a server and then use the script above to get the JSON data.

Here is the script disassembled.

Defines a keyword in the prompt.
Code:
var keyword = prompt("Type a targeted keyword!", "radio");

Starts the script if not equal to null
Code:
if (keyword != null) {

Starts the xmlhttp
Code:
var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) {

Specifies that the JSON string has a object myObj.
(This object must exist inside the JSON string)

Code:
var myObj = JSON.parse(this.responseText);

Overwrittes the html page with a new one
Code:
document.write("<html><head><title>Shodani....

Make a hyperlink with a JSON object called ip_str inside matches inside myObj
Code:
document.write('<a href="http://'+ myObj.matches[x].ip_str +'" target="_blank">'+ myObj.matches[x].ip_str +'</a><br>');

HTML CODE
Code:
document.write('</td></tr></table></center>'); document.write('</center></center></div></body></html>');

Url to request the JSON String
Code:
xmlhttp.open("GET", "https://api.shodan.io/shodan/host/search?key=CevVNIYrV6gUzMoxiMhcaO3JIJOmpCY1&facets=&query="+keyword+"", true);

TIP: I was trying to comment the keys as they appear on your post but it's missing code. Hope it highlights all the important questions.


RE: Shodanier - A expanded version of Shodan search engine - samuraje77 - 12-30-2018

probably the google translate does not translate well. Interestingly, in the script can be entered a code that would show country_code with an ip address. Here is the shodanier version 1 because it is shorter. And where should the code be written to show country_code with ip address?

<script>
var keyword = prompt("Type targeted keyword!", "radio");
if (keyword != null) {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var myObj = JSON.parse(this.responseText);
document.write('<center><table><tr><td>');
for (x in myObj.matches) {

document.write(''+ myObj.matches[x].ip_str +'<br>');
}
document.write('</td></tr></table></center>');
}
};
xmlhttp.open("GET", "https://api.shodan.io/shodan/host/search?key=CevVNIYrV6gUzMoxiMhcaO3JIJOmpCY1&facets=&query="+keyword+"", true);
xmlhttp.send();
}
</script>


RE: Shodanier - A expanded version of Shodan search engine - hacxx - 12-30-2018

The API is not working for a few days now. But, teorically it should be myObj.matches[x].country or something similar.

Note: The change should be at this line inside the while loop

Code:
for (x in myObj.matches) { document.write(''+ myObj.matches[x].country +'<br>'); }

Note 2: The code inside the document.write is HTML + variables


RE: Shodanier - A expanded version of Shodan search engine - hacxx - 12-30-2018

Hi, got access to the API. The object is "country_name ".

Here is the code:
Code:
for (x in myObj.matches) { document.write(''+ myObj.matches[x].country_name +'<br>'); }

This will give you a diferent text for each search. For Example: "Korea, Republic of", "Bulgaria", etc

Also you can use
Code:
myObj.matches[x].country_code <- Gives the country code. Example: KR myObj.matches[x].isp <- Gives the IP ISP name