zeropwn / intelx.py

Python API Wrapper and command-line utility for intelx.io
31 stars 10 forks source link

readme issue #5

Open Deputies opened 10 months ago

Deputies commented 10 months ago

the example is intelx.py -search cia.gov --phonebook --emails where it should actually be intelx.py -search cia.gov --phonebook emails

cmlh commented 8 months ago

The root cause is elif(args.phonebook == 'emails'):

I'll push the fix upstream @IntelligenceX Python line[s] in the next 48 hours or so.

Test Cases

0.1

Checkout the relevant git commit: $ git checkout 7acbc94818d72cf1b9f5a3

The following does not return an error:

$ git checkout 7acbc94818d72cf1b9f5a3 
....
$ intelx -search cia.gov --phonebook --emails

         _____      _       ___   __
        |_   _|    | |     | \ \ / /
          | | _ __ | |_ ___| |\ V / 
          | || '_ \| __/ _ \ |/   \ 
         _| || | | | ||  __/ / /^\ \
         \___/_| |_|\__\___|_\/   \/

           a command line client
               for intelx.io         

[19:25:51] Starting phonebook search of "cia.gov"

However, the following does return an error:

$ intelx -search cia.gov --phonebook emails  

usage: intelx [-h] [-apikey APIKEY] [-search SEARCH] [-buckets BUCKETS] [-results RESULTS] [-timeout TIMEOUT] [-datefrom DATEFROM] [-dateto DATETO] [-sort SORT] [-media MEDIA] [-terminate TERMINATE] [-lines LINES] [-sid SID]
              [-name NAME] [--view] [--download] [--preview] [--treeview] [--previews] [--phonebook] [--emails] [--capabilities] [--stats] [--pdf] [--hex] [--word] [--raw]
intelx: error: unrecognized arguments: emails 

... and for completeness --emails without --phonebook

$ intelx  -search cia.gov --emails            

         _____      _       ___   __
        |_   _|    | |     | \ \ / /
          | | _ __ | |_ ___| |\ V / 
          | || '_ \| __/ _ \ |/   \ 
         _| || | | | ||  __/ / /^\ \
         \___/_| |_|\__\___|_\/   \/

           a command line client
               for intelx.io         

[19:38:24] Results argument not supplied, setting default to 10 results.
[19:38:24] Starting search of "cia.gov".
...

0.5

$ git checkout master

--phonebook and --emails returns an error:

$ intelx.py  -search cia.gov --phonebook --emails

usage: intelx.py [-h] [-apikey APIKEY] [-search SEARCH] [-buckets BUCKETS] [-limit LIMIT] [-timeout TIMEOUT] [-datefrom DATEFROM] [-dateto DATETO] [-sort SORT] [-media MEDIA] [-lines LINES] [-download DOWNLOAD] [-name NAME]
                 [--nopreview] [--view] [--phonebook PHONEBOOK] [--emails] [--capabilities] [--stats] [--raw]
intelx.py: error: argument --phonebook: expected one argument

emails does not return an error:

$ intelx.py -search cia.gov --phonebook emails  

         _____      _       ___   __
        |_   _|    | |     | \ \ / /
          | | _ __ | |_ ___| |\ V / 
          | || '_ \| __/ _ \ |/   \ 
         _| || | | | ||  __/ / /^\ \
         \___/_| |_|\__\___|_\/   \/

           a command line client
               for intelx.io         

[19:53:41] Starting phonebook search of "cia.gov"

... and for completeness emails

$ intelx.py  -search cia.gov emails            

usage: intelx.py [-h] [-apikey APIKEY] [-search SEARCH] [-buckets BUCKETS] [-limit LIMIT] [-timeout TIMEOUT] [-datefrom DATEFROM] [-dateto DATETO] [-sort SORT] [-media MEDIA] [-lines LINES] [-download DOWNLOAD] [-name NAME]
                 [--nopreview] [--view] [--phonebook PHONEBOOK] [--emails] [--capabilities] [--stats] [--raw]
intelx.py: error: unrecognized arguments: emails

... and for completeness `--emails


$ intelx.py -search cia.gov --emails 

         _____      _       ___   __
        |_   _|    | |     | \ \ / /
          | | _ __ | |_ ___| |\ V / 
          | || '_ \| __/ _ \ |/   \ 
         _| || | | | ||  __/ / /^\ \
         \___/_| |_|\__\___|_\/   \/

           a command line client
               for intelx.io         

[19:56:36] Limit argument not supplied, setting default to 10 results.
[19:56:36] Starting search of "cia.gov".
cmlh commented 8 months ago

Fix has been pushed upstream with https://github.com/IntelligenceX/Python/commit/c63371b68a26d475bba37945a94eec0aa4b34882