Skip to main content

python-nidsdata

这是一个封装了KDDCup99、NSL-KDD、UNSW-NB15等入侵监测数据集的Python包。

安装

pip install nidsdata

使用

KDDCup99

from nidsdata import load_kddcup99_data
"""
    load_kddcup99_data(index: int)
        index=0: 'kddcup.names',
        index=1: 'kddcup.data.gz',
        index=2: 'kddcup.data_10_percent.gz',
        index=3: 'kddcup.newtestdata_10_percent_unlabeled.gz',
        index=4: 'kddcup.testdata.unlabeled.gz',
        index=5: 'kddcup.testdata.unlabeled_10_percent.gz',

"""
# 获取names
data = load_kddcup99_data(index=0)

val_label = data.loc[0].apply(lambda item: item.split('.')[0])
print(val_label, type(val_label))

val_names = data.loc[1:, 0].apply(lambda item: item.split(':')[0])
print(val_names, type(val_names))

NSL-KDD

from nidsdata import load_naslkdd_data
"""
    load_naslkdd_data(index: int)
        index=0: 'KDDTest+.txt',
        index=1: 'KDDTest-21.txt',
        index=2: 'KDDTrain+.txt',
        index=3: 'KDDTrain+_20Percent.txt'
"""
print(load_naslkdd_data(3))

UNSW-NB15

from nidsdata import load_unswnb15_data
"""
    load_unswnb15_data(index: int)
        index=0: 'NUSW-NB15_features.csv',
        index=1: 'UNSW-NB15_1.csv',
        index=2: 'UNSW-NB15_2.csv',
        index=3: 'UNSW-NB15_3.csv',
        index=4: 'UNSW-NB15_4.csv',
        index=5: 'NUSW-NB15_GT.csv',
        index=6: 'UNSW-NB15_LIST_EVENTS.csv',
        index=7: 'UNSW_NB15_training-set.csv',
        index=8: 'UNSW_NB15_testing-set.csv'
"""
print(load_unswnb15_data(0))

Metadata

Release files for nidsdata 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nidsdata 0.0.3
File Size Uploaded Provenance Actions
nidsdata-0.0.3.tar.gz 6.1 kB Without provenance Details for nidsdata-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nidsdata 0.0.3
File Interpreter ABI Platform Actions
nidsdata-0.0.3-py3-none-any.whl Python 3 none any Details for nidsdata-0.0.3-py3-none-any.whl

Total release size: 13.6 kB

Release files / nidsdata-0.0.3.tar.gz

Download URL nidsdata-0.0.3.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8bd8a116dfe001a671907f36572a53dae4f4029ec6e765b3774418819952c8b3
BLAKE2b-256 checksum
How to use checksums
47b7f64c2689dc7d41c085043cce40f055778bdb55b7065935496e0c7f0f669b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.8

Release files / nidsdata-0.0.3-py3-none-any.whl

Download URL nidsdata-0.0.3-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7a6143805c8e07ff7a5b81aa1d07b4090cedb6db6df9441a19844c6f06fefce
BLAKE2b-256 checksum
How to use checksums
5a33cba8fad3d15fc460a5aa488bce22de5eb7cab857c651302551c3bf70cfa1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.8

Security for nidsdata 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page