The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationError
Exception: TypeError
Message: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1531, in _prepare_split_single
for key, record in generator:
^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 613, in wrapped
for item in generator(*args, **kwargs):
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/webdataset/webdataset.py", line 127, in _generate_examples
for example_idx, example in enumerate(self._get_pipeline_from_tar(tar_path, tar_iterator)):
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/webdataset/webdataset.py", line 32, in _get_pipeline_from_tar
for filename, f in tar_iterator:
^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/utils/track.py", line 49, in __iter__
for x in self.generator(*self.args):
~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/utils/file_utils.py", line 1405, in _iter_from_urlpath
with xopen(urlpath, "rb", download_config=download_config, block_size=0) as f:
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/utils/file_utils.py", line 982, in xopen
file_obj = fs.open(paths[0], mode)
File "<string>", line 3, in open
File "/usr/local/lib/python3.14/unittest/mock.py", line 1176, in __call__
return self._mock_call(*args, **kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/unittest/mock.py", line 1180, in _mock_call
return self._execute_mock_call(*args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/unittest/mock.py", line 1247, in _execute_mock_call
result = effect(*args, **kwargs)
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 786, in wrapped
tracker.files[urlpath] = {"read": 0, "size": int(f.size)}
~~~^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1393, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1571, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
ps1 unknown | __key__ string | __url__ string |
|---|---|---|
[
102,
117,
110,
99,
116,
105,
111,
110,
32,
71,
101,
116,
45,
85,
115,
101,
114,
40,
36,
117,
115,
101,
114,
41,
13,
10,
123,
13,
10,
9,
35,
32,
116,
104,
105,
115,
32,
102,
117,
110,
99,
116,
105,
111,
110,
32,
115,
104,
... | ./ast_ps1_by_label/0/train-00005-of-00010_row01300 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
[
60,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
35,
13,
... | ./ast_ps1_by_label/0/test-00003-of-00007_row01494 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
[
80,
97,
114,
97,
109,
32,
40,
13,
10,
32,
32,
32,
32,
91,
80,
97,
114,
97,
109,
101,
116,
101,
114,
40,
77,
97,
110,
100,
97,
116,
111,
114,
121,
61,
36,
70,
97,
108,
115,
101,
41,
93,
13,
10,
32,
32,
32,
32,
91,
115,
... | ./ast_ps1_by_label/0/train-00008-of-00010_row00123 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
[
64,
123,
13,
10,
71,
85,
73,
68,
61,
34,
65,
57,
52,
67,
56,
67,
55,
69,
45,
57,
56,
49,
48,
45,
52,
55,
67,
48,
45,
66,
56,
65,
70,
45,
54,
53,
48,
56,
57,
67,
49,
51,
65,
51,
53,
65,
34,
13,
10,
65,
117,
116,
1... | ./ast_ps1_by_label/0/train-00005-of-00010_row01191 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
[
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
102,
117,
110,
99,
116,
105,
111,
110,
32,
84,
101,
115,
116,
45,
65,
99,
99,
111,
117,
110,
116,
67,
114,
117,
100,
10,
123,
10,
32,
32,
32,
32,
36,
114,
101... | ./ast_ps1_by_label/0/train-00007-of-00010_row00370 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
[
35,
32,
80,
111,
119,
101,
114,
83,
104,
101,
108,
108,
32,
83,
99,
114,
105,
112,
116,
105,
110,
103,
32,
66,
101,
115,
116,
32,
80,
114,
97,
99,
116,
105,
99,
101,
115,
10,
10,
84,
104,
105,
115,
32,
100,
111,
99,
117,
... | ./ast_ps1_by_label/0/train-00007-of-00010_row00816 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
[
112,
97,
114,
97,
109,
40,
13,
10,
32,
32,
32,
32,
35,
32,
70,
111,
108,
100,
101,
114,
32,
97,
99,
99,
101,
115,
115,
32,
112,
97,
116,
104,
32,
102,
111,
114,
32,
109,
111,
117,
110,
116,
101,
100,
32,
100,
114,
105,
1... | ./ast_ps1_by_label/0/train-00005-of-00010_row00795 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
[
35,
32,
71,
101,
116,
83,
109,
115,
76,
111,
103,
115,
46,
112,
115,
109,
49,
32,
104,
116,
116,
112,
115,
58,
47,
47,
103,
105,
116,
104,
117,
98,
46,
99,
111,
109,
47,
110,
101,
100,
112,
121,
108,
101,
47,
115,
116,
111... | ./ast_ps1_by_label/0/test-00006-of-00007_row00831 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
[
70,
117,
110,
99,
116,
105,
111,
110,
32,
78,
101,
119,
45,
83,
99,
114,
105,
112,
116,
13,
10,
123,
13,
10,
36,
115,
116,
114,
78,
97,
109,
101,
32,
61,
32,
36,
101,
110,
118,
58,
117,
115,
101,
114,
110,
97,
109,
101,
... | ./ast_ps1_by_label/0/train-00007-of-00010_row00584 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
[
60,
35,
32,
13,
10,
35,
82,
117,
110,
32,
116,
104,
101,
32,
102,
111,
108,
108,
111,
119,
105,
110,
103,
32,
99,
111,
100,
101,
32,
116,
111,
32,
99,
114,
101,
97,
116,
101,
32,
79,
112,
115,
77,
103,
114,
32,
109,
111,
... | ./ast_ps1_by_label/0/train-00009-of-00010_row02193 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
[
36,
114,
101,
115,
111,
117,
114,
99,
101,
77,
111,
100,
117,
108,
101,
82,
111,
111,
116,
32,
61,
32,
83,
112,
108,
105,
116,
45,
80,
97,
116,
104,
32,
45,
80,
97,
116,
104,
32,
40,
83,
112,
108,
105,
116,
45,
80,
97,
1... | ./ast_ps1_by_label/0/test-00006-of-00007_row01600 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
[
35,
114,
101,
113,
117,
105,
114,
101,
115,
32,
45,
118,
101,
114,
115,
105,
111,
110,
32,
50,
13,
10,
13,
10,
35,
67,
104,
97,
100,
32,
77,
105,
108,
108,
101,
114,
13,
10,
35,
104,
116,
116,
112,
58,
47,
47,
119,
119,
... | ./ast_ps1_by_label/0/train-00005-of-00010_row02468 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
[
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
91,
67,
109,
100,
108,
101,
116,
66,
105,
110,
100,
105,
110,
103,
40,
41,
93,
10,
112,
97,
114,
97,
109,
40,
10,
41,
10,
10,
36,
115,
105,
108,
107,
74,
115,
111... | ./ast_ps1_by_label/0/train-00008-of-00010_row00041 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
[
10,
10,
10,
10,
10,
102,
117,
110,
99,
116,
105,
111,
110,
32,
71,
101,
116,
45,
73,
115,
115,
117,
101,
10,
123,
10,
32,
32,
32,
32,
112,
97,
114,
97,
109,
40,
91,
115,
116,
114,
105,
110,
103,
93,
36,
85,
115,
101,
114... | ./ast_ps1_by_label/0/train-00005-of-00010_row00559 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
[
10,
10,
10,
10,
99,
108,
97,
115,
115,
32,
80,
108,
117,
103,
105,
110,
69,
120,
99,
101,
112,
116,
105,
111,
110,
32,
58,
32,
69,
120,
99,
101,
112,
116,
105,
111,
110,
32,
123,
10,
32,
32,
32,
32,
80,
108,
117,
103,
10... | ./ast_ps1_by_label/0/train-00009-of-00010_row02159 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
[
35,
32,
97,
117,
116,
104,
111,
114,
58,
32,
72,
97,
108,
32,
82,
111,
116,
116,
101,
110,
98,
101,
114,
103,
13,
10,
35,
32,
87,
101,
98,
115,
105,
116,
101,
47,
79,
112,
101,
110,
73,
68,
58,
32,
104,
116,
116,
112,
58... | ./ast_ps1_by_label/0/train-00005-of-00010_row00264 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
[
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
102,
117,
110,
99,
116,
105,
111,
110,
32,
84,
101,
115,
116,
45,
71,
101,
116,
82,
101,
115,
101,
114,
118,
97,
116,
105,
111,
110,
79,
114,
100,
101,
114,
10,... | ./ast_ps1_by_label/0/train-00008-of-00010_row02180 | hf://datasets/wwe123/Benign_and_malicious_PowerShell_scripts@f3954a30aa723a79ba82dc01022c807b2b7b8457/ast_ps1_by_label.tar.gz |
Benign and Malicious PowerShell Scripts
Dataset summary
This dataset contains 30,595 high-quality PowerShell scripts for binary benign/malicious classification and static-analysis research. It includes both unobfuscated and heavily obfuscated PowerShell, with obfuscation techniques including—but not limited to—multiple encoding schemes.
All published samples were validated as parseable with Microsoft's official PowerShell parser, System.Management.Automation.Language.Parser, and can be converted into a PowerShell abstract syntax tree (AST) without executing the script.
Safety warning: This dataset contains potentially malicious PowerShell code. Treat every sample as untrusted. Do not execute samples on a host system. Use isolated, non-production environments and static-analysis tooling only.
中文简介
本数据集包含 30,595 份高质量 PowerShell 脚本,覆盖良性与恶意两类样本,适用于二分类、静态分析、恶意代码检测、混淆识别及基于 AST 的研究。
数据中包含大量高质量混淆样本,混淆方式包括但不限于多种编码方式。所有公开样本均已验证能够通过微软官方 PowerShell 解析器 System.Management.Automation.Language.Parser 成功解析并提取抽象语法树(AST),无需执行脚本。
安全提示: 数据集中可能包含恶意代码。请将所有样本视为不可信内容,不要直接执行;建议仅在隔离、非生产环境中进行静态分析。
Key characteristics
- Task: binary classification of PowerShell scripts
- Content: benign and malicious
.ps1files - Total samples: 30,595
- Obfuscation: includes multiple encoding and other PowerShell obfuscation techniques
- Syntax quality: every sample is parseable by the official PowerShell AST parser
- Representation: one script per file, organized by numeric label
- Source split traceability: original split, shard, and row identifiers are retained in filenames
Dataset structure
The downloadable archive is ast_ps1_by_label.tar.gz (approximately 5.21 GB / 4.85 GiB compressed) and expands to:
The dataset uses the following label convention:
| Directory | Label | Samples |
|---|---|---|
0/ |
Benign | 15,173 |
1/ |
Malicious | 15,422 |
- Downloads last month
- 102