Skip to content

Commit 01903b4

Browse files
Update Re.java
1 parent 6774866 commit 01903b4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/burp/Re.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static String Phone(String str){
1717
while (matcher.find())
1818
{
1919
if (matcher.group().length() == 11) {
20-
String is_phone = "^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|17[6|7|9]|18[0-9])\\d{8}$";
20+
String is_phone = "^(13[0-9]|14[5|7]|15[^4]|17[6-9]|18[0-9])\\d{8}$";
2121
Matcher matcher2 = Pattern.compile(is_phone).matcher(matcher.group());
2222
while (matcher2.find()) {
2323
phones.add(matcher2.group());
@@ -90,7 +90,8 @@ public static boolean in_ip(String str){
9090
//邮箱匹配
9191
public static String Email(String str){
9292
ArrayList<String> email = new ArrayList<>();
93-
String is_email = "[\\w-]+(?:\\.[\\w-]+)*@(?:[\\w](?:[\\w-]*[\\w])?\\.)+[A-Za-z]{2,6}";
93+
// 增加png|jpg等排除
94+
String is_email = "[\\w-]+(?:\\.[\\w-]+)*@(?:[\\w](?:[\\w-]*[\\w])?\\.)+(?:((?!png))((?!jpg))((?!jpeg))((?!gif))((?!ico))((?!html))((?!js))((?!css)))[A-Za-z]{2,6}";
9495
Matcher matcher = Pattern.compile(is_email).matcher(str);
9596
while (matcher.find()){
9697
email.add(matcher.group());
@@ -128,7 +129,7 @@ public static boolean js (String headers,byte[] content){
128129
}
129130
// 去重代码
130131
public static List<String> removeDuplicate (ArrayList<String> strings){
131-
List<String> list2 = new ArrayList(strings);
132+
List<String> list2 = new ArrayList<String>(strings);
132133
list2 = list2.stream().distinct().collect(Collectors.toList());
133134
return list2;
134135
}

0 commit comments

Comments
 (0)