-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinkguard.go
More file actions
32 lines (29 loc) · 969 Bytes
/
Copy pathlinkguard.go
File metadata and controls
32 lines (29 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Package linkguard provides entropy-based detection of suspicious links.
//
// Links used for phishing or obfuscation often contain unusual Unicode characters,
// homoglyphs, excessive encoding, or high Shannon entropy. This library analyzes
// URLs across multiple dimensions and produces a threat score.
//
// Usage:
//
// result := linkguard.Analyze("https://example.com")
// if result.IsSuspicious() {
// fmt.Println("Suspicious link detected:", result.Reasons)
// }
package linkguard
import "github.com/solrac97gr/linkguard/types"
// Re-export types for backward compatibility and convenience.
type (
Result = types.Result
RiskLevel = types.RiskLevel
UnicodeReport = types.UnicodeReport
StructureReport = types.StructureReport
)
// Re-export risk level constants.
const (
RiskNone = types.RiskNone
RiskLow = types.RiskLow
RiskMedium = types.RiskMedium
RiskHigh = types.RiskHigh
RiskCritical = types.RiskCritical
)