更新短网址

This commit is contained in:
Coody
2020-01-16 17:34:01 +08:00
parent 265165733c
commit f9b03ce123
3 changed files with 110 additions and 106 deletions

View File

@@ -1,29 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"> <classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> <classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes> <attributes>
<attribute name="test" value="true"/> <attribute name="test" value="true"/>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<classpathentry kind="output" path="target/classes"/> <attributes>
</classpath> <attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@@ -1,43 +1,43 @@
package com.imxss.web.service; package com.imxss.web.service;
import org.coody.framework.context.annotation.CacheWrite; import org.coody.framework.context.annotation.CacheWrite;
import org.coody.framework.context.entity.HttpEntity; import org.coody.framework.context.entity.HttpEntity;
import org.coody.framework.context.entity.MsgEntity; import org.coody.framework.context.entity.MsgEntity;
import org.coody.framework.util.HttpUtil; import org.coody.framework.util.HttpUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
@Service @Service
public class SortUrlService { public class SortUrlService {
@CacheWrite(fields = "url", time = 72000) @CacheWrite(fields = "url", time = 72000)
public String getSortUrl(String url) { public String getSortUrl(String url) {
try { try {
return getSortUrlImplSina(url); return getSortUrlImplSina(url);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return null; return null;
} }
} }
private String getSortUrlImplSina(String url) { private String getSortUrlImplSina(String url) {
try { try {
HttpEntity entity = HttpUtil HttpEntity entity = HttpUtil
.Get("http://ln.mk/short/create?unionId=3056c4478c744127bc8cd0fadf603d29&url=" + url.replace("http:", "").replace("https:", "")); .Get("http://ln.mk/short/create?unionId=4149bfc7df0c496c84715714e02914f5&url=" + url.replace("http:", "").replace("https:", ""));
String html = entity.getHtml(); String html = entity.getHtml();
System.out.println(html); System.out.println(html);
MsgEntity result=JSON.parseObject(html, MsgEntity.class); MsgEntity result=JSON.parseObject(html, MsgEntity.class);
String sortUrl = result.getDatas().toString(); String sortUrl = result.getDatas().toString();
sortUrl = sortUrl.replace("http:", ""); sortUrl = sortUrl.replace("http:", "");
return sortUrl; return sortUrl;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return null; return null;
} }
} }
public static void main(String[] args) { public static void main(String[] args) {
System.out.println(new SortUrlService().getSortUrl("http://imxss.com/")); System.out.println(new SortUrlService().getSortUrl("http://imxss.com/"));
} }
} }

View File

@@ -1,34 +1,34 @@
ImXSS产品说明 ImXSS产品说明
主要定位Xss跨站脚本漏洞测试 主要定位Xss跨站脚本漏洞测试
解决问题测试人员对XSS漏洞测试需要一个平台支撑 解决问题测试人员对XSS漏洞测试需要一个平台支撑
核心理念:维护国内网络安全 核心理念:维护国内网络安全
技术说明: 技术说明:
ImXSS基于国外Spring开源框架二次开发 ImXSS基于国外Spring开源框架二次开发
自主框架Coody 自主框架Coody
包括simple-edbc多主从orm开源框架 包括simple-edbc多主从orm开源框架
包括simple-cache轻量化可拓展缓存 包括simple-cache轻量化可拓展缓存
包括simple-debug在线热维护系统(已申请技术专利,审核中) 包括simple-debug在线热维护系统(已申请技术专利,审核中)
持有高性能,低负载,稳定,高研发效率,高可拓展等特征。 持有高性能,低负载,稳定,高研发效率,高可拓展等特征。
1、请将本项目打包成War 1、请将本项目打包成War
2、放置Tomcat下运行即可 2、放置Tomcat下运行即可
3、项目运行后访问安装。 3、项目运行后访问安装。
4、JDK版本1.8、Tomcat版本8 4、JDK版本1.8、Tomcat版本8