function examples

Configs

  • conf/opts.yaml - all scant3r options for add more options for scant3r

option_name:
  - option: 
    - '-u'
    - '--ui-test'
  - type: int # type
  - default: 0 # default value 
  - save_content: true # save the input or not ?
  - help: 'help out for --ui-test man'
  - exec: "dict_args['delay'] = int(value)" # the code will be executed , make sure to `add dict_args['delay'] = the value` , user input will saved in value var

you can user it with scant3r by -c option $ ./scant3r.py -c txt,json # now use both json and txt content-types

  • conf/help.yaml - help menu so simple

section:
   - content: |
      bla bla


  • all scant3r options from conf/opts.yml

{'proxy': None,
   'timeout': 10,
   'Headers': {},
   'list': None,
   'random-agent': True,
   'threads': 100,
   'module': ['example'],
   'url': 'http://127.0.0.1:5000/',
   'host': None}

to fetch option just add opts['OPTION'] for example opts['url']

  • run your module $ echo 'http://google.com/' | python3 scant3r -m youmodulename

all scant3r functions

Data Parsing : scant3r/core/utils.py

  • import: from scant3r.core.utils import YOUR_FUNC

functionDescriptionexample

post_data

add string value to dictionary (for cookies,post/put parameters)

post_data('name=khaled&id=444') > {'name':'khaled','id':44}

urlencoder

from plain text to url encoding

urlencoder(yourtext,many=1) > many = how many you want to encode your payloads

extract_headers

add headers value to dictionary

extract_headers('Header: hello') > {'Header':'hello'}

insert_after

Insert some string into given string at given index

insert_after('scant3r','3r','test') > scantest

random_str

make random string value by length

random_str(5) > 3AQU5

remove_dups

remove duplicated items from the list

remove_dups(['test','test']) > ['test']

add_path

add path to your url

add_path('http://google.com/','/hackerman') > http://google.com/hackerman

insert_to_params_urls

add a string to url parameters

insert_to_params_urls('http://google.com/?test=1&hi=vv','scant3r') > ['http://google.com/?test=1scant3r&hi=vv','http://google.com/?test=1&hi=vvscant3r']

insert_to_params

add parameters to url

insert_to_params('http://php.net/?test=1','man=1') > http://php.net/?test=1&hi=3

dump_request

dump http request

dump_request(r) # r = requests module

dump_response

dump http response

dump_response(r) # r = requests module


Options Parsing : core/libs/all/args.py

args.py load all options from core/settings/opts.yaml file

Colors: core/libs/all/colors.py

http requests: core/libs/all/requester.py

functionDescription

Agent

get random user agents from wordlists/agents.txt

http

send http requests module

post_data

>> from scant3r.core.utils import post_data
>> post_data('id=1&user=admin')

{
  'id':'1',
  'user':'admin'
}

extractHeaders

>> from scant3r.core.utils import extract_headers
>> headers = '''
Auth: c2NhbnQzcgo=
Host: knassar702.github.io
'''
>> extract_headers(headers)
{'Auth': 'c2NhbnQzcgo=',"Host":"knassar702.github.io"}

urlencoder

>> from scant3r.core.utils import urlencoder
>> urlencoder('<',1)
%3c
%3c <
>> urlencoder('<',2)
%25%33%63
# %25%33%63 > %3c > <

insertAfter

>> from scant3r.core.utils import insert_after
insert_after('TEXT','INSERT_AFTER','NewText')

>> insert_after('http://site.com/?msg=hi','=','<svg/onload=alert(1)>')
http://site.com/?msg=<svg/onload=alert(1)>

Last updated