diff --git a/README.md b/README.md index d42de3d7..2a331d0f 100644 --- a/README.md +++ b/README.md @@ -443,6 +443,7 @@ As with any packet monitoring tool, **NFStream** could potentially be misused. The following people contributed to NFStream: * [**Zied Aouini**](mailto:aouinizied@gmail.com): Creator and main developer. * [**Adrian Pekar**](mailto:adrian.pekar@gmail.com): Testing, datasets generation and storage. +* [**Romain Picard**](mailto:romain.picard@oakbits.com): Several Plugins implementation. * [**Radion Bikmukhamedov**](mailto:radion.bikmukhamedov@pm.me): Initial work on SPLT analysis NFPlugin. ### Supporting organizations diff --git a/nfstream/plugins/__init__.py b/nfstream/plugins/__init__.py index 4fa3f4e8..4e986273 100644 --- a/nfstream/plugins/__init__.py +++ b/nfstream/plugins/__init__.py @@ -1,6 +1,22 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +------------------------------------------------------------------------------------------------------------------------ +__init__.py +Copyright (C) 2019-20 - NFStream Developers +This file is part of NFStream, a Flexible Network Data Analysis Framework (https://www.nfstream.org/). +NFStream is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later +version. +NFStream is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. +You should have received a copy of the GNU Lesser General Public License along with NFStream. +If not, see . +------------------------------------------------------------------------------------------------------------------------ +""" -from .split import SPLT +from .splt import SPLT try: from .dhcp import Dhcp except ImportError: diff --git a/nfstream/plugins/dhcp.py b/nfstream/plugins/dhcp.py index 61f3e26c..ec52c4e5 100644 --- a/nfstream/plugins/dhcp.py +++ b/nfstream/plugins/dhcp.py @@ -1,3 +1,21 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +------------------------------------------------------------------------------------------------------------------------ +dhcp.py +Copyright (C) 2019-20 - NFStream Developers +This file is part of NFStream, a Flexible Network Data Analysis Framework (https://www.nfstream.org/). +NFStream is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later +version. +NFStream is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. +You should have received a copy of the GNU Lesser General Public License along with NFStream. +If not, see . +------------------------------------------------------------------------------------------------------------------------ +""" + from enum import Enum import ipaddress from nfstream import NFPlugin @@ -54,9 +72,9 @@ def on_update(self, packet, flow): hostname = opt[1].decode('utf-8', errors='replace') if len(hostname) > 0: flow.udps.dhcp_12 = hostname - elif opt[0] == 53: # Msg type + elif opt[0] == 53: # Msg type msg_type = MsgType(int.from_bytes(opt[1], "big")) - elif opt[0] == 60: # Vendor class identifier + elif opt[0] == 60: # Vendor class identifier flow.udps.dhcp_60 = opt[1].decode('utf-8') elif opt[0] == 77: # User class id flow.udps.dhcp_77 = opt[1].decode('utf-8') diff --git a/nfstream/plugins/split.py b/nfstream/plugins/splt.py similarity index 66% rename from nfstream/plugins/split.py rename to nfstream/plugins/splt.py index db02e170..17038081 100644 --- a/nfstream/plugins/split.py +++ b/nfstream/plugins/splt.py @@ -1,3 +1,21 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +------------------------------------------------------------------------------------------------------------------------ +splt.py +Copyright (C) 2019-20 - NFStream Developers +This file is part of NFStream, a Flexible Network Data Analysis Framework (https://www.nfstream.org/). +NFStream is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later +version. +NFStream is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. +You should have received a copy of the GNU Lesser General Public License along with NFStream. +If not, see . +------------------------------------------------------------------------------------------------------------------------ +""" + from nfstream import NFPlugin