Skip to content

Commit

Permalink
Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zied AOUINI committed Oct 9, 2020
1 parent 664d2aa commit a720959
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ As with any packet monitoring tool, **NFStream** could potentially be misused.
The following people contributed to NFStream:
* [**Zied Aouini**](mailto:[email protected]): Creator and main developer.
* [**Adrian Pekar**](mailto:[email protected]): Testing, datasets generation and storage.
* [**Romain Picard**](mailto:[email protected]): Several Plugins implementation.
* [**Radion Bikmukhamedov**](mailto:[email protected]): Initial work on SPLT analysis NFPlugin.

### Supporting organizations
Expand Down
18 changes: 17 additions & 1 deletion nfstream/plugins/__init__.py
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
------------------------------------------------------------------------------------------------------------------------
"""

from .split import SPLT
from .splt import SPLT
try:
from .dhcp import Dhcp
except ImportError:
Expand Down
22 changes: 20 additions & 2 deletions nfstream/plugins/dhcp.py
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
------------------------------------------------------------------------------------------------------------------------
"""

from enum import Enum
import ipaddress
from nfstream import NFPlugin
Expand Down Expand Up @@ -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')
Expand Down
18 changes: 18 additions & 0 deletions nfstream/plugins/split.py → nfstream/plugins/splt.py
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
------------------------------------------------------------------------------------------------------------------------
"""

from nfstream import NFPlugin


Expand Down

0 comments on commit a720959

Please sign in to comment.