Code Monkey home page Code Monkey logo

pwnbin's Introduction

PwnBin

What is PwnBin

PwnBin is a webcrawler which searches public pastebins for specified keywords. All pastes are then returned after sending completion signal ctrl+c.

How to use PwnBin

Basic command:

python3 pwnbin.py -k <keyword1>,"example substring",<keyword2>..... -o <outputfile>

Both the keyword and outputfile arguments are optional and default to

-k ssh,pass,key,token
-o log.txt

Optional command:

-a, Append to file instead of overwriting file.
-t <time in seconds>, Run for time in seconds.
-n <integer>, Run for number of pastes.
-m <integer>, Run for number of matches.

License

The MIT License (MIT) Copyright (c) 2015 Luke Mclaren

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.

pwnbin's People

Contributors

kahunalu avatar lukemclaren avatar m4l1c3 avatar theappanalyst avatar yasinyaman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pwnbin's Issues

AttributeError: 'NoneType' object has no attribute 'find'

I'm getting the following error:

$ python pwnbin.py -k test -o test.log

Crawling http://pastebin.com Press ctrl+c to save file to test.log
Traceback (most recent call last):
  File "pwnbin.py", line 152, in <module>
    main(sys.argv[1:])
  File "pwnbin.py", line 28, in main
    for paste in find_new_pastes(root_html):
  File "pwnbin.py", line 96, in find_new_pastes
    ul = div.find('ul', {'class': 'right_menu'})
AttributeError: 'NoneType' object has no attribute 'find'

I checked all of the dependencies and I think that I have all of the dependencies listed in the import table.

I searched what AttributeError: 'NoneType' object has no attribute 'find' means and it, according to stackoverflow:
"NoneType means that instead of an instance of whatever Class or Object you think you're working with, you've actually got None. That usually means that an assignment or function call up above failed or returned an unexpected result."

Any guidance here?

Thanks in advance.

[Request]

Would there be a way to search instead of just keywords, but phrases as well? ie:
-k "Something super specific goes here","another specific thing","token"

Awesome script!

SSL error

Dear

I used this tool successfully in the past.
Now I get :
"
You're on your own on this one! Error code <urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:590)> "

Not sure if I gave my API key or similar as a argument when executing the Python script or if this is necessary? Did something changed at pastebin end or what can be the issue here please?

Thanks a lot!

[Low Priority]Contact

Hi,

Could you provide me with a way to contact you, or contact me via the email on my GitHub profile.

It's about an press article regarding pwnbin.

Also, feel free to delete this issue since it's quite off-topic.

Pastebin blocked my IP

Hello Kahunalu,

After 2-3 minutes searching for a specific word or words using pwnbin , pastebin is blocking my IP .
I have an API key , can you please tell me if there is a way to use it on your script in order to avoid getting blocked ?

Thanks in advance.

crawling pastebin for specific keyword

Dear Luke,

I'm trying to use your script to look for some keywords on pastebin. This is the command that i use from my Kali box:
python pwnbin.py -k pass "malware". But i got this error instead:

Traceback (most recent call last):
File "pwnbin.py", line 5, in
from bs4 import BeautifulSoup
File "/home/kali/.local/lib/python2.7/site-packages/bs4/init.py", line 30, in
from .builder import builder_registry, ParserRejectedMarkup
File "/home/kali/.local/lib/python2.7/site-packages/bs4/builder/init.py", line 311, in
from . import _html5lib
File "/home/kali/.local/lib/python2.7/site-packages/bs4/builder/_html5lib.py", line 57, in
class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'

Can you tell me where i did wrong?

Thank you so much for your help!

doesn't work for me on 3.9

Crawling http://pastebin.com Press ctrl+c to save file to log.txt
Traceback (most recent call last):
File "C:\Users\zied_\Desktop\pwnbin-master\pwnbin.py", line 27, in main
root_html = BeautifulSoup(fetch_page(root_url), 'html.parser')
File "C:\Users\zied_\Desktop\pwnbin-master\pwnbin.py", line 131, in fetch_page
response = urllib.request.urlopen(page)
AttributeError: module 'urllib' has no attribute 'request'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\zied_\Desktop\pwnbin-master\pwnbin.py", line 187, in
main(sys.argv[1:])
File "C:\Users\zied_\Desktop\pwnbin-master\pwnbin.py", line 77, in main
except urllib.error.HTTPError as err:
AttributeError: module 'urllib' has no attribute 'error'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.