Skip to main content

NIDS Dataset

Project description

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))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nidsdata-0.0.3.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

nidsdata-0.0.3-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file nidsdata-0.0.3.tar.gz.

File metadata

  • Download URL: nidsdata-0.0.3.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for nidsdata-0.0.3.tar.gz
Algorithm Hash digest
SHA256 8bd8a116dfe001a671907f36572a53dae4f4029ec6e765b3774418819952c8b3
MD5 c47fd23af6dad01b1b499ca704e1f6be
BLAKE2b-256 47b7f64c2689dc7d41c085043cce40f055778bdb55b7065935496e0c7f0f669b

See more details on using hashes here.

File details

Details for the file nidsdata-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: nidsdata-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for nidsdata-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a7a6143805c8e07ff7a5b81aa1d07b4090cedb6db6df9441a19844c6f06fefce
MD5 4f008053279b108bdccdf4d8e945d0ed
BLAKE2b-256 5a33cba8fad3d15fc460a5aa488bce22de5eb7cab857c651302551c3bf70cfa1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page