Skip to content

Commit d8c3f68

Browse files
author
woo0nise
committed
add fofa-java
1 parent 4c6804d commit d8c3f68

File tree

87 files changed

+11910
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+11910
-0
lines changed

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,49 @@
11
# fofa-java
22
This is a FOFA Pro Java SDK
3+
4+
## Maven
5+
```
6+
<dependency>
7+
<groupId>com.r4v3zn.fofa</groupId>
8+
<artifactId>fofa-core</artifactId>
9+
<version>1.0.0</version>
10+
</dependency>
11+
```
12+
13+
## USE
14+
15+
## get user Info
16+
17+
```java
18+
public static void main(String[] args) throws Exception {
19+
// FOFA Pro email
20+
String email = "";
21+
// FOFA Pro key
22+
String key = "";
23+
FofaClient client = new FofaClient(email, key);
24+
System.out.println(client.getUser());
25+
}
26+
```
27+
28+
29+
## get data
30+
31+
### Code
32+
33+
```java
34+
public static void main(String[] args) throws Exception {
35+
// FOFA Pro email
36+
String email = "";
37+
// FOFA Pro key
38+
String key = "";
39+
String q = "app=\"Solr\"";
40+
FofaClient client = new FofaClient(email, key);
41+
System.out.println(client.getData(q));
42+
}
43+
```
44+
45+
## Response
46+
47+
```java
48+
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]}
49+
```

fofa-core.iml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4" />

pom.xml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<groupId>com.r4v3zn.fofa</groupId>
7+
<artifactId>fofa-core</artifactId>
8+
<name>fofa-java</name>
9+
<description>Thi is a FOFA Pro SDK</description>
10+
<url>https://github.com/0nise/fofa-java</url>
11+
<version>1.0.0</version>
12+
<licenses>
13+
<license>
14+
<name>The Apache Software License, Version 2.0</name>
15+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
16+
</license>
17+
</licenses>
18+
<developers>
19+
<developer>
20+
<name>R4v3zn</name>
21+
<email>woo0nise@foxmail.com</email>
22+
</developer>
23+
</developers>
24+
<dependencies>
25+
<!-- jackson -->
26+
<dependency>
27+
<groupId>com.fasterxml.jackson.core</groupId>
28+
<artifactId>jackson-core</artifactId>
29+
<version>2.9.9</version>
30+
</dependency>
31+
<dependency>
32+
<groupId>com.fasterxml.jackson.core</groupId>
33+
<artifactId>jackson-databind</artifactId>
34+
<version>2.9.9</version>
35+
</dependency>
36+
</dependencies>
37+
<distributionManagement>
38+
<snapshotRepository>
39+
<id>oss</id>
40+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
41+
</snapshotRepository>
42+
<repository>
43+
<id>oss</id>
44+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
45+
</repository>
46+
</distributionManagement>
47+
<issueManagement>
48+
<system>Github Issue</system>
49+
<url>https://github.com/0nise/fofa-java/issues</url>
50+
</issueManagement>
51+
<scm>
52+
<connection>scm:git:https://github.com/0nise/fofa-java.git</connection>
53+
<developerConnection>scm:git:https://github.com/0nise/fofa-java.git</developerConnection>
54+
<url>https://github.com/0nise/fofa-java.git</url>
55+
</scm>
56+
<profiles>
57+
<profile>
58+
<id>release</id>
59+
<activation>
60+
<activeByDefault>true</activeByDefault>
61+
</activation>
62+
<distributionManagement>
63+
<snapshotRepository>
64+
<id>oss</id>
65+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
66+
</snapshotRepository>
67+
<repository>
68+
<id>oss</id>
69+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
70+
</repository>
71+
</distributionManagement>
72+
<build>
73+
<plugins>
74+
<!-- Source -->
75+
<plugin>
76+
<groupId>org.apache.maven.plugins</groupId>
77+
<artifactId>maven-source-plugin</artifactId>
78+
<version>3.0.1</version>
79+
<executions>
80+
<execution>
81+
<phase>package</phase>
82+
<goals>
83+
<goal>jar-no-fork</goal>
84+
</goals>
85+
</execution>
86+
</executions>
87+
</plugin>
88+
<!-- Javadoc -->
89+
<plugin>
90+
<groupId>org.apache.maven.plugins</groupId>
91+
<artifactId>maven-javadoc-plugin</artifactId>
92+
<version>3.0.0</version>
93+
<executions>
94+
<execution>
95+
<phase>package</phase>
96+
<goals>
97+
<goal>jar</goal>
98+
</goals>
99+
</execution>
100+
</executions>
101+
</plugin>
102+
<!-- Gpg Signature -->
103+
<plugin>
104+
<groupId>org.apache.maven.plugins</groupId>
105+
<artifactId>maven-gpg-plugin</artifactId>
106+
<version>1.6</version>
107+
<executions>
108+
<execution>
109+
<id>sign-artifacts</id>
110+
<phase>verify</phase>
111+
<goals>
112+
<goal>sign</goal>
113+
</goals>
114+
</execution>
115+
</executions>
116+
</plugin>
117+
</plugins>
118+
</build>
119+
</profile>
120+
</profiles>
121+
</project>
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
package com.r4v3zn.fofa.core.DO;
2+
3+
import java.util.List;
4+
5+
/**
6+
* Title: FofaData
7+
* Descrption: this is fofa datas
8+
* Date:2019-06-08 17:49
9+
* Email:woo0nise@gmail.com
10+
* Company:www.j2ee.app
11+
*
12+
* @author R4v3zn
13+
* @version 1.0.0
14+
*/
15+
public class FofaData {
16+
17+
/**
18+
* mode
19+
*/
20+
private String mode;
21+
22+
/**
23+
* current page no
24+
*/
25+
private Integer page;
26+
27+
/**
28+
* total size
29+
*/
30+
private Integer size;
31+
32+
/**
33+
* total page
34+
*/
35+
private Integer totalPage;
36+
37+
/**
38+
* query
39+
*/
40+
private String query;
41+
42+
/**
43+
* results
44+
*/
45+
private List<List<String>> results;
46+
47+
public void setQuery(String query) {
48+
this.query = query;
49+
}
50+
51+
public String getQuery() {
52+
return query;
53+
}
54+
55+
public void setTotalPage(Integer totalPage) {
56+
this.totalPage = totalPage;
57+
}
58+
59+
public Integer getTotalPage() {
60+
return totalPage;
61+
}
62+
63+
public String getMode() {
64+
return mode;
65+
}
66+
67+
public Integer getPage() {
68+
return page;
69+
}
70+
71+
public Integer getSize() {
72+
return size;
73+
}
74+
75+
public List<List<String>> getResults() {
76+
return results;
77+
}
78+
79+
public void setResults(List<List<String>> results) {
80+
this.results = results;
81+
}
82+
83+
public void setMode(String mode) {
84+
this.mode = mode;
85+
}
86+
87+
public void setPage(Integer page) {
88+
this.page = page;
89+
}
90+
91+
public void setSize(Integer size) {
92+
this.size = size;
93+
}
94+
95+
@Override
96+
public String toString() {
97+
return "FofaData{" +
98+
"mode='" + mode + '\'' +
99+
", page=" + page +
100+
", size=" + size +
101+
", totalPage=" + totalPage +
102+
", query='" + query + '\'' +
103+
", results=" + results +
104+
'}';
105+
}
106+
}

0 commit comments

Comments
 (0)