README

Pastenum - A Corelan Team Production

INSTALL:

BackTrack 5 / without RVM:

Video: http://www.youtube.com/watch?v=Lim3YTzL1f8

1. Make sure you are using ruby 1.9.2 by running update-alternatives

update-alternatives --config ruby
ruby -v 

2. Ensure all gems are installed

etc/alternatives/gem install mechanize gscraper uri-query_params colored

3. Download Pastenum from http://redmine.corelan.be/projects/corelan-pastenum/files

4. Extract Pastenum, If you get an error try to gunzip then untar

gunzip Pastenum2.tar.gz
tar xvf Pastenum2.tar

5. Find cool stuff with Pastenum

BackTrack 5 - rvm (as root) / Other distro's

1. Make sure all dependencies are installed

apt-get install curl git-core build-essential bison openssl libreadline5 libreadline-dev zlib1g zlib1g-dev libssl-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev

2. Install rvm

bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

3. Edit bash_profile

echo '[[ -s "/usr/local/rvm/scripts/rvm" ]] && . "/usr/local/rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile

Activate the change :
source /root/.bash_profile

(or just kill the session and open a new one)

4. Verify that rvm is working :

type rvm | head -n1

(this should return rvm is a function)

5. Install ruby 1.9.2

rvm install ruby-1.9.2

6. Set default ruby to 1.9.2

rvm --default use 1.9.2

7. Set current ruby to 1.9.2 (just in case you have installed multiple versions)

rvm use 1.9.2

(test with ruby -v)

8. Install gems

gem install mechanize gscraper uri-query_params colored

9. Download Pastenum from http://redmine.corelan.be/projects/corelan-pastenum/files

10. Extract Pastenum, If you get an error try to gunzip then untar

gunzip Pastenum2.tar.gz
tar xvf Pastenum2.tar

11. Run

root@bt:/pentest/enumeration/Pastenum2# ruby pastenum.rb 
++++++++++++++++++++++++++++++++++++++++++++++
+ Pastie Enum
+ A Corelan Team Production - www.corelan.be
+ Written by Nullthreat
+ Version 2
++++++++++++++++++++++++++++++++++++++++++++++

[?] Input a search string:

12. Known issues

If, during a BT update, you receive the following error :

/usr/lib/ruby/1.9.2/rubygems.rb:779:in `report_activate_error': Could not find RubyGem bundler (>= 0) (Gem::LoadError)
    from /usr/lib/ruby/1.9.2/rubygems.rb:214:in `activate'
    from /usr/lib/ruby/1.9.2/rubygems.rb:1082:in `gem'
    from <internal:gem_prelude>:213:in `push_gem_version_on_load_path'
    from <internal:gem_prelude>:16:in `gem'
    from /etc/alternatives/gem-bin/bundle:18:in `<main>'

Then do this :

gem install bundler

USAGE:

Run - ruby pastenum.rb

When prompted enter a search term.

Once the application is complete it will generate "report.html"
Note: If more then 100 results are found, it can take some time to load the "report.html" file.

RELEASE NOTES:

6/05/2011
v .2
Added BT5 install instructions to README
Fixed some formatting
Generally Cleaned Code

3/25/2011
v .1 RC2
Added github support
Added ability to enable and disable searches individually

3/22/2011
v .1 RC1
Initial public release