Pull requests

#52 Declined
Repository
Deleted repository
Branch
CsvInput (4799f1fb63eb)
Repository
LaNMaSteR53/Recon-ng Recon-ng
Branch
master

Added module to import data from CSV files

Author
  1. Ethan Robish
Reviewers
Description

I find this module extremely useful on occasion. I'm sharing it in case it can be of use to anyone else as well. Example usage is below.

recon-ng > use import/csv_file
recon-ng [csv_file] > info

  Name:
    Advanced CSV File Importer

  Author:
    Ethan Robish

  Description:
    Imports values from a csv file.

  Options:

    Name              Current Value  Req  Description
    ----------------  -------------  ---  -----------
    COLUMN_SEPARATOR  ,              yes  the character to separate column values on
    FILENAME                         yes  path and filename for csv input
    HAS_HEADER        True           yes  whether or not the first row in the csv file should be interpreted as column names
    TABLE                            yes  the table to import the csv values into
    VERBOSE           True           yes  verbose output

  Comments:
    At first you will only see options for setting the filename and column_separator.
    Once you set a valid filename, you will be able to see more options for configuring where each
    column is imported to.

    "With great power comes great responsibility"
    This module is very powerful, but if you aren't careful it could seriously pollute your database
    tables.

recon-ng [csv_file] > set filename test.csv
FILENAME => test.csv
recon-ng [csv_file] > show options

  Name              Current Value  Req  Description
  ----------------  -------------  ---  -----------
  COLUMN_SEPARATOR  ,              yes  the character to separate column values on
  CSV_COMPANY                      no   the database column name to import this csv column to
  CSV_FIRST_NAME                   no   the database column name to import this csv column to
  CSV_JOB_TITLE                    no   the database column name to import this csv column to
  CSV_LAST_NAME                    no   the database column name to import this csv column to
  CSV_WEBSITE                      no   the database column name to import this csv column to
  FILENAME          test.csv       yes  path and filename for csv input
  HAS_HEADER        True           yes  whether or not the first row in the csv file should be interpreted as column names
  TABLE                            yes  the table to import the csv values into
  VERBOSE           True           yes  verbose output

recon-ng [csv_file] > set csv_first_name fname
CSV_FIRST_NAME => fname
recon-ng [csv_file] > set csv_last_name lname
CSV_LAST_NAME => lname
recon-ng [csv_file] > set csv_job_title title
CSV_JOB_TITLE => title
recon-ng [csv_file] > run
[!] Value required for the 'table' option.
recon-ng [csv_file] > set table contacts
TABLE => contacts
recon-ng [csv_file] > run

Comments (6)