Skip to content

Commit

Permalink
Update file_upload.py
Browse files Browse the repository at this point in the history
Fixed some issues with the code and added rate limiting
  • Loading branch information
sAjibuu committed Feb 29, 2024
1 parent 199df73 commit d61970f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/file_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from . import random_string
import datetime
from requests.exceptions import SSLError

import time

# Function to send GET request
def send_get_request(headers, options, url):
Expand Down Expand Up @@ -214,7 +214,8 @@ def file_upload(request_file, file_name, original_extension, options, magic_byte
original_extension, mimetype, module,
magic_bytes, file_data)

user_options = ""
rate_limit_seconds = options.rateLimit / 1000
time.sleep(rate_limit_seconds)

# Remove trailing forward slash from the URL
if url.endswith('/'):
Expand Down

0 comments on commit d61970f

Please sign in to comment.