Add recon form fingerprint library and SSRF canary mode.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Score crawl inputs by SSRF-prone field names and register ping-back canaries for operator paste confirmation.
This commit is contained in:
16
server/internal/db/recon_canary_test.go
Normal file
16
server/internal/db/recon_canary_test.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package db
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestReconSSRfCanaryInsertAndHit(t *testing.T) {
|
||||
d, err := New(t.TempDir())
|
||||
if err != nil { t.Fatal(err) }
|
||||
t.Cleanup(func() { _ = d.Close() })
|
||||
if err := d.InsertReconSSRfCanary("c1", "lab", "https://x/recon/ping/c1", "u", "i"); err != nil { t.Fatal(err) }
|
||||
info, err := d.GetReconSSRfCanary("c1")
|
||||
if err != nil || info.Status != "pending" { t.Fatal(info, err) }
|
||||
hit, err := d.MarkReconSSRfCanaryHit("c1")
|
||||
if err != nil || !hit { t.Fatal(hit, err) }
|
||||
info, _ = d.GetReconSSRfCanary("c1")
|
||||
if info.Status != "confirmed" || info.HitAt == nil { t.Fatal(info) }
|
||||
}
|
||||
Reference in New Issue
Block a user