Esearch

DESCRIPTION

Esearchy is a small library capable of searching the internet for email addresses. Currently, the supported search methods are, but not limited to:

  • Search engines:

    • Google

    • Bing

    • Yahoo,

    • AltaVista

  • Social Networks:

  • PGP servers

  • Usenets

  • GoogleGroups Search

But Searches do not stop there, ESearchy it also looks for emails inside:

  • PDF

  • DOC

  • DOCX

  • XLSX

  • PPTX

  • ODT

  • ODP

  • ODS

  • ODB

  • ASN

  • TXT

Once all the text is parsed within the file the emails are added to the list of found accounts.

In order to parse Microsoft Word (.doc):

  • You Either need a windows Platform with Word installed.

  • Install AntiWord. ( www.winfield.demon.nl/ )

  • Or if non of the above is on the OS, we perform a raw search inside the file.

NOTE: THIS IS STILL BEING DEVELOPED CODE IS SUBMITTED DAILY SO BE AWARE THAT CODE MIGHT NOT WORK PROPERLY AL THE TIME. IF SOMETHING GOES WRONG PLEASE RAISE AN ISSUE.

In order to work Bing and Yahoo need an appid. This API Keys could be added once in below mentioned files so the library will be able to work properly, and or passed as parameter each time we execute a search.

  • data/yahoo.key

  • data/bing.key

Furthermore, in order to use the LinkedIn People Search we need to pass two parameters.

  • company name ( with Object.company_name )

  • User/password for LinkedIn. (with Object.linkedin_credentials) For this we can use ESearchy.BUGMENOT which will search a linkedin user in bugmenot.com

SUPPORT:

SYNOPSIS:

For now, there are two main ways of performing a search:

  • Executable CLI command

    esearchy –domain domain.com –maxhits 500 –yahoo_key dkajsdkajskdad –output “~/emails.txt”

  • Library

For thouse who want to integrate this to their application you can use it in “the ruby way”

Esearchy.create "domain.com" do |domain|
  domain.maxhits = 500
  domain.search 
  domain.clean {|e| e =~ /<|>/ }
  domain.save_to_file "~/emails.txt"
end

or in the more classic way in which you can create an Esearchy objetc and work on it

domain = Esearchy.new :query => "domain.com", :maxhits => 500, :engines => [:Google,:Yahoo]
domain.search 
domain.save_to_file "~/emails.txt"

We now also have a LinkedIn search which looks for Names in the site. With those names it

  • creates emails based on those emails.

  • searches Google and Yahoo for emails related to those people.

    ESearchy.create “domain.com” do |d|

    d.engines = { "LinkedIn" => LinkedIn.new}
    d.company_name "Domain Corp"
    d.linkedin_credentials "[email protected]", "12345"
    d.maxhits = 100
    d.search
    d.save_to_file "linkedin_emails.txt"
    

    end

Not short of that now, we also have the possibility of choosing between a Library output mode (no output to IO) and an APP mode (Old output mode). It’s important to mention that the default output mode is LIBRARY

require 'esearchy'
ESearchy::LOG.level = ESearchy::APP

ESearchy.create "domain.com" do |d|
  d.yahoo_key = "dsdsdsdsdsdsdsd"
  d.bing_key = "dsdsdsdsdsdsdsdsd"
  d.company_name "Domain Corp"
  d.linkedin_credentials "[email protected]", "12345" # or use the constant ESearch::BUGMENOT
  d.maxhits = 500
  d.search
end

REQUIREMENTS:

  • ruby 1.8 or 1.9

  • cgi

  • pdf/reader

  • json

  • rubyzip ( Migrating to FreedomCoder-rubyzip 0.9.2 so it’s 1.9 compatible)

INSTALL:

  • > sudo gem sources -a gems.github.com (If you do not have the repository)

  • > sudo gem install freedomcoder-esearchy

THANKS:

LICENSE:

(The MIT License)

Copyright © 2008 - 2009:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.