Skip to content

Commit

Permalink
test actions
Browse files Browse the repository at this point in the history
  • Loading branch information
fukusuket committed Feb 29, 2024
1 parent 4ca636e commit 7e89e43
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/takajopkg/extractScriptblocks.nim
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ proc outputScriptText(output: string, timestamp: string, computerName: string,
scriptText = scriptText & text.replace("\\r\\n", "\p").replace("\\n", "\p").replace("\\t", "\t").replace("\\\"", "\"")
let date = timestamp.replace(":", "_").replace(" ", "_")
let fileName = expandFilename(output) & "/" & computerName & "-" & date & "-" & scriptObj.scriptBlockId & ".txt"
echo "dkajf;ldkjaf;"
var outputFile = open(filename, fmWrite)
outputFile.write(scriptText)
flushFile(outputFile)
Expand Down Expand Up @@ -68,6 +69,7 @@ proc extractScriptblocks(level: string = "low", output: string = "scriptblock-lo
echo expandFilename(output)
createDir(output)
echo ""
echo "hogehoge"

var
bar: SuruBar = initSuruBar()
Expand Down Expand Up @@ -125,14 +127,17 @@ proc extractScriptblocks(level: string = "low", output: string = "scriptblock-lo
levels:toHashSet([eventLevel]), ruleTitles:toHashSet([ruleTitle]))

let scriptObj = stackedRecords[scriptBlockId]
cho "fugauga"
if messageNumber == messageTotal:
if scriptBlockId in summaryRecords:
summaryRecords[scriptBlockId] = buildSummaryRecord(path, messageTotal, scriptObj)
# Already outputted
continue
cho "qwerty"
outputScriptText(output, timestamp, computerName, scriptObj)
summaryRecords[scriptBlockId] = buildSummaryRecord(path, messageTotal, scriptObj)
elif currentIndex + 1 == totalLines:
cho "zaqwsx"
outputScriptText(output, timestamp, computerName, scriptObj)
summaryRecords[scriptBlockId] = buildSummaryRecord(path, messageTotal, scriptObj)

Expand Down

0 comments on commit 7e89e43

Please sign in to comment.