使用
Java
破解 ip.rtbasia.com 使用SpringBoot
构建服务api
- maven==3.6.3
- java==1.8
- IDEA==2019.3
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>net.lightbody.bmp</groupId>
<artifactId>browsermob-core</artifactId>
<version>2.1.5</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
-
下载项目
git clone git@github.com:yanmengfei/ipspider.git
-
修改配置文件,
./src/main/resources/*.properties
-
开发环境运行
mvn spring-boot:run
-
生产环境运行
mvn clean mvn package java -jar ./target/slide-0.0.1.jar --spring.profiles.active=prod
-
GET =>
/ping
{ "headless": false, "driver": "/Users/meng/meng_config/chromedriver", "timeout": 10 }
-
GET =>
/query
=> QueryString:?ip=39.100.112.108
{ "country": "中国", "province": "河南", "city": "郑州", "org": "移动", "district": "中原区 ", "ip_type": "专用出口" }
-
POST =>
/search
=> Json:{"ips": ["39.100.112.108"]}
{ "117.158.142.120": { "country": "中国", "province": "河南", "city": "郑州", "org": "移动", "district": "中原区 ", "ip_type": "专用出口" } }