Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/0ct0sec/M5PORKCHOP
/ functions
Functions
1,576 in github.com/0ct0sec/M5PORKCHOP
⨍
Functions
1,576
◇
Types & classes
184
↓ 294 callers
Function
millis
Time functions - use static counter for deterministic testing
test/mocks/mock_arduino.h:15
↓ 169 callers
Method
printf
test/mocks/mock_arduino.h:171
↓ 136 callers
Method
println
test/mocks/mock_arduino.h:162
↓ 122 callers
Function
random
Random - use stdlib for tests
test/mocks/mock_arduino.h:39
↓ 115 callers
Method
close
src/core/sdlog.cpp:129
↓ 108 callers
Method
c_str
test/mocks/mock_arduino.h:98
↓ 95 callers
Method
length
test/mocks/mock_arduino.h:99
↓ 93 callers
Function
delay
test/mocks/mock_arduino.h:30
↓ 93 callers
Method
print
test/mocks/mock_arduino.h:154
↓ 79 callers
Function
hasAchievement
Check if an achievement is unlocked
test/mocks/testable_functions.h:216
↓ 74 callers
Function
log
Print with prefix
scripts/build_release.py:56
↓ 68 callers
Function
unlockAchievement
Unlock an achievement
test/mocks/testable_functions.h:221
↓ 58 callers
Method
substring
test/mocks/mock_arduino.h:124
↓ 55 callers
Method
clear
src/ui/display.cpp:474
↓ 51 callers
Method
indexOf
test/mocks/mock_arduino.h:119
↓ 37 callers
Method
end
test/mocks/mock_arduino.h:153
↓ 36 callers
Method
begin
test/mocks/mock_arduino.h:152
↓ 32 callers
Function
play
src/audio/sfx.cpp:297
↓ 29 callers
Function
update
src/audio/sfx.cpp:337
↓ 29 callers
Method
write
test/mocks/mock_arduino.h:174
↓ 25 callers
Method
isEmpty
test/mocks/mock_arduino.h:100
↓ 24 callers
Function
pickPhraseIdx
Helper: pick random phrase avoiding last 3 used
src/piglet/mood.cpp:345
↓ 24 callers
Function
pigsyncTermPushLine
src/ui/display.cpp:1738
↓ 24 callers
Function
startSequence
src/audio/sfx.cpp:325
↓ 23 callers
Method
getMode
src/core/porkchop.h:61
↓ 23 callers
Method
getUInt
test/mocks/mock_preferences.h:133
↓ 23 callers
Method
putUInt
test/mocks/mock_preferences.h:59
↓ 22 callers
Function
draw
src/piglet/weather.cpp:393
↓ 21 callers
Function
isPrintableASCII
Check if character is printable ASCII (32-126)
test/mocks/testable_functions.h:241
↓ 20 callers
Function
calculateLevel
Calculate level from total XP Returns level 1-40
test/mocks/testable_functions.h:62
↓ 20 callers
Method
trim
test/mocks/mock_arduino.h:127
↓ 18 callers
Function
init
src/audio/sfx.cpp:285
↓ 18 callers
Function
pigsyncPickPhrase
src/ui/display.cpp:1631
↓ 17 callers
Function
haversineMeters
Haversine formula for GPS distance calculation Returns distance in meters between two lat/lon points
test/mocks/testable_functions.h:109
↓ 17 callers
Function
parseCapability
Parse capability info from raw 802.11 beacon frame
test/mocks/testable_functions.h:155
↓ 17 callers
Method
remove
test/mocks/mock_preferences.h:28
↓ 17 callers
Function
toFeatureVectorRaw
Convert WiFiFeatures to feature vector (pure function, no normalization) Mirrors src/ml/features.cpp toFeatureVector but without normParams
test/mocks/testable_functions.h:561
↓ 16 callers
Function
anomalyScoreRSSI
Calculate anomaly score component for signal strength Very strong signals (>-30 dBm) are suspicious
test/mocks/testable_functions.h:168
↓ 16 callers
Method
update
src/ui/display.cpp:171
↓ 15 callers
Function
anomalyScoreBeaconInterval
Calculate anomaly score component for beacon interval Normal is ~100ms (100 TU), unusual intervals are suspicious
test/mocks/testable_functions.h:175
↓ 15 callers
Method
available
test/mocks/mock_arduino.h:172
↓ 15 callers
Function
parseBeaconInterval
Parse beacon interval from raw 802.11 beacon frame Returns default 100 if frame is too short
test/mocks/testable_functions.h:148
↓ 13 callers
Function
escapeCSV
Escape a string for CSV output (handles quoting and control char stripping) Always wraps in quotes for SSID fields (as per RFC 4180 for fields with sp
test/mocks/testable_functions.h:431
↓ 13 callers
Function
escapeXML
Escape a string for XML output Returns the number of characters written to output (not including null terminator) If output is nullptr, just returns t
test/mocks/testable_functions.h:369
↓ 13 callers
Function
isRandomizedMAC
Check if MAC address is randomized (locally administered bit set) The second bit of the first octet indicates locally administered
test/mocks/testable_functions.h:129
↓ 12 callers
Function
anomalyScoreBeaconJitter
Calculate anomaly score for beacon jitter (high jitter = software AP)
test/mocks/testable_functions.h:199
↓ 12 callers
Function
buildDeauthFrame
Build a deauth frame in provided buffer (must be >= 26 bytes) Returns frame size (always 26)
test/mocks/testable_functions.h:862
↓ 12 callers
Method
end
test/mocks/mock_preferences.h:19
↓ 12 callers
Function
logRequest
src/web/fileserver.cpp:41
↓ 12 callers
Function
shutdown
src/core/wifi_utils.cpp:42
↓ 12 callers
Method
stop
src/web/fileserver.cpp:1075
↓ 11 callers
Function
anomalyScoreOpenNetwork
Calculate anomaly score for open network
test/mocks/testable_functions.h:181
↓ 11 callers
Function
anomalyScoreWPSHoneypot
Calculate anomaly score for WPS on open network (honeypot pattern)
test/mocks/testable_functions.h:187
↓ 11 callers
Function
escapeXMLChar
Escape a single character for XML output Returns pointer to static string with escaped version, or nullptr if no escaping needed
test/mocks/testable_functions.h:348
↓ 11 callers
Function
needsXMLEscape
Check if a character needs XML escaping
test/mocks/testable_functions.h:360
↓ 11 callers
Method
read
test/mocks/mock_arduino.h:173
↓ 10 callers
Function
anomalyScoreMissingVendorIEs
Calculate anomaly score for missing vendor IEs (real routers have many)
test/mocks/testable_functions.h:205
↓ 10 callers
Function
initHeader
==[ HELPER: Initialize packet header ]==
src/modes/pigsync_protocol.h:561
↓ 10 callers
Function
isCSVControlChar
Check if a character is a control character that should be stripped from CSV
test/mocks/testable_functions.h:422
↓ 10 callers
Method
toUpperCase
test/mocks/mock_arduino.h:138
↓ 9 callers
Function
anomalyScoreInconsistentPHY
Calculate anomaly score for VHT without HT (inconsistent capabilities)
test/mocks/testable_functions.h:193
↓ 9 callers
Function
calculateVulnScore
Calculate vulnerability score based on security features From inference.cpp vuln scoring logic
test/mocks/testable_functions.h:635
↓ 9 callers
Function
getXPForLevel
Get XP required for a specific level Returns 0 for invalid levels
test/mocks/testable_functions.h:71
↓ 9 callers
Function
isNonOverlappingChannel
Check if channel is a non-overlapping channel in US/EU (1, 6, 11)
test/mocks/testable_functions.h:285
↓ 9 callers
Function
isTransferBusy
src/web/fileserver.cpp:72
↓ 9 callers
Function
isValidSSID
Check if SSID contains only printable characters Returns true if all characters are printable, false otherwise
test/mocks/testable_functions.h:247
↓ 9 callers
Function
needsCSVQuoting
Check if a string needs CSV quoting (contains comma, quote, newline, or CR)
test/mocks/testable_functions.h:410
↓ 9 callers
Method
nextSeq
src/modes/pigsync_protocol.h:606
↓ 9 callers
Function
parseMAC
Parse MAC address from colon-separated hex string Returns true if parsing succeeded, false otherwise
test/mocks/testable_functions.h:748
↓ 9 callers
Function
sendBusyResponse
src/web/fileserver.cpp:76
↓ 9 callers
Function
stop
src/audio/sfx.cpp:497
↓ 8 callers
Function
getColorBG
src/ui/display.cpp:70
↓ 8 callers
Function
getColorFG
src/ui/display.cpp:64
↓ 8 callers
Function
getLevelProgress
Calculate progress percentage to next level (0-100)
test/mocks/testable_functions.h:85
↓ 8 callers
Function
initPCAPHeader
Initialize PCAP global header with standard values
test/mocks/testable_functions.h:813
↓ 8 callers
Function
queuePhrases
src/piglet/mood.cpp:120
↓ 8 callers
Function
rssiToQuality
Convert RSSI to signal quality percentage (0-100) Uses typical range of -90 dBm (weak) to -30 dBm (strong)
test/mocks/testable_functions.h:310
↓ 8 callers
Method
setCapability
test/test_beacon/test_beacon_parsing.cpp:50
↓ 7 callers
Function
calculateDeauthScore
Calculate deauth target score based on network characteristics From inference.cpp deauth scoring logic
test/mocks/testable_functions.h:663
↓ 7 callers
Function
channelToFrequency
Calculate center frequency for 2.4GHz channel in MHz Channel 1 = 2412 MHz, each channel +5 MHz (except ch14 = 2484)
test/mocks/testable_functions.h:291
↓ 7 callers
Function
clampScore
Clamp a value to [0, 1] range
test/mocks/testable_functions.h:627
↓ 7 callers
Method
disconnect
src/modes/pigsync_client.cpp:1704
↓ 7 callers
Function
frequencyToChannel
Calculate channel from frequency
test/mocks/testable_functions.h:298
↓ 7 callers
Method
isComplete
src/modes/oink.h:71
↓ 7 callers
Function
isMulticastMAC
Check if MAC is multicast (group bit set) The first bit of the first octet indicates multicast
test/mocks/testable_functions.h:135
↓ 7 callers
Function
logHeap
Lightweight heap logger for diagnostics
src/web/wpasec.cpp:25
↓ 7 callers
Function
logHeapStatusIfLow
src/web/fileserver.cpp:63
↓ 7 callers
Function
log_err
(msg)
scripts/build_release.py:65
↓ 7 callers
Method
setBeaconInterval
test/test_beacon/test_beacon_parsing.cpp:45
↓ 6 callers
Function
bssidToKey
Convert 6-byte MAC address to 64-bit key for map/set storage Uses big-endian packing: mac[0] in highest byte position
test/mocks/testable_functions.h:697
↓ 6 callers
Function
calculateEvilTwinScore
Calculate evil twin score based on network characteristics From inference.cpp evil twin detection
test/mocks/testable_functions.h:681
↓ 6 callers
Function
findMaxIndex
Find index of maximum value in array Returns 0 if array is empty
test/mocks/testable_functions.h:613
↓ 6 callers
Function
formatMAC
Format MAC address as colon-separated hex string Output buffer must be at least 18 bytes (17 chars + null) Returns number of characters written (not i
test/mocks/testable_functions.h:729
↓ 6 callers
Function
getSettingValue
src/ui/settings_menu.cpp:397
↓ 6 callers
Method
hasBuff
src/ui/swine_stats.h:46
↓ 6 callers
Function
log_ok
(msg)
scripts/build_release.py:61
↓ 6 callers
Function
normalizeScores
Normalize an array of scores so they sum to 1.0 Returns false if all scores are zero (no normalization possible)
test/mocks/testable_functions.h:599
↓ 6 callers
Function
normalizeValue
Normalize a value using z-score normalization Returns 0 if std is too small to avoid division by zero
test/mocks/testable_functions.h:141
↓ 6 callers
Function
openFileWithRetry
Helper: Open SD file with retry logic
src/modes/warhog.cpp:51
↓ 6 callers
Function
sendControlPacket
src/modes/pigsync_client.cpp:200
next →
1–100 of 1,576, ranked by callers