@@ -18,52 +18,52 @@ A `Java` version of the `SDK`, based on the [`FOFA Pro API`](https://fofa.so/api
1818< dependency>
1919 < groupId> com. r4v3zn. fofa< / groupId>
2020 < artifactId> fofa- core< / artifactId>
21- < version> 1.0 . 5 . RELEASE</ version>
21+ < version> 1.0 . 6 . RELEASE</ version>
2222< / dependency>
2323```
2424
2525### Gradle Groovy DSL
2626
2727``` java
28- implementation ' com.r4v3zn.fofa:fofa-core:1.0.5 .RELEASE'
28+ implementation ' com.r4v3zn.fofa:fofa-core:1.0.6 .RELEASE'
2929```
3030
3131### Gradle Kotlin DSL
3232
3333``` java
34- implementation(" com.r4v3zn.fofa:fofa-core:1.0.5 .RELEASE" )
34+ implementation(" com.r4v3zn.fofa:fofa-core:1.0.6 .RELEASE" )
3535```
3636
3737### Scala SBT
3838
3939``` java
40- libraryDependencies += " com.r4v3zn.fofa" % " fofa-core" % " 1.0.5 .RELEASE"
40+ libraryDependencies += " com.r4v3zn.fofa" % " fofa-core" % " 1.0.6 .RELEASE"
4141```
4242
4343### Apache Ivy
4444
4545``` java
46- < dependency org= " com.r4v3zn.fofa" name= " fofa-core" rev= " 1.0.5 .RELEASE" / >
46+ < dependency org= " com.r4v3zn.fofa" name= " fofa-core" rev= " 1.0.6 .RELEASE" / >
4747```
4848
4949### Groovy Grape
5050
5151``` java
5252@Grapes (
53- @Grab (group = ' com.r4v3zn.fofa' , module = ' fofa-core' , version = ' 1.0.5 .RELEASE' )
53+ @Grab (group = ' com.r4v3zn.fofa' , module = ' fofa-core' , version = ' 1.0.6 .RELEASE' )
5454)
5555```
5656
5757### Leiningen
5858
5959``` java
60- [com. r4v3zn. fofa/ fofa- core " 1.0.5 .RELEASE" ]
60+ [com. r4v3zn. fofa/ fofa- core " 1.0.6 .RELEASE" ]
6161```
6262
6363### Apache Buildr
6464
6565``` java
66- ' com.r4v3zn.fofa:fofa-core:jar:1.0.5 .RELEASE'
66+ ' com.r4v3zn.fofa:fofa-core:jar:1.0.6 .RELEASE'
6767```
6868
6969### Maven Central Badge
@@ -75,15 +75,15 @@ libraryDependencies += "com.r4v3zn.fofa" % "fofa-core" % "1.0.5.RELEASE"
7575### PURL
7676
7777```java
78- pkg: maven/ com. r4v3zn. fofa/ fofa- core@1 . 0.5 . RELEASE
78+ pkg: maven/ com. r4v3zn. fofa/ fofa- core@1 . 0.6 . RELEASE
7979```
8080
8181### Bazel
8282
8383```java
8484maven_jar(
8585 name = " fofa-core" ,
86- artifact = " com.r4v3zn.fofa:fofa-core:1.0.5 .RELEASE" ,
86+ artifact = " com.r4v3zn.fofa:fofa-core:1.0.6 .RELEASE" ,
8787 sha1 = " 151fc5fe259ccad55c040ed46d40b9bc19dd6b32" ,
8888)
8989```
@@ -95,7 +95,7 @@ maven_jar(
9595| `email` | User login [`FOFA Pro `](https: // fofa.so) mailbox `Email`|
9696| `key`| Please go to the [`personal center`](https: // fofa.so/user/users/info) to view `API Key`|
9797
98- ### get user info
98+ ### User info
9999
100100```java
101101public static void main(String [] args) throws Exception {
@@ -108,7 +108,7 @@ public static void main(String[] args) throws Exception {
108108}
109109```
110110
111- ### get data
111+ ### Search all
112112
113113#### Code
114114
@@ -118,20 +118,80 @@ public static void main(String[] args) throws Exception {
118118 String email = " " ;
119119 // FOFA Pro key
120120 String key = " " ;
121- String q = " app=\" Solr\" " ;
122- FofaClient client = new FofaClient (email, key);
123- System . out. println(client. getData(q));
121+ BASE_URL = " https://fofa.info" ;
122+ FofaClient fofaClient = new FofaClient (email, key);
123+ FofaSearch fofaSearch = new FofaSearch (fofaClient);
124+ String query = " host=\" fofa.info\" " ;
125+ System . out. println(fofaSearch. all(query));
126+ }
127+ ```
128+
129+ #### Response
130+
131+ ```java
132+ FofaData{mode='extended', page=1, size=74, totalPage=1, query='host="fofa.info"', results=[www.fofa.info, fofa.info, static.fofa.info, https://static.fofa.info, https://fofa.info, api.fofa.info, api.jw.fofa.info:7088, api.g.fofa.info:88, api.jw.fofa.info:88, api.g.fofa.info:8084, api.jw.fofa.info:84, api.jw.fofa.info:81, api.jw.fofa.info:8003, api.g.fofa.info:8083, api.g.fofa.info:7088, api.g.fofa.info:808, https://g.fofa.info, api.jw.fofa.info:8181, https://jw.fofa.info, api.g.fofa.info:8003, api.jw.fofa.info:8083, https://img.gamma.fofa.info, api.g.fofa.info:81, api.g.fofa.info:7070, api.jw.fofa.info:8084, api.jw.fofa.info:808, api.g.fofa.info:8181, api.jw.fofa.info:7070, img.gamma.fofa.info, jw.fofa.info, g.fofa.info, api.g.fofa.info:84, https://35.81.36.22:443, 47.93.92.246:88, https://140.249.61.184:443, 47.93.92.246:808, 47.93.92.246:8003, 47.93.92.246:81, https://106.75.10.35:443, 106.75.10.35:80, 47.93.92.246:7088, 47.93.92.246:84, 140.249.61.184:80, 47.93.92.246:8181, 47.93.92.246:8084, 47.93.92.246:88, 47.93.92.246:7070, 47.93.92.246:81, 47.93.92.246:7070, 47.93.92.246:84, 47.93.92.246:8084, 47.93.92.246:8003, 47.93.92.246:8083, 106.75.10.35:80, 47.93.92.246:808, 47.93.92.246:8083, 47.93.92.246:8181, 47.93.92.246:7088, https://gamma.fofa.info, https://api.gamma.fofa.info, gamma.fofa.info, api.gamma.fofa.info, 1.71.148.8:80, https://1.71.148.8:443, https://79.168.42.251:443, 122.143.5.67:80, https://api.fofa.info, 81.150.11.126:22, www.fofa.info:6443, 117.50.16.112:80, 150.138.167.141:6443, 117.50.16.112:80, https://117.50.16.112:443, https://117.50.16.112:443]}
133+ ```
134+
135+ ### Search stats agg
136+
137+ #### Code
138+
139+ ```java
140+ public static void main(String [] args) throws Exception {
141+ // FOFA Pro email
142+ String email = " " ;
143+ // FOFA Pro key
144+ String key = " " ;
145+ BASE_URL = " https://fofa.info" ;
146+ FofaClient fofaClient = new FofaClient (email, key);
147+ FofaSearch fofaSearch = new FofaSearch (fofaClient);
148+ String query = " host=\" fofa.info\" " ;
149+ System . out. println(fofaSearch. stats(query));
124150}
125151```
126152
127153#### Response
128154
129155```java
130- FofaData{mode='extended', page=1, size=8578, totalPage=86, query='app="Solr"', results=[52.204.201.10:8080, 39.106.133.253:8081, 168.61.45.247:3000, 185.145.32.101:9090, 47.92.153.193:8083, https://54.177.198.16:9443, https://46.137.115.176, 109.202.145.150:9090, 18.229.36.175, https://52.65.18.222, 94.103.24.81, 128.119.168.198:8080, 45.56.107.121:8090, 159.65.33.96:8080, 165.28.246.132, 34.205.15.100:8080, 3.89.155.86, 101.200.142.15:8099, 45.56.91.166:8090, 107.21.102.229, 89.28.161.145:8083, 35.165.137.220, 162.243.2.73:32768, 3.82.255.95:8080, 52.22.6.26, 96.126.97.74:8090, https://solr.swoonery.com, 63.34.225.181:8083, 18.223.238.90:7777, 167.99.252.65:8081, 18.232.114.197, 96.126.104.116:8090, 52.17.255.254, 101.201.145.141:8888, 13.228.98.189, 52.66.197.212:8081, 34.226.45.218:9443, 36.111.196.193:8082, 52.80.87.182, 97.107.133.44:8090, 173.255.217.135:8080, 34.199.97.120:8081, 52.17.131.156, https://13.55.200.182:443, 23.23.104.210, 54.68.95.160, https://54.77.13.29:8082, 66.175.209.109:8090, 52.200.107.211:8080, 104.130.124.46:7777, 192.231.177.172:8090, 54.221.155.2, 203.135.191.199:8080, 218.93.127.8:9080, 101.251.241.194:8081, 115.79.204.120:8888, 39.106.23.13:8180, https://52.16.231.131:8080, 52.5.53.165:8080, 39.106.180.220:8180, 52.67.86.138, https://52.26.130.143, 52.37.105.68, 23.239.19.16:8090, 52.58.193.2, 168.218.15.134, 52.44.108.125:9443, 76.210.250.82:32768, 52.71.163.53, 92.243.20.10:8080, 157.249.39.129, www.marineparts.us:8983, 185.135.12.139:8080, 123.207.239.114:8082, 66.175.209.253:8090, 66.175.209.38:8090, 173.255.223.210:8090, 14.29.118.239:20000, 70.142.24.61:8080, 3.87.173.6:8001, 47.107.106.243:20000, 101.201.117.191, 118.190.215.162, 116.203.141.150:8080, 58.250.149.11:8085, 3.88.123.255, 173.255.216.58:8090, 14.139.13.78:8080, 54.149.94.198, 142.93.183.248:8082, 216.47.157.209:8090, 202.202.240.113:7777, 198.101.238.25:8080, 52.66.72.8:8888, 92.243.20.10:8081, 23.239.23.20:8090, 39.107.94.23:8888, 79.137.82.228:8083, 120.55.191.189:8010, 52.21.16.23:8080]}
156+ StatsData{distinct={ip=16}, aggs={countries=[{code=aG9zdD0iZm9mYS5pbmZvIiAmJiBjb3VudHJ5PSJDTiI=, count=71, name=China, name_code=CN, regions=[{code=aG9zdD0iZm9mYS5pbmZvIiAmJiByZWdpb249IkJlaWppbmci, count=41, name=Beijing}, {code=aG9zdD0iZm9mYS5pbmZvIiAmJiByZWdpb249IiI=, count=27, name=Unknown}, {code=aG9zdD0iZm9mYS5pbmZvIiAmJiByZWdpb249Ikd1YW5nZG9uZyI=, count=2, name=Guangdong}, {code=aG9zdD0iZm9mYS5pbmZvIiAmJiByZWdpb249IkppbGluIg==, count=1, name=Jilin}]}, {code=aG9zdD0iZm9mYS5pbmZvIiAmJiBjb3VudHJ5PSJHQiI=, count=1, name=United Kingdom of Great Britain and Northern Ireland, name_code=GB, regions=[{code=aG9zdD0iZm9mYS5pbmZvIiAmJiByZWdpb249IiI=, count=1, name=Unknown}]}, {code=aG9zdD0iZm9mYS5pbmZvIiAmJiBjb3VudHJ5PSJQVCI=, count=1, name=Portugal, name_code=PT, regions=[{code=aG9zdD0iZm9mYS5pbmZvIiAmJiByZWdpb249Ikxpc2JvbiI=, count=1, name=Lisbon}]}, {code=aG9zdD0iZm9mYS5pbmZvIiAmJiBjb3VudHJ5PSJVUyI=, count=1, name=United States of America, name_code=US, regions=[{code=aG9zdD0iZm9mYS5pbmZvIiAmJiByZWdpb249Ik9yZWdvbiI=, count=1, name=Oregon}]}]}}
157+ ```
158+
159+ ### Host Agg
160+
161+ #### Code
162+
163+ ```java
164+ public static void main(String [] args) throws Exception {
165+ // FOFA Pro email
166+ String email = " " ;
167+ // FOFA Pro key
168+ String key = " " ;
169+ BASE_URL = " https://fofa.info" ;
170+ FofaClient fofaClient = new FofaClient (email, key);
171+ FofaHost fofaHost = new FofaHost (fofaClient);
172+ String host = " fofa.info" ;
173+ System . out. println(fofaHost. host(host));
174+ }
175+ ```
176+
177+ #### Response
178+
179+ ```
180+ HostData {host= ' fofa.info' , ip= ' 124.239.250.54' , asn= 58539 , org= ' null' , countryName= ' China' , countryCode= ' CN' , protocol= [http, https, ssh], port= [443 , 22 , 8080 , 9527 , 8069 , 8089 , 80 ], category= null , product= null }
131181```
132182
133183## Update Log
134184
185+ 2022 - 05 - 29
186+
187+ ```
188+ - add search stats api
189+ - add host api
190+ - add search fields
191+ - Update jackson version
192+ - fix bug
193+ ```
194+
1351952022 - 01 - 27
136196
137197 - update fofa
0 commit comments