Giter VIP home page Giter VIP logo

grayhat's Introduction

Python library for grayhatwarfare.com with small hacks

This code requires an account at grayhatwarfare.com
I've also implemented small hack to avoid one of API limitations.
So now you can easily use multiple keyword and extension filters with files size sorting while searching for files.
For free account support check https://github.com/d34db33f-1007/grayhat2 which designed for only files search.

Install

  • git clone https://github.com/d34db33f-1007/grayhat.git
  • cd grayhat && pip3 install -r requirements.txt

Basic Usage

from grayhat import Build, s3

token = 'fill_ur_token'
keywords = ['sql', 'data', '-html']
extensions = ['bak', 'bac', 'dmp', 'dat']

# search files by keywords and file extensions 
# and 100Mb minimum file size
bless = Build(token)
bless = bless.Files(start=0, stop=998, kw=keywords, ext=extensions)
god = s3(bless, var=100).warfare()

# list all files from specific bucket defined 
# by "b_id" and filter them by size and keyword
bless = Build(token)
bless = bless.Buckets(b_id=2456, stop=200, kw=['Full'])
god = s3(bless, 100).warfare()

# search all buckets by keyword for bugbounty or 
# dely search and filter buckets with at least 10 files exposed
bless = Build(token)
bless = bless.Buckets(kw=keywords)
god = s3(bless, 10).warfare()


# "s3(bless).warfare()" returns list with each result as dictionary
print(god[0])

for tears in god[1:]:
  print(tears['bid'], tears['file_url'], tears['file_size']) # 1st and 2nd methods
  print(tears['bid'], tears['bucket'], tears['file_count']) # 3d method

# ^ "fid", "bucket", "filename", "file_path" keys are also available for methods 1 and 2.

# "kw" and "ext" are optional and theese must be list type. "var" is digit and is optional either.
# "start" is for results index, and "stop" means count of results
# e.q. page one: start = 0, stop = 999; page two: start = 999, stop = 999; and so on
# you can exclude from search results unlimited count of queries
# to do this just add them to exclude.txt file
# to exclude specific bucket add "-sbuc34682" to excludes
# where "34682" is bucket id.

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.