MCPcopy Create free account

hub / github.com/0ct0sec/M5PORKCHOP / functions

Functions1,576 in github.com/0ct0sec/M5PORKCHOP

↓ 294 callersFunctionmillis
Time functions - use static counter for deterministic testing
test/mocks/mock_arduino.h:15
↓ 169 callersMethodprintf
test/mocks/mock_arduino.h:171
↓ 136 callersMethodprintln
test/mocks/mock_arduino.h:162
↓ 122 callersFunctionrandom
Random - use stdlib for tests
test/mocks/mock_arduino.h:39
↓ 115 callersMethodclose
src/core/sdlog.cpp:129
↓ 108 callersMethodc_str
test/mocks/mock_arduino.h:98
↓ 95 callersMethodlength
test/mocks/mock_arduino.h:99
↓ 93 callersFunctiondelay
test/mocks/mock_arduino.h:30
↓ 93 callersMethodprint
test/mocks/mock_arduino.h:154
↓ 79 callersFunctionhasAchievement
Check if an achievement is unlocked
test/mocks/testable_functions.h:216
↓ 74 callersFunctionlog
Print with prefix
scripts/build_release.py:56
↓ 68 callersFunctionunlockAchievement
Unlock an achievement
test/mocks/testable_functions.h:221
↓ 58 callersMethodsubstring
test/mocks/mock_arduino.h:124
↓ 55 callersMethodclear
src/ui/display.cpp:474
↓ 51 callersMethodindexOf
test/mocks/mock_arduino.h:119
↓ 37 callersMethodend
test/mocks/mock_arduino.h:153
↓ 36 callersMethodbegin
test/mocks/mock_arduino.h:152
↓ 32 callersFunctionplay
src/audio/sfx.cpp:297
↓ 29 callersFunctionupdate
src/audio/sfx.cpp:337
↓ 29 callersMethodwrite
test/mocks/mock_arduino.h:174
↓ 25 callersMethodisEmpty
test/mocks/mock_arduino.h:100
↓ 24 callersFunctionpickPhraseIdx
Helper: pick random phrase avoiding last 3 used
src/piglet/mood.cpp:345
↓ 24 callersFunctionpigsyncTermPushLine
src/ui/display.cpp:1738
↓ 24 callersFunctionstartSequence
src/audio/sfx.cpp:325
↓ 23 callersMethodgetMode
src/core/porkchop.h:61
↓ 23 callersMethodgetUInt
test/mocks/mock_preferences.h:133
↓ 23 callersMethodputUInt
test/mocks/mock_preferences.h:59
↓ 22 callersFunctiondraw
src/piglet/weather.cpp:393
↓ 21 callersFunctionisPrintableASCII
Check if character is printable ASCII (32-126)
test/mocks/testable_functions.h:241
↓ 20 callersFunctioncalculateLevel
Calculate level from total XP Returns level 1-40
test/mocks/testable_functions.h:62
↓ 20 callersMethodtrim
test/mocks/mock_arduino.h:127
↓ 18 callersFunctioninit
src/audio/sfx.cpp:285
↓ 18 callersFunctionpigsyncPickPhrase
src/ui/display.cpp:1631
↓ 17 callersFunctionhaversineMeters
Haversine formula for GPS distance calculation Returns distance in meters between two lat/lon points
test/mocks/testable_functions.h:109
↓ 17 callersFunctionparseCapability
Parse capability info from raw 802.11 beacon frame
test/mocks/testable_functions.h:155
↓ 17 callersMethodremove
test/mocks/mock_preferences.h:28
↓ 17 callersFunctiontoFeatureVectorRaw
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 callersFunctionanomalyScoreRSSI
Calculate anomaly score component for signal strength Very strong signals (>-30 dBm) are suspicious
test/mocks/testable_functions.h:168
↓ 16 callersMethodupdate
src/ui/display.cpp:171
↓ 15 callersFunctionanomalyScoreBeaconInterval
Calculate anomaly score component for beacon interval Normal is ~100ms (100 TU), unusual intervals are suspicious
test/mocks/testable_functions.h:175
↓ 15 callersMethodavailable
test/mocks/mock_arduino.h:172
↓ 15 callersFunctionparseBeaconInterval
Parse beacon interval from raw 802.11 beacon frame Returns default 100 if frame is too short
test/mocks/testable_functions.h:148
↓ 13 callersFunctionescapeCSV
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 callersFunctionescapeXML
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 callersFunctionisRandomizedMAC
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 callersFunctionanomalyScoreBeaconJitter
Calculate anomaly score for beacon jitter (high jitter = software AP)
test/mocks/testable_functions.h:199
↓ 12 callersFunctionbuildDeauthFrame
Build a deauth frame in provided buffer (must be >= 26 bytes) Returns frame size (always 26)
test/mocks/testable_functions.h:862
↓ 12 callersMethodend
test/mocks/mock_preferences.h:19
↓ 12 callersFunctionlogRequest
src/web/fileserver.cpp:41
↓ 12 callersFunctionshutdown
src/core/wifi_utils.cpp:42
↓ 12 callersMethodstop
src/web/fileserver.cpp:1075
↓ 11 callersFunctionanomalyScoreOpenNetwork
Calculate anomaly score for open network
test/mocks/testable_functions.h:181
↓ 11 callersFunctionanomalyScoreWPSHoneypot
Calculate anomaly score for WPS on open network (honeypot pattern)
test/mocks/testable_functions.h:187
↓ 11 callersFunctionescapeXMLChar
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 callersFunctionneedsXMLEscape
Check if a character needs XML escaping
test/mocks/testable_functions.h:360
↓ 11 callersMethodread
test/mocks/mock_arduino.h:173
↓ 10 callersFunctionanomalyScoreMissingVendorIEs
Calculate anomaly score for missing vendor IEs (real routers have many)
test/mocks/testable_functions.h:205
↓ 10 callersFunctioninitHeader
==[ HELPER: Initialize packet header ]==
src/modes/pigsync_protocol.h:561
↓ 10 callersFunctionisCSVControlChar
Check if a character is a control character that should be stripped from CSV
test/mocks/testable_functions.h:422
↓ 10 callersMethodtoUpperCase
test/mocks/mock_arduino.h:138
↓ 9 callersFunctionanomalyScoreInconsistentPHY
Calculate anomaly score for VHT without HT (inconsistent capabilities)
test/mocks/testable_functions.h:193
↓ 9 callersFunctioncalculateVulnScore
Calculate vulnerability score based on security features From inference.cpp vuln scoring logic
test/mocks/testable_functions.h:635
↓ 9 callersFunctiongetXPForLevel
Get XP required for a specific level Returns 0 for invalid levels
test/mocks/testable_functions.h:71
↓ 9 callersFunctionisNonOverlappingChannel
Check if channel is a non-overlapping channel in US/EU (1, 6, 11)
test/mocks/testable_functions.h:285
↓ 9 callersFunctionisTransferBusy
src/web/fileserver.cpp:72
↓ 9 callersFunctionisValidSSID
Check if SSID contains only printable characters Returns true if all characters are printable, false otherwise
test/mocks/testable_functions.h:247
↓ 9 callersFunctionneedsCSVQuoting
Check if a string needs CSV quoting (contains comma, quote, newline, or CR)
test/mocks/testable_functions.h:410
↓ 9 callersMethodnextSeq
src/modes/pigsync_protocol.h:606
↓ 9 callersFunctionparseMAC
Parse MAC address from colon-separated hex string Returns true if parsing succeeded, false otherwise
test/mocks/testable_functions.h:748
↓ 9 callersFunctionsendBusyResponse
src/web/fileserver.cpp:76
↓ 9 callersFunctionstop
src/audio/sfx.cpp:497
↓ 8 callersFunctiongetColorBG
src/ui/display.cpp:70
↓ 8 callersFunctiongetColorFG
src/ui/display.cpp:64
↓ 8 callersFunctiongetLevelProgress
Calculate progress percentage to next level (0-100)
test/mocks/testable_functions.h:85
↓ 8 callersFunctioninitPCAPHeader
Initialize PCAP global header with standard values
test/mocks/testable_functions.h:813
↓ 8 callersFunctionqueuePhrases
src/piglet/mood.cpp:120
↓ 8 callersFunctionrssiToQuality
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 callersMethodsetCapability
test/test_beacon/test_beacon_parsing.cpp:50
↓ 7 callersFunctioncalculateDeauthScore
Calculate deauth target score based on network characteristics From inference.cpp deauth scoring logic
test/mocks/testable_functions.h:663
↓ 7 callersFunctionchannelToFrequency
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 callersFunctionclampScore
Clamp a value to [0, 1] range
test/mocks/testable_functions.h:627
↓ 7 callersMethoddisconnect
src/modes/pigsync_client.cpp:1704
↓ 7 callersFunctionfrequencyToChannel
Calculate channel from frequency
test/mocks/testable_functions.h:298
↓ 7 callersMethodisComplete
src/modes/oink.h:71
↓ 7 callersFunctionisMulticastMAC
Check if MAC is multicast (group bit set) The first bit of the first octet indicates multicast
test/mocks/testable_functions.h:135
↓ 7 callersFunctionlogHeap
Lightweight heap logger for diagnostics
src/web/wpasec.cpp:25
↓ 7 callersFunctionlogHeapStatusIfLow
src/web/fileserver.cpp:63
↓ 7 callersFunctionlog_err
(msg)
scripts/build_release.py:65
↓ 7 callersMethodsetBeaconInterval
test/test_beacon/test_beacon_parsing.cpp:45
↓ 6 callersFunctionbssidToKey
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 callersFunctioncalculateEvilTwinScore
Calculate evil twin score based on network characteristics From inference.cpp evil twin detection
test/mocks/testable_functions.h:681
↓ 6 callersFunctionfindMaxIndex
Find index of maximum value in array Returns 0 if array is empty
test/mocks/testable_functions.h:613
↓ 6 callersFunctionformatMAC
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 callersFunctiongetSettingValue
src/ui/settings_menu.cpp:397
↓ 6 callersMethodhasBuff
src/ui/swine_stats.h:46
↓ 6 callersFunctionlog_ok
(msg)
scripts/build_release.py:61
↓ 6 callersFunctionnormalizeScores
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 callersFunctionnormalizeValue
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 callersFunctionopenFileWithRetry
Helper: Open SD file with retry logic
src/modes/warhog.cpp:51
↓ 6 callersFunctionsendControlPacket
src/modes/pigsync_client.cpp:200
next →1–100 of 1,576, ranked by callers