]> git.nothing2do.fr Git - get-hack-src.git/commitdiff
Added ability to generate Maltego Built-in entities
authorallfro <ndouba@gmail.com>
Sun, 10 Feb 2013 07:39:35 +0000 (02:39 -0500)
committerallfro <ndouba@gmail.com>
Sun, 10 Feb 2013 07:39:35 +0000 (02:39 -0500)
src/canari/commands/generate_entities.py

index 3d5981206020e2113e0a152b35bd693c46a355e0..49e0f1e0250e4e3d362bb4b4084cd15ee3cd744d 100644 (file)
@@ -16,7 +16,7 @@ __copyright__ = 'Copyright 2012, Canari Project'
 __credits__ = ['Nadeem Douba']
 
 __license__ = 'GPL'
-__version__ = '0.1'
+__version__ = '0.3'
 __maintainer__ = 'Nadeem Douba'
 __email__ = 'ndouba@gmail.com'
 __status__ = 'Development'
@@ -76,6 +76,14 @@ parser.add_argument(
     default=[]
 )
 
+parser.add_argument(
+    '--maltego-entities',
+    '-M',
+    help="Generate entities belonging to the 'maltego' namespace.",
+    default=False,
+    action='store_true'
+)
+
 parser.add_argument(
     '--append',
     '-a',
@@ -107,6 +115,9 @@ def parse_args(args):
     args = parser.parse_args(args)
     if args.outfile is None:
         args.outfile = path.join(project_tree()['transforms'], 'common', 'entities.py')
+    if args.maltego_entities:
+        args.namespace.extend(args.exclude_namespace)
+        args.exclude_namespace = []
     return args