Browse Source

转链

master
huangjiajun 5 months ago
parent
commit
6f248783bd
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      chain_transfer/turn_chain.go

+ 7
- 3
chain_transfer/turn_chain.go View File

@@ -128,7 +128,7 @@ func TurnChain(eg *xorm.Engine, officialEg, zhimengEg *xorm.Engine, args map[str
for _, v := range replaceAll { for _, v := range replaceAll {
reqCount2 = strings.ReplaceAll(reqCount2, v, "") reqCount2 = strings.ReplaceAll(reqCount2, v, "")
} }
split1 := regexp.MustCompile("[a-zA-Z0-9]{6,15} [a-zA-Z0-9]{6,15}").FindAllString(reqCount2, -1)
split1 := regexp.MustCompile("[a-zA-Z0-9]{4,15} [a-zA-Z0-9]{6,15}").FindAllString(reqCount2, -1)
split3 := regexp.MustCompile("[a-zA-Z0-9]{6,15} [a-zA-Z0-9]{4,6}").FindAllString(reqCount2, -1) split3 := regexp.MustCompile("[a-zA-Z0-9]{6,15} [a-zA-Z0-9]{4,6}").FindAllString(reqCount2, -1)
split2 := regexp.MustCompile("[a-zA-Z0-9]{6,15}").FindAllString(reqCount2, -1) split2 := regexp.MustCompile("[a-zA-Z0-9]{6,15}").FindAllString(reqCount2, -1)
if strings.Contains(reqCount2, "http") { if strings.Contains(reqCount2, "http") {
@@ -150,7 +150,7 @@ func TurnChain(eg *xorm.Engine, officialEg, zhimengEg *xorm.Engine, args map[str
for _, v2 := range replaceAll { for _, v2 := range replaceAll {
repV = strings.ReplaceAll(repV, v2, "") repV = strings.ReplaceAll(repV, v2, "")
} }
split1 := regexp.MustCompile("[a-zA-Z0-9]{6,15} [a-zA-Z0-9]{6,15}").FindAllString(repV, -1)
split1 := regexp.MustCompile("[a-zA-Z0-9]{4,15} [a-zA-Z0-9]{6,15}").FindAllString(repV, -1)
split3 := regexp.MustCompile("[a-zA-Z0-9]{6,15} [a-zA-Z0-9]{4,6}").FindAllString(repV, -1) split3 := regexp.MustCompile("[a-zA-Z0-9]{6,15} [a-zA-Z0-9]{4,6}").FindAllString(repV, -1)
split2 := regexp.MustCompile("[a-zA-Z0-9]{6,15}").FindAllString(repV, -1) split2 := regexp.MustCompile("[a-zA-Z0-9]{6,15}").FindAllString(repV, -1)
if strings.Contains(repV, "http") { if strings.Contains(repV, "http") {
@@ -170,7 +170,11 @@ func TurnChain(eg *xorm.Engine, officialEg, zhimengEg *xorm.Engine, args map[str
if len(split3) > 0 || len(split1) > 0 { if len(split3) > 0 || len(split1) > 0 {
split5 := regexp.MustCompile("[a-zA-Z0-9]{6,15} [a-zA-Z0-9]{6,15}").FindAllString(v, -1) split5 := regexp.MustCompile("[a-zA-Z0-9]{6,15} [a-zA-Z0-9]{6,15}").FindAllString(v, -1)
split6 := regexp.MustCompile("[a-zA-Z0-9]{6,15} [a-zA-Z0-9]{4,6}").FindAllString(v, -1) split6 := regexp.MustCompile("[a-zA-Z0-9]{6,15} [a-zA-Z0-9]{4,6}").FindAllString(v, -1)
if len(split5) == 0 && len(split6) == 0 {
split7 := regexp.MustCompile("[a-zA-Z0-9]{4,15}/ [a-zA-Z0-9]{6,15}").FindAllString(v, -1)
split8 := regexp.MustCompile("[a-zA-Z0-9]{6,15}/ [a-zA-Z0-9]{4,6}").FindAllString(v, -1)
if len(split7) > 0 || len(split8) > 0 || len(split5) == 0 || len(split6) == 0 {
//占位
} else if len(split5) == 0 && len(split6) == 0 {
split4 := regexp.MustCompile("[a-zA-Z0-9]{8,15}").FindAllString(repV, -1) split4 := regexp.MustCompile("[a-zA-Z0-9]{8,15}").FindAllString(repV, -1)
v = split4[0] v = split4[0]
} else { } else {


Loading…
Cancel
Save