-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathshodan_search.java
48 lines (47 loc) · 1.5 KB
/
shodan_search.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import java.net.URL;
import java.util.*;
public class shodan_search {
public static void main(String[]args) throws Exception{
shodan_search.next();
return ;
}
public static void next() throws Exception{
shodan_search.shodansearch();
}
public static void shodansearch() throws Exception{
Scanner input = new Scanner(System.in) ;
System.out.print("Setool-Main//Main Console//Shodan Search//Enter shodan Command:");
String options = input.nextLine() ;
String exit = new String("exit") ;
if(options.equals(exit)){
//qiut
setool.run_main_function();
}else{
shodan_search.submit(options);
input.close();
return ;
}
}
public static void submit(String options) throws Exception{
/*
if (java.awt.Desktop.isDesktopSupported()) {
try {
// make url
java.net.URI uri = java.net.URI.create("https://www.shodan.io/search?query=" + options);
java.awt.Desktop dp = java.awt.Desktop.getDesktop();
if (dp.isSupported(java.awt.Desktop.Action.BROWSE)) {
// start the url
dp.browse(uri) ;
setool.run_main_function();
}
} catch (Exception e) {
e.printStackTrace();
setool.run_main_function();
}
*/
String URL = "https://www.shodan.io/search?query=" + options;
System.out.println("You can Visit: "+ URL);
function.start_webbrowser(URL);
shodan_search.next();
}
}