From b9e0de4837dcf5bf6ed674db6461a8db340e07a4 Mon Sep 17 00:00:00 2001 From: you8023 <16202488+you8023@users.noreply.github.com> Date: Wed, 26 Feb 2025 03:51:51 +0800 Subject: [PATCH] Fix some mistake in T1560.002 and T1016.001 (#3056) Co-authored-by: Bhavin Patel --- atomics/T1016.001/T1016.001.md | 2 +- atomics/T1016.001/T1016.001.yaml | 2 +- atomics/T1560.002/T1560.002.md | 2 +- atomics/T1560.002/T1560.002.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/atomics/T1016.001/T1016.001.md b/atomics/T1016.001/T1016.001.md index f75109f479..97e47407b7 100644 --- a/atomics/T1016.001/T1016.001.md +++ b/atomics/T1016.001/T1016.001.md @@ -78,7 +78,7 @@ Check internet connection using ping on Linux, MACOS. The default target of the ```bash -ping -n 4 #{ping_target} +ping -c 4 #{ping_target} ``` diff --git a/atomics/T1016.001/T1016.001.yaml b/atomics/T1016.001/T1016.001.yaml index 5bdc5d26aa..8aa89f9385 100644 --- a/atomics/T1016.001/T1016.001.yaml +++ b/atomics/T1016.001/T1016.001.yaml @@ -33,7 +33,7 @@ atomic_tests: name: bash elevation_required: false command: | - ping -n 4 #{ping_target} + ping -c 4 #{ping_target} - name: Check internet connection using Test-NetConnection in PowerShell (ICMP-Ping) auto_generated_guid: f8160cde-4e16-4c8b-8450-6042d5363eb0 description: | diff --git a/atomics/T1560.002/T1560.002.md b/atomics/T1560.002/T1560.002.md index a267fac707..9325352ac5 100644 --- a/atomics/T1560.002/T1560.002.md +++ b/atomics/T1560.002/T1560.002.md @@ -198,7 +198,7 @@ Uses tarfile from Python to compress files ```sh which_python=`which python || which python3` -$which_python -c "from zipfile import ZipFile; ZipFile('#{path_to_output_file}', mode='w').write('#{path_to_input_file}')" +$which_python -c "import tarfile; output_file = tarfile.open('#{path_to_output_file}','w'); output_file.add('#{path_to_input_file}'); output_file.close()" ``` #### Cleanup Commands: diff --git a/atomics/T1560.002/T1560.002.yaml b/atomics/T1560.002/T1560.002.yaml index 1fe8491105..7350b23232 100644 --- a/atomics/T1560.002/T1560.002.yaml +++ b/atomics/T1560.002/T1560.002.yaml @@ -123,6 +123,6 @@ atomic_tests: elevation_required: false command: | which_python=`which python || which python3` - $which_python -c "from zipfile import ZipFile; ZipFile('#{path_to_output_file}', mode='w').write('#{path_to_input_file}')" + $which_python -c "import tarfile; output_file = tarfile.open('#{path_to_output_file}','w'); output_file.add('#{path_to_input_file}'); output_file.close()" cleanup_command: | rm #{path_to_output_file}