yellow.git


yellow

~ opinionated web scanning pipeline for pentesters in a hurry
git clone https://github.com/djnnvx/yellow.git
log | files | refs | archive | README | LICENSE

fingerprint.go (905B)

      1 package scan
      2 
      3 import (
      4 	"fmt"
      5 	"os"
      6 
      7 	"evil.djnn.sh/djnn/yellow/core"
      8 	helper "evil.djnn.sh/djnn/yellow/helpers"
      9 )
     10 
     11 /*
     12    This is a sub-command, based on the scan command.
     13 
     14    However, all it does is to run wappalyzer-go then cvemap on it
     15    for quick wins.
     16 */
     17 
     18 func (opts *ScanOpts) Fingerprint() {
     19 	fmt.Printf("\n[SCAN] domain: %s\n", opts.Domain)
     20 
     21 	fullDomain, ok := helper.ResolveWebTarget(opts.Domain, opts.ForceInsecure)
     22 	if !ok {
     23 		fmt.Printf("[FINGERPRINT %s] => no web panel online. skipping\n", opts.Domain)
     24 		return
     25 	}
     26 
     27 	pathForDomain := opts.ScanPath + "/" + opts.Domain
     28 	if err := os.MkdirAll(pathForDomain, 0755); err != nil {
     29 		fmt.Printf("[!] fingerprint: could not create %s, skipping %s: %v\n", pathForDomain, opts.Domain, err)
     30 		return
     31 	}
     32 
     33 	ctx := opts.context()
     34 	ctx.Domain = fullDomain
     35 	ctx.ScanPath = pathForDomain
     36 
     37 	core.RunModules(ctx, []core.Module{&WappalyzerGo{}, &Cvemap{}})
     38 }