mirror of
https://github.com/mukul975/Anthropic-Cybersecurity-Skills.git
synced 2026-09-02 14:40:51 +03:00
Merge pull request #113 from farhan6667/fix/ioc-extraction-agent-report-timestamp
Fix always-empty timestamp in performing-malware-ioc-extraction agent.py report
This commit is contained in:
@@ -5,6 +5,7 @@ import json
|
|||||||
import argparse
|
import argparse
|
||||||
import re
|
import re
|
||||||
import hashlib
|
import hashlib
|
||||||
|
from datetime import datetime, timezone
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
@@ -102,7 +103,7 @@ def generate_ioc_report(file_path, output=None):
|
|||||||
hashes = hash_file(file_path)
|
hashes = hash_file(file_path)
|
||||||
strings = extract_strings(file_path)
|
strings = extract_strings(file_path)
|
||||||
report = {
|
report = {
|
||||||
"generated": datetime.utcnow().isoformat() if "datetime" in dir() else "",
|
"generated": datetime.now(timezone.utc).isoformat(),
|
||||||
"file_info": hashes,
|
"file_info": hashes,
|
||||||
"strings_analysis": {
|
"strings_analysis": {
|
||||||
"total": strings["total_strings"],
|
"total": strings["total_strings"],
|
||||||
|
|||||||
Reference in New Issue
Block a user