更新短网址

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"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<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;
import org.coody.framework.context.annotation.CacheWrite;
import org.coody.framework.context.entity.HttpEntity;
import org.coody.framework.context.entity.MsgEntity;
import org.coody.framework.util.HttpUtil;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSON;
@Service
public class SortUrlService {
@CacheWrite(fields = "url", time = 72000)
public String getSortUrl(String url) {
try {
return getSortUrlImplSina(url);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
private String getSortUrlImplSina(String url) {
try {
HttpEntity entity = HttpUtil
.Get("http://ln.mk/short/create?unionId=3056c4478c744127bc8cd0fadf603d29&url=" + url.replace("http:", "").replace("https:", ""));
String html = entity.getHtml();
System.out.println(html);
MsgEntity result=JSON.parseObject(html, MsgEntity.class);
String sortUrl = result.getDatas().toString();
sortUrl = sortUrl.replace("http:", "");
return sortUrl;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static void main(String[] args) {
System.out.println(new SortUrlService().getSortUrl("http://imxss.com/"));
}
}
package com.imxss.web.service;
import org.coody.framework.context.annotation.CacheWrite;
import org.coody.framework.context.entity.HttpEntity;
import org.coody.framework.context.entity.MsgEntity;
import org.coody.framework.util.HttpUtil;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSON;
@Service
public class SortUrlService {
@CacheWrite(fields = "url", time = 72000)
public String getSortUrl(String url) {
try {
return getSortUrlImplSina(url);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
private String getSortUrlImplSina(String url) {
try {
HttpEntity entity = HttpUtil
.Get("http://ln.mk/short/create?unionId=4149bfc7df0c496c84715714e02914f5&url=" + url.replace("http:", "").replace("https:", ""));
String html = entity.getHtml();
System.out.println(html);
MsgEntity result=JSON.parseObject(html, MsgEntity.class);
String sortUrl = result.getDatas().toString();
sortUrl = sortUrl.replace("http:", "");
return sortUrl;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static void main(String[] args) {
System.out.println(new SortUrlService().getSortUrl("http://imxss.com/"));
}
}

View File

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