FOFA Pro java SDK

开源地址

https://github.com/fofapro/fofa-java

FOFA Pro API

FOFA Pro API 是资产搜索引擎 FOFA Pro 为开发者提供的 RESTful API 接口, 允许开发者在自己的项目中集成 FOFA Pro 的功能。

FOFA SDK

基于 FOFA Pro API 编写的 javaSDK, 方便 java 开发者快速将 FOFA Pro 集成到自己的项目中。

添加依赖

Apache Maven

1
2
3
4
5
<dependency>
<groupId>com.r4v3zn.fofa</groupId>
<artifactId>fofa-core</artifactId>
<version>1.0.0</version>
</dependency>

Gradle Groovy DSL

1
implementation 'com.r4v3zn.fofa:fofa-core:1.0.0'

Gradle Kotlin DSL

1
compile("com.r4v3zn.fofa:fofa-core:1.0.0")

Scala SBT

1
libraryDependencies += "com.r4v3zn.fofa" % "fofa-core" % "1.0.0"

Apache Ivy

1
<dependency org="com.r4v3zn.fofa" name="fofa-core" rev="1.0.0" />

Groovy Grape

1
2
3
@Grapes(
@Grab(group='com.r4v3zn.fofa', module='fofa-core', version='1.0.0')
)

Leiningen

1
[com.r4v3zn.fofa/fofa-core "1.0.0"]

Apache Buildr

1
'com.r4v3zn.fofa:fofa-core:jar:1.0.0'

Maven Central Badge

1
[![Maven Central](https://img.shields.io/maven-central/v/com.r4v3zn.fofa/fofa-core.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.r4v3zn.fofa%22%20AND%20a:%22fofa-core%22)

PURL

1
pkg:maven/com.r4v3zn.fofa/[email protected]1.0.0

Bazel

1
2
3
4
5
maven_jar(
name = "fofa-core",
artifact = "com.r4v3zn.fofa:fofa-core:1.0.0",
sha1 = "93b888a1d1c42c696f60f246585609d66f72eb8b",
)

使用

字段名称 描述
email 用户登陆 FOFA Pro 使用的 Email
key 前往 个人中心 查看 API Key

获取用户信息

1
2
3
4
5
6
7
8
public static void main(String[] args) throws Exception {
// FOFA Pro email
String email = "";
// FOFA Pro key
String key = "";
FofaClient client = new FofaClient(email, key);
System.out.println(client.getUser());
}

获取FOFA Pro 搜索结果

代码

1
2
3
4
5
6
7
8
9
public static void main(String[] args) throws Exception {
// FOFA Pro email
String email = "";
// FOFA Pro key
String key = "";
String q = "app=\"Solr\"";
FofaClient client = new FofaClient(email, key);
System.out.println(client.getData(q));
}

响应

1
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]}

更新日志

2019-06-12

- 添加中文文档

2019-06-11

- 修改开发者信息
- 删除hutool-http依赖