Skip to content

Commit

Permalink
feat: output numbers with decimal points
Browse files Browse the repository at this point in the history
  • Loading branch information
fukusuket committed Mar 1, 2024
1 parent d19d935 commit 6ffd0d4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/takajopkg/listUndetectedEvtxFiles.nim
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ proc listUndetectedEvtxFiles(columnName: system.string = "EvtxFile", evtxDir: st
inc numberOfEvtxFiles
outputStock.add("")
let undetectedPercentage = (checkResult.len() / fileLists.len()) * 100
let numberOfEvtxFilesStr = intToStr(numberOfEvtxFiles).insertSep(',')
echo fmt"{ undetectedPercentage :.4}% of the evtx files did not have any detections."
echo fmt"Number of evtx files not detected: {numberOfEvtxFiles}"
echo fmt"Number of evtx files not detected: {numberOfEvtxFilesStr}"
echo ""
if output != "":
let f = open(output, fmWrite)
Expand Down
3 changes: 2 additions & 1 deletion src/takajopkg/listUnusedRules.nim
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ proc listUnusedRules(columnName: string = "RuleFile", output: string = "", quiet
inc numberOfUnusedRules
let undetectedPercentage = (checkResult.len() / fileLists.len()) * 100
outputStock.add("")
let numberOfUnusedRulesStr = intToStr(numberOfUnusedRules).insertSep(',')
echo fmt"{ undetectedPercentage :.4}% of the yml rules were not used."
echo fmt"Number of unused rule files: {numberOfUnusedRules}"
echo fmt"Number of unused rule files: {numberOfUnusedRulesStr}"
echo ""
if output != "":
let f = open(output, fmWrite)
Expand Down
12 changes: 6 additions & 6 deletions src/takajopkg/timelineLogon.nim
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ proc timelineLogon(calculateElapsedTime: bool = true, output: string, outputLogo
tableOfResults[]["AdminLogon"] = "Yes"

echo "Found logon events:"
echo "EID 4624 (Successful Logon): ", EID_4624_count
echo "EID 4625 (Failed Logon): ", EID_4625_count
echo "EID 4634 (Logoff): ", EID_4634_count
echo "EID 4647 (User Initiated Logoff): ", EID_4647_count
echo "EID 4648 (Explicit Logon): ", EID_4648_count
echo "EID 4672 (Admin Logon): ", EID_4672_count
echo "EID 4624 (Successful Logon): ", intToStr(EID_4624_count).insertSep(',')
echo "EID 4625 (Failed Logon): ", intToStr(EID_4625_count).insertSep(',')
echo "EID 4634 (Logoff): ", intToStr(EID_4634_count).insertSep(',')
echo "EID 4647 (User Initiated Logoff): ", intToStr(EID_4647_count).insertSep(',')
echo "EID 4648 (Explicit Logon): ", intToStr(EID_4648_count).insertSep(',')
echo "EID 4672 (Admin Logon): ", intToStr(EID_4672_count).insertSep(',')
echo ""

# Save results
Expand Down
4 changes: 2 additions & 2 deletions src/takajopkg/timelineSuspiciousProcesses.nim
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ proc timelineSuspiciousProcesses(level: string = "high", output: string = "", qu
echo ""
return

echo "Suspicious processes in Security 4688 process creation events: " & $suspicousProcessCount_Sec_4688
echo "Suspicious processes in Sysmon 1 process creation events: " & $suspicousProcessCount_Sysmon_1
echo "Suspicious processes in Security 4688 process creation events: " & intToStr(suspicousProcessCount_Sec_4688).insertSep(',')
echo "Suspicious processes in Sysmon 1 process creation events: " & intToStr(suspicousProcessCount_Sysmon_1).insertSep(',')
echo ""
outputElapsedTime(startTime)

0 comments on commit 6ffd0d4

Please sign in to comment.