Projects STRLCPY afrog Commits 2d89c3b9
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■
    README.md
    1 1  <h1 align="center">afrog</h1>
    2  -<p align="center">一个挖洞工具<br/>❤️ <br/>共 <b>[499]</b> 个<br/>��喜欢请点赞��⭐,不迷路</p>
     2 +<p align="center">一个挖洞工具<br/>❤️<br/>共 <b>[499]</b> 个<br/>��喜欢请点赞��⭐,不迷路</p>
    3 3   
    4 4  <p align="center" dir="auto">
    5 5   <a href="https://github.com/zan8in/afrog/tree/main/pocs/afrog-pocs">PoC 仓库</a> •
    skipped 87 lines
  • ■ ■ ■ ■ ■
    cmd/afrog/main.go
    skipped 37 lines
    38 38   &cli.BoolFlag{Name: "silent", Destination: &options.Silent, Value: false, Usage: "no progress, only results"},
    39 39   &cli.BoolFlag{Name: "nofinger", Aliases: []string{"nf"}, Destination: &options.NoFinger, Value: false, Usage: "disable fingerprint"},
    40 40   &cli.BoolFlag{Name: "notips", Aliases: []string{"nt"}, Destination: &options.NoTips, Value: false, Usage: "disable show tips"},
     41 + &cli.BoolFlag{Name: "updatepocs", Aliases: []string{"up"}, Destination: &options.UpdatePocs, Value: false, Usage: "update afrog-pocs"},
    41 42   }
    42 43   
    43 44   app.Action = func(c *cli.Context) error {
    44 45   upgrade := upgrade.New()
     46 + upgrade.IsUpdatePocs = options.UpdatePocs
    45 47   upgrade.UpgradeAfrogPocs()
    46 48   
    47 49   runner.ShowBanner2(upgrade.LastestAfrogVersion)
    48 50   
    49  - fmt.Println("PATH:")
    50  - fmt.Println(" " + options.Config.GetConfigPath())
    51  - fmt.Println(" " + poc.GetPocPath() + " v" + upgrade.LastestVersion)
     51 + printPathLog(upgrade)
    52 52   
    53 53   if len(options.Output) == 0 {
    54 54   options.Output = utils.GetNowDateTimeReportName() + ".html"
    skipped 60 lines
    115 115   }
    116 116  }
    117 117   
     118 +func printPathLog(upgrade *upgrade.Upgrade) {
     119 + fmt.Println("PATH:")
     120 + fmt.Println(" " + options.Config.GetConfigPath())
     121 + if options.UpdatePocs {
     122 + fmt.Println(" " + poc.GetPocPath() + " v" + upgrade.LastestVersion)
     123 + } else {
     124 + if utils.Compare(upgrade.LastestVersion, ">", upgrade.CurrVersion) {
     125 + fmt.Println(" " + poc.GetPocPath() + " v" + upgrade.CurrVersion + " (" + log.LogColor.Vulner(upgrade.LastestVersion) + ")")
     126 + } else {
     127 + fmt.Println(" " + poc.GetPocPath() + " v" + upgrade.CurrVersion)
     128 + }
     129 + }
     130 +}
     131 + 
  • ■ ■ ■ ■ ■ ■
    internal/runner/banner.go
    skipped 8 lines
    9 9  )
    10 10   
    11 11  func ShowBanner() string {
    12  - return "afrog 内置PoC版"
     12 + return log.LogColor.Bold("afrog ") + log.LogColor.Banner("今年夏天")
    13 13  }
    14 14   
    15 15  func ShowUsage() string {
    skipped 5 lines
    21 21  }
    22 22   
    23 23  func ShowBanner2(afrogLatestversion string) {
    24  - title := "NAME:\n " + log.LogColor.Banner(ShowBanner()) + " - v" + config.Version
     24 + title := "NAME:\n " + ShowBanner() + " - v" + config.Version
    25 25   old := ""
    26 26   if utils.Compare(afrogLatestversion, ">", config.Version) {
    27  - old = log.LogColor.High(" (outdated)")
    28  - old += log.LogColor.Title(" --> https://github.com/zan8in/afrog/releases/tag/v" + afrogLatestversion)
     27 + old = " (" + log.LogColor.High(afrogLatestversion) + ")"
     28 + old += log.LogColor.Title(" -> https://github.com/zan8in/afrog/releases/tag/v" + afrogLatestversion)
    29 29   }
    30 30   fmt.Println(title + old + "\n")
    31 31  }
    skipped 1 lines
  • ■ ■ ■ ■
    pkg/config/config.go
    skipped 39 lines
    40 40  }
    41 41   
    42 42  const afrogConfigFilename = "afrog-config.yaml"
    43  -const Version = "1.3.2"
     43 +const Version = "1.3.3"
    44 44   
    45 45  // Create and initialize afrog-config.yaml configuration info
    46 46  func New() (*Config, error) {
    skipped 110 lines
  • ■ ■ ■ ■ ■ ■
    pkg/config/options.go
    skipped 39 lines
    40 40   // disable output fingerprint in the console
    41 41   NoFinger bool
    42 42   
     43 + // disable show tips
    43 44   NoTips bool
     45 + 
     46 + // update afrog-pocs
     47 + UpdatePocs bool
    44 48   
    45 49   // Scan count num(targets * allpocs)
    46 50   Count int
    skipped 37 lines
  • ■ ■ ■ ■ ■ ■
    pkg/log/color.go
    skipped 16 lines
    17 17   Time func(a ...interface{}) string
    18 18   Title func(a ...interface{}) string
    19 19   Banner func(a ...interface{}) string
     20 + Bold func(a ...interface{}) string
    20 21  }
    21 22   
    22 23  var LogColor *Color
    skipped 15 lines
    38 39   Time: color.Gray.Render,
    39 40   Title: color.FgLightBlue.Render,
    40 41   Banner: color.FgLightGreen.Render,
     42 + Bold: color.Bold.Render,
    41 43   }
    42 44  }
    43 45   
    skipped 22 lines
  • ■ ■ ■ ■ ■ ■
    pkg/upgrade/upgrade.go
    skipped 19 lines
    20 20   RemoteVersion string
    21 21   LastestVersion string
    22 22   LastestAfrogVersion string
     23 + IsUpdatePocs bool
    23 24  }
    24 25   
    25 26  const (
    skipped 11 lines
    37 38   
    38 39  func (u *Upgrade) CheckUpgrade() (bool, error) {
    39 40   curVersion, err := poc.GetPocVersionNumber()
     41 + u.CurrVersion = curVersion
    40 42   if err != nil {
    41 43   return false, errors.New("failed to get local version number")
    42 44   }
    skipped 9 lines
    52 54   return false, errors.New("failed to get remote version number")
    53 55   }
    54 56   
    55  - u.CurrVersion = curVersion
    56 57   u.RemoteVersion = strings.TrimSpace(string(remoteVersion))
    57 58   
    58 59   u.LastestAfrogVersion, _ = getAfrogVersion()
    skipped 18 lines
    77 78  func (u *Upgrade) UpgradeAfrogPocs() {
    78 79   isUp, err := u.CheckUpgrade()
    79 80   if err != nil {
    80  - u.LastestVersion = u.CurrVersion
    81 81   return
    82 82   }
    83 83   if !isUp {
    84  - u.LastestVersion = u.CurrVersion
    85 84   return
    86 85   }
    87 86   if isUp {
    88  - fmt.Println(log.LogColor.Info("Downloading latest release..."))
    89 87   u.LastestVersion = u.RemoteVersion
    90  - u.Download()
     88 + if u.IsUpdatePocs {
     89 + fmt.Println(log.LogColor.Info("Downloading latest release..."))
     90 + u.Download()
     91 + }
    91 92   }
    92 93  }
    93 94   
    skipped 27 lines
  • ■ ■ ■ ■ ■ ■
    pkg/utils/tips.go
    skipped 6 lines
    7 7   
    8 8  var (
    9 9   tips = []string{
    10  - "现在 PoC 内置在程序里,~/afrog-pocs 仍保留,最新 PoC",
     10 + "现在 PoC 内置在程序里,~/afrog-pocs 仍保留,使 --up 最新 PoC",
    11 11   "现在会自动生成报告,也支持 -o 自定义报告名",
    12  - "Fingerprint 功能是先访问一遍 Targets,获取 Title 和 Web 指纹",
     12 + "Fingerprint 功能是先访问一遍 Targets,获取 Title 和 Web 指纹 Fingerprint使 --nf ",
    13 13   "afrog -t http://example.com",
    14 14   "afrog -T urls.txt",
    15 15   "afrog -T urls.txt -o result.html",
    16 16   "afrog -t http://example.com -P ./testing/poc-test.yaml",
    17 17   "afrog -t http://example.com -P ./testing/",
    18  - "服务器后台运行,使用 -s 命令,避免(实时显示扫描进度)脏数据污染 nohup 文件",
    19  - " TIPS, 使用 --nt 命令",
    20  - "禁止扫描 Fingerprint,使用 --nf 命令",
    21  - "禁止实时扫描进度,使用 -s 命令",
     18 + "服务器后台运行,使用 -silent 命令,避免(实时显示扫描进度)脏数据污染 nohup 文件",
     19 + " TIPS, 使用 --nt 命令",
     20 + "不想看到实时扫描进度,使用 -silent 命令",
    22 21   "-o 会覆盖相同文件名的报告",
    23 22   "不以物喜,不以己悲!",
    24 23   "美丽人生,享受生活!- life is fantastic. enjoy life.",
    25 24   "坚持,是一种品格!",
    26 25   "知己知彼,百战不殆",
    27 26   "挖漏洞是一种缘分,漏洞就在那边,你若没挖到就说明你们暂时无缘。",
    28  - "不做【大而全】,专注【小而美】",
     27 + "这个BUG半小时后改完,开发者重新定义了半小时",
    29 28   }
    30 29  )
    31 30   
    skipped 5 lines
Please wait...
Page is in error, reload to recover