From c19989e217627d7a7b05dde17a6f735ad7bc3126 Mon Sep 17 00:00:00 2001 From: Codelinefi-admin Date: Wed, 19 Sep 2018 21:50:56 +0300 Subject: [PATCH 1/2] Fixed a bug with wrong dates conversion --- misp_modules/modules/expansion/macaddress_io.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/misp_modules/modules/expansion/macaddress_io.py b/misp_modules/modules/expansion/macaddress_io.py index 14e1134..e735f39 100644 --- a/misp_modules/modules/expansion/macaddress_io.py +++ b/misp_modules/modules/expansion/macaddress_io.py @@ -79,29 +79,36 @@ def handler(q=False): misperrors['error'] = 'Unknown error' return misperrors + date_created = \ + response.block_details.date_created.strftime('%d %B %Y') if response.block_details.date_created else None + + date_updated = \ + response.block_details.date_updated.strftime('%d %B %Y') if response.block_details.date_updated else None + results = { 'results': [ {'types': ['text'], 'values': { + # Mac address details 'Valid MAC address': "True" if response.mac_address_details.is_valid else "False", - 'Transmission type': response.mac_address_details.transmission_type, 'Administration type': response.mac_address_details.administration_type, + # Vendor details 'OUI': response.vendor_details.oui, 'Vendor details are hidden': "True" if response.vendor_details.is_private else "False", - 'Company name': response.vendor_details.company_name, 'Company\'s address': response.vendor_details.company_address, 'County code': response.vendor_details.country_code, + # Block details 'Block found': "True" if response.block_details.block_found else "False", 'The left border of the range': response.block_details.border_left, 'The right border of the range': response.block_details.border_right, 'The total number of MAC addresses in this range': response.block_details.block_size, 'Assignment block size': response.block_details.assignment_block_size, - 'Date when the range was allocated': response.block_details.date_created, - 'Date when the range was last updated': response.block_details.date_updated + 'Date when the range was allocated': date_created, + 'Date when the range was last updated': date_updated } } ] From 4ad60ca948ba7d4aa6d3a8178bf0ded291dd0b76 Mon Sep 17 00:00:00 2001 From: Codelinefi-admin Date: Wed, 19 Sep 2018 21:51:23 +0300 Subject: [PATCH 2/2] Updated README. Added a link to the integration tutorial --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index af32bc0..8a63403 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ For more information: [Extending MISP with Python modules](https://www.circl.lu/ * [hashdd](misp_modules/modules/expansion/hashdd.py) - a hover module to check file hashes against [hashdd.com](http://www.hashdd.com) including NSLR dataset. * [IPASN](misp_modules/modules/expansion/ipasn.py) - a hover and expansion to get the BGP ASN of an IP address. * [iprep](misp_modules/modules/expansion/iprep.py) - an expansion module to get IP reputation from packetmail.net. -* [macaddress.io](misp_modules/modules/expansion/macaddress_io.py) - a hover module to retrieve vendor details and other information regarding a given MAC address or an OUI. [MAC address Vendor Lookup](https://macaddress.io) +* [macaddress.io](misp_modules/modules/expansion/macaddress_io.py) - a hover module to retrieve vendor details and other information regarding a given MAC address or an OUI from [MAC address Vendor Lookup](https://macaddress.io). See [integration tutorial here](https://macaddress.io/integrations/MISP-module). * [onyphe](misp_modules/modules/expansion/onyphe.py) - a modules to process queries on Onyphe. * [onyphe_full](misp_modules/modules/expansion/onyphe_full.py) - a modules to process full queries on Onyphe. * [OTX](misp_modules/modules/expansion/otx.py) - an expansion module for [OTX](https://otx.alienvault.com/).