Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/abhizaik/urlvet
/ functions
Functions
265 in github.com/abhizaik/urlvet
⨍
Functions
265
◇
Types & classes
101
↓ 20 callers
Method
Close
()
server/internal/service/cache/valkey.go:44
↓ 16 callers
Function
getAttr
(n *html.Node, key string)
server/internal/service/checks/content.go:359
↓ 15 callers
Function
updateOutput
Helper to update output fields with mutex lock
server/internal/analyzer/task_helpers.go:63
↓ 14 callers
Function
makeRequest
(endpoint: string, url: string)
web/website/src/lib/api.ts:21
↓ 11 callers
Function
doRequest
(t *testing.T, r *gin.Engine, method, path string)
server/internal/handler/handler_test.go:28
↓ 9 callers
Method
Set
( ctx context.Context, key string, value any, ttl time.Duration, )
server/internal/service/cache/valkey.go:48
↓ 9 callers
Function
testR
testR returns a shared router so we pay the Redis-timeout cost only once.
server/internal/handler/handler_test.go:20
↓ 8 callers
Method
Run
(in *Input, out *Output)
server/internal/analyzer/types.go:196
↓ 7 callers
Method
Name
()
server/internal/analyzer/types.go:195
↓ 7 callers
Function
hostOnly
hostOnly returns scheme://host from a URL, used to keep full URLs out of logs.
server/internal/service/checks/content.go:54
↓ 6 callers
Function
GetDomain
(rawURL string)
server/internal/service/checks/helpers.go:20
↓ 6 callers
Function
cachedTask
cachedTask executes a task with caching support Returns true if value was found in cache, false otherwise
server/internal/analyzer/task_helpers.go:14
↓ 5 callers
Function
GenerateResult
(resp Response)
server/internal/analyzer/result.go:9
↓ 5 callers
Method
Get
(ctx context.Context, key string)
server/internal/service/cache/valkey.go:57
↓ 5 callers
Method
SetJSON
(ctx context.Context, key string, value interface{}, ttl time.Duration)
server/internal/analyzer/types.go:133
↓ 5 callers
Function
isAllowedRune
---------- Helpers ---------- isAllowedRune checks if rune is a-z, 0-9, or hyphen (we lowercase runes first at call site)
server/internal/service/checks/entropy.go:42
↓ 4 callers
Function
GetHost
(rawURL string)
server/internal/service/checks/helpers.go:34
↓ 4 callers
Method
GetJSON
(ctx context.Context, key string, dest interface{})
server/internal/analyzer/types.go:132
↓ 3 callers
Function
clamp
(score int)
server/internal/analyzer/result.go:298
↓ 3 callers
Function
getEnvAsInt
(key string, defaultValue int)
server/internal/service/cache/valkey.go:137
↓ 3 callers
Function
nodeText
nodeText returns concatenated text of a node subtree
server/internal/service/checks/content.go:369
↓ 3 callers
Function
parseWhoisDate
parseWhoisDate attempts to parse WHOIS date strings into time.Time
server/internal/service/domaininfo/whois.go:53
↓ 3 callers
Function
safeBase
safeBase returns a minimal Response that should produce verdict "Safe". All boolean bad-signals are off; rank is top-10k; ICANN TLD; valid NS+MX.
server/internal/analyzer/result_test.go:12
↓ 3 callers
Function
ssrfSafeDialContext
ssrfSafeDialContext wraps a Dialer's DialContext to reject connections to private/reserved IP ranges, preventing SSRF attacks. DNS is resolved once he
server/internal/service/checks/helpers.go:157
↓ 2 callers
Function
GetTld
(domain string)
server/internal/service/checks/helpers.go:15
↓ 2 callers
Method
TakeScreenshot
TakeScreenshot takes a screenshot and returns the image bytes It first checks if a cached screenshot exists, otherwise takes a new one
server/internal/service/screenshot/screenshot.go:184
↓ 2 callers
Method
Write
(p []byte)
server/internal/logger/logger.go:49
↓ 2 callers
Function
computeSignature
(encodedPayload string)
server/internal/admintoken/token.go:89
↓ 2 callers
Function
entropyPerChar
(s string)
server/internal/service/checks/entropy.go:68
↓ 2 callers
Function
extractSLD
extractSLD returns just the second-level domain (SLD) of a hostname, stripping both subdomains and the public suffix. e.g. "www.paypal.com" → "paypal"
server/internal/service/typosquat/typosquat.go:137
↓ 2 callers
Function
fetchRDAPWithContext
fetchRDAPWithContext queries RDAP with context support and timeout.
server/internal/service/domaininfo/rdap.go:100
↓ 2 callers
Function
getEnv
Helper functions for environment variables
server/internal/service/cache/valkey.go:130
↓ 2 callers
Function
isHidden
(n *html.Node, style string, w string, h string)
server/internal/service/checks/content.go:418
↓ 2 callers
Function
loadSecret
()
server/internal/admintoken/token.go:24
↓ 2 callers
Function
looksLikeLoginText
(s string)
server/internal/service/checks/content.go:407
↓ 2 callers
Function
newSafeHTTPClient
newSafeHTTPClient returns an *http.Client that blocks SSRF. Use for plain fetches that don't need a custom CheckRedirect or transport.
server/internal/service/checks/helpers.go:183
↓ 2 callers
Function
newSafeTransport
newSafeTransport returns an *http.Transport with SSRF-safe DialContext. Use when building a custom http.Client (e.g. one with a CheckRedirect hook).
server/internal/service/checks/helpers.go:192
↓ 2 callers
Function
parseBoolField
parseBoolField understands JSON bool and legacy string "y"/"n".
server/internal/service/threatfeeds/phishtank.go:44
↓ 2 callers
Function
sanitizeURL
sanitizeURL creates a filesystem-safe filename from a URL
server/internal/service/screenshot/screenshot.go:135
↓ 2 callers
Function
shannonEntropy
shannonEntropy computes Shannon entropy in bits over runes
server/internal/service/checks/entropy.go:50
↓ 2 callers
Function
writeColorAttr
(buf *bytes.Buffer, a slog.Attr)
server/internal/logger/logger.go:171
↓ 1 callers
Function
CheckBrandMismatch
(domain string, pageTitle string)
server/internal/service/checks/brand.go:24
↓ 1 callers
Method
Close
()
server/internal/logger/logger.go:74
↓ 1 callers
Function
ConvertTimings
ConvertTimings converts map of timings to a sorted slice (desc by duration)
server/internal/analyzer/utils.go:14
↓ 1 callers
Method
Delete
(ctx context.Context, key string)
server/internal/service/cache/valkey.go:65
↓ 1 callers
Method
Enabled
(ctx context.Context, level slog.Level)
server/internal/logger/logger.go:91
↓ 1 callers
Method
Expire
Expire sets an expiration on a key
server/internal/service/cache/valkey.go:80
↓ 1 callers
Method
FlushAll
FlushAll removes all keys from the current database
server/internal/service/cache/valkey.go:70
↓ 1 callers
Function
GetScreenshotPath
GetScreenshotPath returns the file path for a screenshot based on normalized URL
server/internal/service/screenshot/screenshot.go:152
↓ 1 callers
Function
GetService
GetService returns the default service instance (singleton)
server/internal/service/screenshot/screenshot.go:65
↓ 1 callers
Function
GetWhoisData
(domain string)
server/internal/service/domaininfo/whois.go:10
↓ 1 callers
Method
Increment
Increment increments a key and returns the new value
server/internal/service/cache/valkey.go:75
↓ 1 callers
Function
LookupWithContext
LookupWithContext tries RDAP first with timeout, falls back to WHOIS if RDAP fails.
server/internal/service/domaininfo/lookup.go:16
↓ 1 callers
Function
NewService
NewService creates a new screenshot service with a shared browser allocator
server/internal/service/screenshot/screenshot.go:35
↓ 1 callers
Method
Scan
Scan returns all keys matching the given glob pattern using SCAN (non-blocking).
server/internal/service/cache/valkey.go:85
↓ 1 callers
Function
SetupRouter
()
server/internal/handler/router.go:29
↓ 1 callers
Method
TTL
TTL returns the remaining time-to-live for a key. Returns -1 if no expiry, -2 if key missing.
server/internal/service/cache/valkey.go:104
↓ 1 callers
Function
TakeScreenshot
TakeScreenshot is a convenience function that uses the default service
server/internal/service/screenshot/screenshot.go:268
↓ 1 callers
Function
TooLongUrl
(url string)
server/internal/service/checks/structure.go:5
↓ 1 callers
Function
allowedOrigins
allowedOrigins reads CORS_ALLOWED_ORIGINS (comma-separated) from the environment.
server/internal/handler/router.go:17
↓ 1 callers
Function
bigramEnglishiness
bigramEnglishiness: fraction of letter-only bigrams that occur in a small English bigram set
server/internal/service/checks/entropy.go:100
↓ 1 callers
Function
buildPhishingResult
buildPhishingResult converts the internal PhishTankResult into the public PhishingResult. Returns nil when no check was performed (cache miss + fetch
server/internal/analyzer/analyze.go:18
↓ 1 callers
Function
decodeVerdict
(v: string)
web/website/src/lib/utils.ts:183
↓ 1 callers
Function
digitRatio
(s string)
server/internal/service/checks/entropy.go:159
↓ 1 callers
Function
extractFormInfo
extractFormInfo inspects a <form> node and returns a FormInfo
server/internal/service/checks/content.go:200
↓ 1 callers
Function
extractSLD
extractSLD returns the second-level label if available (example.com -> "example") keeps behavior simple (does not handle public suffix list). That's i
server/internal/service/checks/entropy.go:82
↓ 1 callers
Function
fmtInputSummary
(typ, name, placeholder, aria, id string)
server/internal/service/checks/content.go:387
↓ 1 callers
Function
formatUrl
(url: string)
web/website/src/lib/utils.ts:203
↓ 1 callers
Function
formatUrlForShare
(url: string)
web/website/src/lib/utils.ts:234
↓ 1 callers
Function
getDomainFromUrl
(url: string)
web/website/src/lib/utils.ts:212
↓ 1 callers
Function
getEnv
getEnv gets an environment variable or returns a default value
server/cmd/urlvet/urlvet.go:106
↓ 1 callers
Function
getFont
()
web/website/src/routes/og/+server.ts:8
↓ 1 callers
Function
getRDAPServer
getRDAPServer returns the RDAP base URL for a TLD. It checks the well-known map first, then falls back to the IANA bootstrap.
server/internal/service/domaininfo/rdap.go:218
↓ 1 callers
Function
isOfficialDomain
(domain string, officialDomains []string)
server/internal/service/checks/brand.go:15
↓ 1 callers
Function
isPrivateIP
(ip net.IP)
server/internal/service/checks/helpers.go:144
↓ 1 callers
Function
levelColor
(level slog.Level)
server/internal/logger/logger.go:175
↓ 1 callers
Function
levenshtein
levenshtein computes the edit distance between two strings.
server/internal/service/typosquat/typosquat.go:154
↓ 1 callers
Function
loadIANABootstrap
loadIANABootstrap fetches and parses the IANA RDAP bootstrap file. Results are cached in memory for 24 hours; stale data is returned on error.
server/internal/service/domaininfo/rdap.go:28
↓ 1 callers
Function
loadTimezone
loadTimezone reads LOG_TIMEZONE and returns the matching *time.Location. Falls back to UTC on unknown values.
server/internal/logger/logger.go:254
↓ 1 callers
Function
longestConsonantRunLength
(s string)
server/internal/service/checks/entropy.go:177
↓ 1 callers
Function
makeScreenshotRequest
(url: string)
web/website/src/lib/api.ts:49
↓ 1 callers
Function
normalizeURL
normalizeURL normalizes a URL for consistent cache keys - Lowercase host - Remove fragment - Sort query params - Trim trailing slash (except root)
server/internal/service/screenshot/screenshot.go:89
↓ 1 callers
Function
normalizedEntropy
(s string)
server/internal/service/checks/entropy.go:75
↓ 1 callers
Function
resolveAction
(base *url.URL, raw string)
server/internal/service/checks/content.go:347
↓ 1 callers
Function
runTasks
runTasks runs all tasks in parallel, collects timings and non-fatal errors
server/internal/analyzer/runner.go:14
↓ 1 callers
Function
sameHost
helpers
server/internal/service/checks/content.go:334
↓ 1 callers
Method
setTiming
(name string, d time.Duration)
server/internal/analyzer/types.go:184
↓ 1 callers
Function
showWarningPopup
(data)
web/chrome-extension/content.js:19
↓ 1 callers
Function
splitToken
(token string)
server/internal/admintoken/token.go:81
↓ 1 callers
Function
uniqueCharRatio
(s string)
server/internal/service/checks/entropy.go:125
↓ 1 callers
Function
validateURL
validateURL ensures the URL is safe to navigate to
server/internal/service/screenshot/screenshot.go:160
↓ 1 callers
Function
verifyArgon2id
verifyArgon2id checks a password against a PHC-format Argon2id hash: $argon2id$v=19$m=65536,t=3,p=4$<base64_salt>$<base64_hash>
server/internal/handler/admin_login.go:53
↓ 1 callers
Function
vowelRatio
(s string)
server/internal/service/checks/entropy.go:140
Function
AddError
(r ErrorRecord)
server/internal/store/memory.go:50
Function
AddScan
(r ScanRecord)
server/internal/store/memory.go:41
Function
AdminErrorsHandler
AdminErrorsHandler returns the last N error/panic records (newest first).
server/internal/handler/admin.go:21
Function
AdminLoginHandler
AdminLoginHandler validates the admin password against the stored Argon2id hash and returns a signed session token on success.
server/internal/handler/admin_login.go:24
Function
AdminRecentHandler
AdminRecentHandler returns the last N scan records (newest first).
server/internal/handler/admin.go:16
Function
AdminStatsHandler
AdminStatsHandler returns live scan metrics derived from the in-memory ring buffer.
server/internal/handler/admin.go:11
Function
Analyze
Analyze runs all tasks and builds the final response
server/internal/analyzer/analyze.go:37
next →
1–100 of 265, ranked by callers