mirror of
https://github.com/lunchcat/sif.git
synced 2026-06-12 19:11:25 -07:00
133224c348
`strings.Split(url, "://")[1]` was copy-pasted in 18 spots and panics on a schemeless target (index out of range). add a small stripScheme helper in the scan package - and a guarded equivalent in logger, which cant import scan - so a bare host degrades gracefully instead of crashing the scan.
58 lines
2.1 KiB
Go
58 lines
2.1 KiB
Go
/*
|
|
·━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━·
|
|
: :
|
|
: █▀ █ █▀▀ · Blazing-fast pentesting suite :
|
|
: ▄█ █ █▀ · BSD 3-Clause License :
|
|
: :
|
|
: (c) 2022-2026 vmfunc, xyzeva, :
|
|
: lunchcat alumni & contributors :
|
|
: :
|
|
·━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━·
|
|
*/
|
|
|
|
package builtin
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/dropalldatabases/sif/internal/modules"
|
|
"github.com/dropalldatabases/sif/internal/scan"
|
|
)
|
|
|
|
type WhoisModule struct{}
|
|
|
|
func (m *WhoisModule) Info() modules.Info {
|
|
return modules.Info{
|
|
ID: "whois-lookup",
|
|
Name: "WHOIS Domain Information",
|
|
Author: "sif",
|
|
Severity: "info",
|
|
Description: "Performs WHOIS lookup for domain registration information",
|
|
Tags: []string{"recon", "whois", "osint"},
|
|
}
|
|
}
|
|
|
|
func (m *WhoisModule) Type() modules.ModuleType {
|
|
return modules.TypeScript
|
|
}
|
|
|
|
func (m *WhoisModule) Execute(ctx context.Context, target string, opts modules.Options) (*modules.Result, error) {
|
|
// Call existing legacy scan.Whois function
|
|
scan.Whois(target, opts.LogDir)
|
|
|
|
// Return that scan was executed, since no data is returned from scan.Whois
|
|
result := &modules.Result{
|
|
ModuleID: m.Info().ID,
|
|
Target: target,
|
|
Findings: []modules.Finding{
|
|
{
|
|
URL: target,
|
|
Severity: "info",
|
|
Evidence: "WHOIS lookup completed",
|
|
},
|
|
},
|
|
}
|
|
|
|
return result, nil
|
|
}
|