MCPcopy Create free account

hub / github.com/Shmakov/Honeypot / functions

Functions172 in github.com/Shmakov/Honeypot

↓ 13 callersFunctionts_to_day_bucket
(ts: i64)
src/db/mod.rs:944
↓ 11 callersMethodescapeHtml
(text)
static/stats.js:372
↓ 9 callersMethodtruncate
(str, len)
static/stats.js:368
↓ 7 callersMethodlookup
Look up an IP address and return location info
src/geoip.rs:46
↓ 7 callersMethodpublish
(&self, event: AttackEvent)
src/events.rs:17
↓ 7 callersMethodwith_geo
(mut self, country_code: String, lat: f64, lon: f64)
src/db/mod.rs:69
↓ 7 callersMethodwith_request_size
(mut self, size: u32)
src/db/mod.rs:81
↓ 6 callersMethodescapeHtml
(text)
static/app.js:388
↓ 6 callersFunctionvalidate_hours
Validate hours parameter - returns Ok(hours) or Err with API error
src/web/routes.rs:59
↓ 5 callersMethodlayer
(&self, inner: S)
src/web/middleware.rs:75
↓ 5 callersFunctionstart
( port: u16, config: Arc<Config>, event_bus: Arc<EventBus>, write_tx: WriteSender, geoip:
src/handlers/ftp.rs:14
↓ 4 callersMethoddata
Handle data from client - interactive shell input
src/handlers/ssh.rs:394
↓ 4 callersMethodlog_commands
Log commands when session ends or periodically
src/handlers/ssh.rs:127
↓ 4 callersMethodwith_payload
(mut self, payload: Vec<u8>)
src/db/mod.rs:63
↓ 3 callersMethodhideModal
()
static/app.js:263
↓ 3 callersMethodinit
()
static/stats.js:20
↓ 3 callersMethodlog_auth_event
Log credentials to write buffer and event bus
src/handlers/ssh.rs:87
↓ 3 callersFunctionremoveMarkerByKey
(locationKey, removeFromArray = true)
static/app.js:596
↓ 3 callersFunctionsetTheme
(theme)
static/theme.js:22
↓ 3 callersMethodupdateConnectionStatus
(status)
static/app.js:316
↓ 3 callersMethodwith_credentials
(mut self, username: String, password: String)
src/db/mod.rs:57
↓ 2 callersMethodaddTableRow
(event, animate = true)
static/app.js:134
↓ 2 callersMethodaggregate_day
Aggregate a single day's data into stats_daily Skips if already aggregated (check stats_daily first)
src/db/mod.rs:753
↓ 2 callersFunctioncountryToFlag
* 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 callersMethodcountryToFlag
(code)
static/app.js:190
↓ 2 callersFunctionescapeHtml
* Escape HTML special characters to prevent XSS * @param {string} text - The text to escape * @returns {string} - Escaped HTML string
static/utils.js:11
↓ 2 callersMethodformatBytes
* Format bytes to human-readable string (KB, MB, GB, etc.)
static/stats.js:183
↓ 2 callersMethodformatCredential
* Formats a credential (username/password) for display. * Shows "(empty)" for empty strings and makes whitespace visible.
static/stats.js:284
↓ 2 callersMethodformatNumber
(num)
static/app.js:380
↓ 2 callersMethodget_rollup_stats
Get stats from rollup table for complete days
src/db/mod.rs:361
↓ 2 callersMethodhexDecode
(hex)
static/app.js:259
↓ 2 callersMethodloadData
()
static/stats.js:107
↓ 2 callersMethodshowLoading
* Show or hide the loading overlay
static/stats.js:163
↓ 2 callersFunctiontruncate
* 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 callersMethodaddCommand
(command)
static/app.js:307
↓ 1 callersMethodaddCredential
(username, password)
static/app.js:286
↓ 1 callersMethodbatch_insert_events
Batch insert events in a single transaction (much faster than individual inserts)
src/db/mod.rs:198
↓ 1 callersFunctioncalculate_request_size
Calculate estimated request size from headers and request line
src/web/middleware.rs:167
↓ 1 callersMethodconnectSSE
()
static/app.js:60
↓ 1 callersMethodcountryToFlag
(code)
static/stats.js:377
↓ 1 callersFunctionfind_capture_interface
Find the best network interface for ICMP capture
src/handlers/icmp.rs:22
↓ 1 callersMethodformatBytes
(bytes)
static/app.js:392
↓ 1 callersFunctionformatNumber
* Format a number with locale-specific thousands separators * @param {number} num - Number to format * @returns {string} - Formatted number string
static/utils.js:33
↓ 1 callersFunctionformat_headers
Format HTTP headers as a readable string
src/web/middleware.rs:156
↓ 1 callersFunctionformat_headers
Format HTTP headers as a readable string
src/web/mod.rs:36
↓ 1 callersFunctiongetLocationKey
(lat, lon)
static/app.js:466
↓ 1 callersFunctiongetPreferredTheme
()
static/theme.js:10
↓ 1 callersMethodgetServiceClass
(service)
static/app.js:176
↓ 1 callersFunctionget_banner
Protocol-specific banners for emulation
src/handlers/tcp.rs:15
↓ 1 callersFunctionget_cached_countries
(hours: i64, db: Database)
src/web/routes.rs:82
↓ 1 callersFunctionget_cached_locations
(hours: i64, db: Database)
src/web/routes.rs:88
↓ 1 callersFunctionget_cached_recent_commands
(db: Database)
src/web/routes.rs:100
↓ 1 callersFunctionget_cached_recent_credentials
(db: Database)
src/web/routes.rs:94
↓ 1 callersFunctionget_cached_stats
(hours: i64, db: Database)
src/web/routes.rs:71
↓ 1 callersFunctionget_cached_top_ips_bandwidth
(hours: i64, db: Database)
src/web/routes.rs:112
↓ 1 callersFunctionget_cached_top_ips_requests
(hours: i64, db: Database)
src/web/routes.rs:106
↓ 1 callersFunctionget_cached_total_bytes
(hours: i64, db: Database)
src/web/routes.rs:118
↓ 1 callersMethodget_country_stats
(&self, since_hours: i64)
src/db/mod.rs:526
↓ 1 callersMethodget_days_needing_rollup
Get days that need to be backfilled (have requests but no rollup)
src/db/mod.rs:901
↓ 1 callersMethodget_live_stats
Get stats from live table (for today or fallback)
src/db/mod.rs:442
↓ 1 callersMethodget_location_stats
(&self, since_hours: i64, limit: i32)
src/db/mod.rs:572
↓ 1 callersFunctionget_or_create_host_key
Generate or load SSH host key
src/handlers/ssh.rs:512
↓ 1 callersMethodget_prompt
Get the shell prompt
src/handlers/ssh.rs:228
↓ 1 callersFunctionget_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 callersFunctionget_real_port
Get the real port from X-Forwarded-Port header, defaulting to 80
src/web/middleware.rs:52
↓ 1 callersMethodget_recent_commands
Get recent commands from SSH/telnet sessions (stored in payload as hex-encoded text)
src/db/mod.rs:255
↓ 1 callersMethodget_recent_credentials
(&self, limit: i32)
src/db/mod.rs:244
↓ 1 callersMethodget_recent_events
(&self, limit: i32)
src/db/mod.rs:292
↓ 1 callersMethodget_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 callersMethodget_top_ips_by_bandwidth
Get top IPs by bandwidth (rollup only)
src/db/mod.rs:673
↓ 1 callersMethodget_top_ips_by_requests
Get top IPs by request count (rollup only)
src/db/mod.rs:626
↓ 1 callersMethodget_total_bytes
Get total bytes for a time range (rollup only)
src/db/mod.rs:720
↓ 1 callersMethodget_total_count
Get total request count using MAX(rowid) for O(1) performance.
src/db/mod.rs:237
↓ 1 callersMethodhandleAttackEvent
(event)
static/app.js:93
↓ 1 callersFunctionhandle_ftp_session
( socket: tokio::net::TcpStream, ip: String, port: u16, banner: String, event_bus: Arc<Eve
src/handlers/ftp.rs:53
↓ 1 callersFunctionhandle_telnet_session
( socket: tokio::net::TcpStream, ip: String, port: u16, event_bus: Arc<EventBus>, write_tx
src/handlers/telnet.rs:161
↓ 1 callersFunctionhexDecode
* 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 callersMethodinit
()
static/app.js:18
↓ 1 callersMethodinitMap
()
static/stats.js:26
↓ 1 callersMethodis_available
Check if the GeoIP database is loaded
src/geoip.rs:73
↓ 1 callersFunctionis_private_ip
Check if an IP address is private/local
src/geoip.rs:79
↓ 1 callersMethodloadInitialData
()
static/app.js:36
↓ 1 callersFunctionlog_http_event
Log an HTTP request as an attack event
src/web/middleware.rs:187
↓ 1 callersFunctionread_telnet_line
Read a line from the socket, filtering out telnet IAC commands
src/handlers/telnet.rs:61
↓ 1 callersMethodrun_migrations
(&self)
src/db/mod.rs:126
↓ 1 callersMethodsetupElements
()
static/app.js:25
↓ 1 callersMethodsetupEventListeners
()
static/app.js:348
↓ 1 callersMethodsetupTimeFilter
()
static/stats.js:102
↓ 1 callersMethodshowAttackOnMap
(lat, lon, ip, service)
static/app.js:267
↓ 1 callersMethodshowEventDetails
(event)
static/app.js:194
↓ 1 callersFunctionstart_all
Start all protocol handlers with async write buffer
src/handlers/mod.rs:359
↓ 1 callersFunctionstart_background_tasks
Run daily rollup backfill and start background aggregation task
src/web/routes.rs:222
↓ 1 callersFunctionstart_server
(config: &Config, event_bus: EventBus, db: Database, geoip: SharedGeoIp, write_tx: WriteSender)
src/web/mod.rs:208
↓ 1 callersFunctionstart_write_buffer
Start the write buffer background task Returns a sender that handlers use to queue events
src/db/write_buffer.rs:17
↓ 1 callersMethodsubscribe
(&self)
src/events.rs:21
↓ 1 callersMethodtls_enabled
(&self)
src/config.rs:120
↓ 1 callersMethodtruncate
(str, len)
static/app.js:384
↓ 1 callersMethodupdateCommandsList
(commands)
static/app.js:295
↓ 1 callersMethodupdateCountriesChart
(countries)
static/stats.js:230
↓ 1 callersMethodupdateCredentialsList
(credentials)
static/app.js:274
next →1–100 of 172, ranked by callers