Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Shmakov/Honeypot
/ functions
Functions
172 in github.com/Shmakov/Honeypot
⨍
Functions
172
◇
Types & classes
33
↓ 13 callers
Function
ts_to_day_bucket
(ts: i64)
src/db/mod.rs:944
↓ 11 callers
Method
escapeHtml
(text)
static/stats.js:372
↓ 9 callers
Method
truncate
(str, len)
static/stats.js:368
↓ 7 callers
Method
lookup
Look up an IP address and return location info
src/geoip.rs:46
↓ 7 callers
Method
publish
(&self, event: AttackEvent)
src/events.rs:17
↓ 7 callers
Method
with_geo
(mut self, country_code: String, lat: f64, lon: f64)
src/db/mod.rs:69
↓ 7 callers
Method
with_request_size
(mut self, size: u32)
src/db/mod.rs:81
↓ 6 callers
Method
escapeHtml
(text)
static/app.js:388
↓ 6 callers
Function
validate_hours
Validate hours parameter - returns Ok(hours) or Err with API error
src/web/routes.rs:59
↓ 5 callers
Method
layer
(&self, inner: S)
src/web/middleware.rs:75
↓ 5 callers
Function
start
( port: u16, config: Arc<Config>, event_bus: Arc<EventBus>, write_tx: WriteSender, geoip:
src/handlers/ftp.rs:14
↓ 4 callers
Method
data
Handle data from client - interactive shell input
src/handlers/ssh.rs:394
↓ 4 callers
Method
log_commands
Log commands when session ends or periodically
src/handlers/ssh.rs:127
↓ 4 callers
Method
with_payload
(mut self, payload: Vec<u8>)
src/db/mod.rs:63
↓ 3 callers
Method
hideModal
()
static/app.js:263
↓ 3 callers
Method
init
()
static/stats.js:20
↓ 3 callers
Method
log_auth_event
Log credentials to write buffer and event bus
src/handlers/ssh.rs:87
↓ 3 callers
Function
removeMarkerByKey
(locationKey, removeFromArray = true)
static/app.js:596
↓ 3 callers
Function
setTheme
(theme)
static/theme.js:22
↓ 3 callers
Method
updateConnectionStatus
(status)
static/app.js:316
↓ 3 callers
Method
with_credentials
(mut self, username: String, password: String)
src/db/mod.rs:57
↓ 2 callers
Method
addTableRow
(event, animate = true)
static/app.js:134
↓ 2 callers
Method
aggregate_day
Aggregate a single day's data into stats_daily Skips if already aggregated (check stats_daily first)
src/db/mod.rs:753
↓ 2 callers
Function
countryToFlag
* Convert country code to flag emoji (e.g., 'US' -> 🇺🇸) * @param {string} countryCode - Two-letter ISO country code * @returns {string} - Flag emoji
static/utils.js:42
↓ 2 callers
Method
countryToFlag
(code)
static/app.js:190
↓ 2 callers
Function
escapeHtml
* Escape HTML special characters to prevent XSS * @param {string} text - The text to escape * @returns {string} - Escaped HTML string
static/utils.js:11
↓ 2 callers
Method
formatBytes
* Format bytes to human-readable string (KB, MB, GB, etc.)
static/stats.js:183
↓ 2 callers
Method
formatCredential
* Formats a credential (username/password) for display. * Shows "(empty)" for empty strings and makes whitespace visible.
static/stats.js:284
↓ 2 callers
Method
formatNumber
(num)
static/app.js:380
↓ 2 callers
Method
get_rollup_stats
Get stats from rollup table for complete days
src/db/mod.rs:361
↓ 2 callers
Method
hexDecode
(hex)
static/app.js:259
↓ 2 callers
Method
loadData
()
static/stats.js:107
↓ 2 callers
Method
showLoading
* Show or hide the loading overlay
static/stats.js:163
↓ 2 callers
Function
truncate
* Truncate a string to specified length with ellipsis * @param {string} str - String to truncate * @param {number} len - Maximum length * @returns
static/utils.js:23
↓ 1 callers
Method
addCommand
(command)
static/app.js:307
↓ 1 callers
Method
addCredential
(username, password)
static/app.js:286
↓ 1 callers
Method
batch_insert_events
Batch insert events in a single transaction (much faster than individual inserts)
src/db/mod.rs:198
↓ 1 callers
Function
calculate_request_size
Calculate estimated request size from headers and request line
src/web/middleware.rs:167
↓ 1 callers
Method
connectSSE
()
static/app.js:60
↓ 1 callers
Method
countryToFlag
(code)
static/stats.js:377
↓ 1 callers
Function
find_capture_interface
Find the best network interface for ICMP capture
src/handlers/icmp.rs:22
↓ 1 callers
Method
formatBytes
(bytes)
static/app.js:392
↓ 1 callers
Function
formatNumber
* Format a number with locale-specific thousands separators * @param {number} num - Number to format * @returns {string} - Formatted number string
static/utils.js:33
↓ 1 callers
Function
format_headers
Format HTTP headers as a readable string
src/web/middleware.rs:156
↓ 1 callers
Function
format_headers
Format HTTP headers as a readable string
src/web/mod.rs:36
↓ 1 callers
Function
getLocationKey
(lat, lon)
static/app.js:466
↓ 1 callers
Function
getPreferredTheme
()
static/theme.js:10
↓ 1 callers
Method
getServiceClass
(service)
static/app.js:176
↓ 1 callers
Function
get_banner
Protocol-specific banners for emulation
src/handlers/tcp.rs:15
↓ 1 callers
Function
get_cached_countries
(hours: i64, db: Database)
src/web/routes.rs:82
↓ 1 callers
Function
get_cached_locations
(hours: i64, db: Database)
src/web/routes.rs:88
↓ 1 callers
Function
get_cached_recent_commands
(db: Database)
src/web/routes.rs:100
↓ 1 callers
Function
get_cached_recent_credentials
(db: Database)
src/web/routes.rs:94
↓ 1 callers
Function
get_cached_stats
(hours: i64, db: Database)
src/web/routes.rs:71
↓ 1 callers
Function
get_cached_top_ips_bandwidth
(hours: i64, db: Database)
src/web/routes.rs:112
↓ 1 callers
Function
get_cached_top_ips_requests
(hours: i64, db: Database)
src/web/routes.rs:106
↓ 1 callers
Function
get_cached_total_bytes
(hours: i64, db: Database)
src/web/routes.rs:118
↓ 1 callers
Method
get_country_stats
(&self, since_hours: i64)
src/db/mod.rs:526
↓ 1 callers
Method
get_days_needing_rollup
Get days that need to be backfilled (have requests but no rollup)
src/db/mod.rs:901
↓ 1 callers
Method
get_live_stats
Get stats from live table (for today or fallback)
src/db/mod.rs:442
↓ 1 callers
Method
get_location_stats
(&self, since_hours: i64, limit: i32)
src/db/mod.rs:572
↓ 1 callers
Function
get_or_create_host_key
Generate or load SSH host key
src/handlers/ssh.rs:512
↓ 1 callers
Method
get_prompt
Get the shell prompt
src/handlers/ssh.rs:228
↓ 1 callers
Function
get_real_ip
Get the real client IP address, checking proxy headers first Priority: X-Real-IP > X-Forwarded-For (first IP) > ConnectInfo
src/web/middleware.rs:24
↓ 1 callers
Function
get_real_port
Get the real port from X-Forwarded-Port header, defaulting to 80
src/web/middleware.rs:52
↓ 1 callers
Method
get_recent_commands
Get recent commands from SSH/telnet sessions (stored in payload as hex-encoded text)
src/db/mod.rs:255
↓ 1 callers
Method
get_recent_credentials
(&self, limit: i32)
src/db/mod.rs:244
↓ 1 callers
Method
get_recent_events
(&self, limit: i32)
src/db/mod.rs:292
↓ 1 callers
Method
get_stats_hybrid
Get stats using hybrid approach: rollup for complete days, live query for today (only for <24h range) Special case: hours=24 returns yesterday's roll
src/db/mod.rs:332
↓ 1 callers
Method
get_top_ips_by_bandwidth
Get top IPs by bandwidth (rollup only)
src/db/mod.rs:673
↓ 1 callers
Method
get_top_ips_by_requests
Get top IPs by request count (rollup only)
src/db/mod.rs:626
↓ 1 callers
Method
get_total_bytes
Get total bytes for a time range (rollup only)
src/db/mod.rs:720
↓ 1 callers
Method
get_total_count
Get total request count using MAX(rowid) for O(1) performance.
src/db/mod.rs:237
↓ 1 callers
Method
handleAttackEvent
(event)
static/app.js:93
↓ 1 callers
Function
handle_ftp_session
( socket: tokio::net::TcpStream, ip: String, port: u16, banner: String, event_bus: Arc<Eve
src/handlers/ftp.rs:53
↓ 1 callers
Function
handle_telnet_session
( socket: tokio::net::TcpStream, ip: String, port: u16, event_bus: Arc<EventBus>, write_tx
src/handlers/telnet.rs:161
↓ 1 callers
Function
hexDecode
* Decode hex string to readable text * Non-printable characters are replaced with dots * @param {string} hex - Hex-encoded string * @returns {strin
static/utils.js:56
↓ 1 callers
Method
init
()
static/app.js:18
↓ 1 callers
Method
initMap
()
static/stats.js:26
↓ 1 callers
Method
is_available
Check if the GeoIP database is loaded
src/geoip.rs:73
↓ 1 callers
Function
is_private_ip
Check if an IP address is private/local
src/geoip.rs:79
↓ 1 callers
Method
loadInitialData
()
static/app.js:36
↓ 1 callers
Function
log_http_event
Log an HTTP request as an attack event
src/web/middleware.rs:187
↓ 1 callers
Function
read_telnet_line
Read a line from the socket, filtering out telnet IAC commands
src/handlers/telnet.rs:61
↓ 1 callers
Method
run_migrations
(&self)
src/db/mod.rs:126
↓ 1 callers
Method
setupElements
()
static/app.js:25
↓ 1 callers
Method
setupEventListeners
()
static/app.js:348
↓ 1 callers
Method
setupTimeFilter
()
static/stats.js:102
↓ 1 callers
Method
showAttackOnMap
(lat, lon, ip, service)
static/app.js:267
↓ 1 callers
Method
showEventDetails
(event)
static/app.js:194
↓ 1 callers
Function
start_all
Start all protocol handlers with async write buffer
src/handlers/mod.rs:359
↓ 1 callers
Function
start_background_tasks
Run daily rollup backfill and start background aggregation task
src/web/routes.rs:222
↓ 1 callers
Function
start_server
(config: &Config, event_bus: EventBus, db: Database, geoip: SharedGeoIp, write_tx: WriteSender)
src/web/mod.rs:208
↓ 1 callers
Function
start_write_buffer
Start the write buffer background task Returns a sender that handlers use to queue events
src/db/write_buffer.rs:17
↓ 1 callers
Method
subscribe
(&self)
src/events.rs:21
↓ 1 callers
Method
tls_enabled
(&self)
src/config.rs:120
↓ 1 callers
Method
truncate
(str, len)
static/app.js:384
↓ 1 callers
Method
updateCommandsList
(commands)
static/app.js:295
↓ 1 callers
Method
updateCountriesChart
(countries)
static/stats.js:230
↓ 1 callers
Method
updateCredentialsList
(credentials)
static/app.js:274
next →
1–100 of 172, ranked by callers