├── .github └── workflows │ ├── release.md │ └── release.yml ├── tests ├── notifier-temp.yaml └── demo │ ├── dom_eval.html │ └── dom_hookconvt.html ├── docs ├── logo.png ├── mitm-demo.png ├── notify-demo.png ├── dingbot-demo.png └── bypass-headless-detect.png ├── pkg ├── notify │ ├── notify_test.go │ ├── dingbot │ │ ├── dingbot_test.go │ │ └── dingbot.go │ └── notify.go ├── parser │ ├── javascript │ │ ├── variable_test.go │ │ └── variable.go │ └── html │ │ ├── html_test.go │ │ ├── search_test.go │ │ ├── html.go │ │ └── search.go ├── httpdump │ ├── http_test.go │ ├── http.go │ └── httpdump.go ├── chrome │ ├── bypass │ │ ├── bypass.go │ │ └── bypass_test.go │ ├── cookies │ │ └── cookies.go │ ├── xss │ │ ├── dom │ │ │ ├── fuzz_test.go │ │ │ ├── dom_test.go │ │ │ ├── fuzz.go │ │ │ ├── hookparse_test.go │ │ │ ├── dom.go │ │ │ ├── hookparse.go │ │ │ └── preload.js │ │ └── checker │ │ │ ├── checker_test.go │ │ │ └── checker.go │ └── browser │ │ ├── browser_test.go │ │ └── browser.go ├── proxy │ ├── util_test.go │ ├── cert │ │ ├── gen_test.go │ │ └── gen.go │ ├── xssfinder.ca.cert │ ├── util.go │ ├── xssfinder.ca.key │ ├── ca.go │ └── mitm.go └── mix │ ├── mixpayloads_test.go │ └── mixpayloads.go ├── internal ├── logger │ ├── logger_test.go │ └── logger.go ├── runner │ ├── runner.go │ └── worker.go ├── options │ └── options.go └── app │ └── app.go ├── cmd └── xssfinder │ └── xssfinder.go ├── .gitignore ├── go.mod ├── README.md ├── go.sum └── LICENSE /.github/workflows/release.md: -------------------------------------------------------------------------------- 1 | # 更新说明 2 | - 支持 window.Storage 来源检测 -------------------------------------------------------------------------------- /tests/notifier-temp.yaml: -------------------------------------------------------------------------------- 1 | dingbot: 2 | token: xxx 3 | secret: xxxxxx -------------------------------------------------------------------------------- /docs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ac0d3r/xssfinder/HEAD/docs/logo.png -------------------------------------------------------------------------------- /docs/mitm-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ac0d3r/xssfinder/HEAD/docs/mitm-demo.png -------------------------------------------------------------------------------- /docs/notify-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ac0d3r/xssfinder/HEAD/docs/notify-demo.png -------------------------------------------------------------------------------- /docs/dingbot-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ac0d3r/xssfinder/HEAD/docs/dingbot-demo.png -------------------------------------------------------------------------------- /docs/bypass-headless-detect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ac0d3r/xssfinder/HEAD/docs/bypass-headless-detect.png -------------------------------------------------------------------------------- /pkg/notify/notify_test.go: -------------------------------------------------------------------------------- 1 | package notify 2 | 3 | import "testing" 4 | 5 | func TestNotifiers(t *testing.T) { 6 | n, err := NewNotifierWithYaml("notifier.yaml") 7 | t.Log(err) 8 | t.Log(n.Notify("http://localhost:8080/", `- type dom`)) 9 | } 10 | -------------------------------------------------------------------------------- /pkg/notify/dingbot/dingbot_test.go: -------------------------------------------------------------------------------- 1 | package dingbot 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | ) 7 | 8 | func TestDingbot(t *testing.T) { 9 | d := New(os.Getenv("dingbot_token"), os.Getenv("dingbot_secret")) 10 | d.Notify("http://localhost:8080/", `- type dom`) 11 | } 12 | -------------------------------------------------------------------------------- /internal/logger/logger_test.go: -------------------------------------------------------------------------------- 1 | package logger 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/sirupsen/logrus" 7 | ) 8 | 9 | func TestLogger(t *testing.T) { 10 | Init(Config{ 11 | Level: logrus.DebugLevel, 12 | NoColor: true, 13 | }) 14 | logrus.Debugln("tessss") 15 | } 16 | -------------------------------------------------------------------------------- /cmd/xssfinder/xssfinder.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/Buzz2d0/xssfinder/internal/app" 7 | ) 8 | 9 | const version = "v0.1.2" 10 | 11 | func main() { 12 | a := app.New(version) 13 | if err := a.Run(os.Args); err != nil { 14 | panic(err) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /pkg/parser/javascript/variable_test.go: -------------------------------------------------------------------------------- 1 | package javascript 2 | 3 | import "testing" 4 | 5 | func TestGetAllVariable(t *testing.T) { 6 | t.Log(GetAllVariable(` 7 | var a = 1; 8 | var aa,bb,cc; 9 | let b = '1'; 10 | let d = taest(); 11 | 12 | const c = ''; 13 | console.log(a,b,c); 14 | `)) 15 | } 16 | -------------------------------------------------------------------------------- /pkg/httpdump/http_test.go: -------------------------------------------------------------------------------- 1 | package httpdump 2 | 3 | import ( 4 | "net/http" 5 | "testing" 6 | "time" 7 | ) 8 | 9 | func TestDo(t *testing.T) { 10 | req := Request{ 11 | Method: http.MethodGet, 12 | URL: "https://www.baidu.com", 13 | } 14 | 15 | t.Log(Do(req, time.Second)) 16 | 17 | t.Log(req) 18 | } 19 | -------------------------------------------------------------------------------- /tests/demo/dom_eval.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 |