Home

Awesome

Ecounter

Count and encrypt email addresses in files faster.

What's the purpose of this script?

Why use it?

How to use it

Get help

ecounter is a command line script. To get help type in the command line:

./ecounter --help

Scan emails in a file

Scan a file and create another file with just one email per line:

./ecounter -input=rawfile.csv -output=uniques.txt

Scan sha256 hashes in a file

Scan a file for sha256 hashes and create another file with just one (unique) sha256 hash per line:

./ecounter -input=rawfile.csv -count=sha256 -output=uniques.txt

This feature is useful to count unique emails when they are hashed (encrypted).

Scan urls in a file

Scan a file, like for example a sitemap.xml file, for urls:

./ecounter -input=sitemap.xml -count=urls -output=urls.csv

This feature is useful to create files with urls to use with check-my-pages.

Scan Spanish ID numbers

Scan Spanish ID numbers (DNI or NIE)

./ecounter -input=rawfile.csv -count=dnis -output=uniques.txt

Hash emails (encrypt)

./ecounter -input=rawfile.csv -output=uniques.txt -encrypt=true

Counting

The script produces a report like this:

WHAT HAPPENED?
The parsed file :  rawfile.csv
Number of total emails found in rawfile.csv : 1420463
Number of unique emails saved in the file uniques.txt : 1329624
The results are hashed as sha256 ? true

Work from multiple files

To extract unique emails from multiple files you must concatenate the files in one plain .txt file first. Use the command line (cat in Linux or Mac and type in Windows) to join the csv or txt files in a combined.txt file:

cat raw1.csv raw2.csv > combined.txt 

Or to do it from all csv files in the all folder:

cat all/*.csv > combined.txt

Please note that the files don't need to be in the same format. They just need to be csv or text files containing, among any information, email addresses. When the email addresses are all in one file, use it normally:

./ecounter -input=combined.txt -output=uniques.txt -encrypt=true

Install

  1. Download the latest version of the binary code for your operating system to your desktop folder.
  2. Unzip it to the desktop folder. (Optionally copy the executable file to a folder in your path )
  3. To test your install, open the command line, go to the desktop folder and test it with the command:

Install from the source code

This script is also provided as source code in Go. To install:

go get github.com/greenpeace/gpes-ecounter
go install github.com/greenpeace/gpes-ecounter

Problems?