diff options
| author | JJ <[email protected]> | 2022-06-28 21:25:59 -0400 |
|---|---|---|
| committer | JJ <[email protected]> | 2022-06-28 21:25:59 -0400 |
| commit | f816eb92e9b30a5721bb9e5d7f0b1ce90161116f (patch) | |
| tree | f1ca7481c963183612d77efaa91dfa6f6b41b869 /data-analysis-router/ciphers/data.ps1 | |
| parent | 0609b02f82321577ba80cd368c6085fd0442f3f7 (diff) | |
Cipher comparison on non-AES hardware
Compares measurement capabilities (for AES vs CHACHA ciphers) on an older "low-end" router that does not have AES hardware support. More information in README.md
Diffstat (limited to 'data-analysis-router/ciphers/data.ps1')
| -rw-r--r-- | data-analysis-router/ciphers/data.ps1 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/data-analysis-router/ciphers/data.ps1 b/data-analysis-router/ciphers/data.ps1 new file mode 100644 index 0000000..7210813 --- /dev/null +++ b/data-analysis-router/ciphers/data.ps1 @@ -0,0 +1,22 @@ +$FILENAME = "./CHACHA/originalSamples.log" +$OUTPUTFILE = "./CHACHAOut.csv" + +$RAWDATA = Get-Content $FILENAME -Raw + +# Expected Output +# Download: 66.228 Mbps ( 8.279 MBps), using 16 parallel connections. +# Upload: 36.257 Mbps ( 4.532 MBps), using 16 parallel connections. +# Total measurements: 15 +# RPM: 213 + +$PATTERN = ("Download:\s+(?<Download>\d*\.\d*) Mbps.*using (?<DownloadConnections>\d*) parallel connections.\n" + + "Upload:\s+(?<Upload>\d*\.\d*) Mbps.*using (?<UploadConnections>\d*) parallel connections.\n" + + ".*\n" + + "RPM:\s+(?<RPM>\d*)") + +"Download (Mbps), Upload(Mbps), Download Connections, Upload Connections, RPM" > $OUTPUTFILE + +$Matches = $RAWDATA | Select-String -Pattern $PATTERN -AllMatches +Foreach ($Match in $Matches.Matches) { + $Match.groups["Download"].Value.ToString() + "," + $Match.groups["Upload"].Value.ToString() + "," + $Match.groups["DownloadConnections"].Value.ToString() + "," + $Match.groups["UploadConnections"].Value.ToString() + "," + $Match.groups["RPM"].Value.ToString() >> $OUTPUTFILE +}
\ No newline at end of file |
