Projects STRLCPY scan4all Commits 0f59f723
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    pkg/fingerprint/fgConst.go
    skipped 59 lines
    60 60   LoadWebfingerprintEhole()
    61 61   x1 := GetWebfingerprintEhole()
    62 62   // 测试的时候下面代码才打开
    63  - if "true" == util.GetValByDefault("MyDebug", "false") {
     63 + if true || "true" == util.GetValByDefault("MyDebug", "false") {
    64 64   x1.Fingerprint = []*Fingerprint{}
    65 65   localFinger = "{}"
    66 66   log.Println("MyDebug")
    skipped 20 lines
    87 87   y := y1.(map[string]interface{})
    88 88   // url 去重复 start
    89 89   szUrl := Get4K(&y, "url")
     90 + if szUrl == "/" || szUrl == "/favicon.ico" {
     91 + continue
     92 + }
    90 93   //log.Println("[", szUrl, "]")
    91 94   if _, ok := oUrl[szUrl]; !ok {
    92 95   oUrl[szUrl] = struct{}{}
    skipped 30 lines
    123 126   if nil == err {
    124 127   eHoleFinger = string(data)
    125 128   }
    126  - FgUrls = urls
     129 + FgUrls = append([]string{"/", "/favicon.ico"}, urls...)
    127 130  }
    128 131   
    129 132  var FgDictFile string
    skipped 6 lines
    136 139   
    137 140  // 这里可以动态加载远程的url指纹数据到 FgData
    138 141  func init() {
     142 + FgData = util.GetVal4File("FgData", FgData)
    139 143   json.Unmarshal([]byte(FgData), &FGDataMap)
    140 144   var aN []map[string]interface{}
    141 145   for _, x := range FGDataMap {
    142  - if bD, ok := x["delete"]; ok && false == bD.(bool) {
     146 + if bD, ok := x["delete"]; !ok || false == bD.(bool) {
    143 147   aN = append(aN, x)
    144 148   }
    145 149   }
    skipped 1 lines
    147 151   MergeReqUrl()
    148 152   var err error
    149 153   tempInput1, err = ioutil.TempFile("", "dict-in-*")
    150  - if nil == err && "" != tempInput1.Name() {
     154 + if nil == err {
    151 155   ioutil.WriteFile(tempInput1.Name(), []byte(strings.Join(FgUrls, "\n")), 0644)
    152 156   FgDictFile = tempInput1.Name()
    153 157   } else {
    skipped 14 lines
Please wait...
Page is in error, reload to recover