資源簡介
demo中包含js埋點,通過該技術可以在對頁面影響最小的情況下收集信息
代碼片段和文件信息
package?cn.tedu.xx;
import?java.util.regex.Matcher;
import?java.util.regex.Pattern;
public?class?DDD?{
public?static?void?main(String[]?args)?{
String?pre?=?“^(?:[^\\|]*\\|){15}(?:[^\\|]*_[^\\|]*_([^\\|]*)\\|)[^\\|]*$“;
String?str?=?“9999|http://hadoop01/demo/a.jsp|a.jsp|頁面A|utf-8|1536x864|32-bit|zh-cn|1|1|10.0|0.8854856940742033||Mozilla/4.0?(compatible;?MSIE?7.0;?Windows?NT?10.0;?WOW64;?Trident/8.0;?Touch;?.NET4.0C;?.NET4.0E;?.NET?CLR?2.0.50727;?.NET?CLR?3.0.30729;?.NET?CLR?3.5.30729;?InfoPath.3;?Tablet?PC?2.0)|30124168496535978032|7622515780_0_1480734576|192.168.242.1“;
System.out.println(str.matches(pre));
Pattern?p?=?Pattern.compile(pre);
Matcher?matcher?=?p.matcher(str);
//查找匹配的子串
matcher.find();
int?count?=?matcher.groupCount();
System.out.println(count);
for(int?i?=?0;i<=count;i++){
String?s?=?matcher.group(i);
System.out.println(s);
}
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????529??2017-01-09?08:34??demo\.classpath
?????文件????????285??2017-05-22?14:30??demo\.myme
?????文件???????1747??2017-01-09?08:34??demo\.project
?????文件????????500??2017-01-09?08:34??demo\.settings\.jsdtscope
?????文件????????100??2017-01-09?08:34??demo\.settings\org.eclipse.core.resources.prefs
?????文件????????395??2017-01-09?08:34??demo\.settings\org.eclipse.jdt.core.prefs
?????文件????????450??2017-01-09?08:34??demo\.settings\org.eclipse.wst.common.component
?????文件????????252??2017-01-09?08:34??demo\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件?????????49??2017-01-09?08:34??demo\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件??????????6??2017-01-09?08:34??demo\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????文件????????929??2017-01-09?08:34??demo\src\cn\tedu\xx\DDD.java
?????文件????????457??2017-05-24?22:57??demo\WebRoot\a.jsp
?????文件????????357??2017-01-09?08:34??demo\WebRoot\b.jsp
?????文件????????834??2017-01-09?08:34??demo\WebRoot\index.jsp
?????文件???????8866??2017-01-09?08:34??demo\WebRoot\js\tongji.js
?????文件?????????39??2017-01-09?08:34??demo\WebRoot\me
?????文件???????1624??2017-05-24?09:51??demo\WebRoot\WEB-INF\classes\cn\tedu\xx\DDD.class
?????文件????????647??2017-01-09?08:34??demo\WebRoot\WEB-INF\web.xm
?????文件????????529??2017-01-09?08:34??LogDemox\.classpath
?????文件????????297??2017-05-23?08:55??LogDemox\.myme
?????文件???????1751??2017-01-09?08:34??LogDemox\.project
?????文件????????500??2017-01-09?08:34??LogDemox\.settings\.jsdtscope
?????文件????????395??2017-01-09?08:34??LogDemox\.settings\org.eclipse.jdt.core.prefs
?????文件????????462??2017-01-09?08:34??LogDemox\.settings\org.eclipse.wst.common.component
?????文件????????252??2017-01-09?08:34??LogDemox\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件?????????49??2017-01-09?08:34??LogDemox\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件??????????6??2017-01-09?08:34??LogDemox\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????文件???????1201??2017-05-23?10:20??LogDemox\src\cn\tedu\flux\LogServlet.java
?????文件????????739??2017-05-24?17:55??LogDemox\src\log4j.properties
?????文件?????????36??2017-01-09?08:34??LogDemox\WebRoot\me
............此處省略136個文件信息
評論
共有 條評論