Answer the question
In order to leave comments, you need to log in
Why does the server detect this script?
from requests.sessions import cookiejar_from_dict
from torpy.http.requests import TorRequests
from fake_useragent import UserAgent
import os, sys, random
from scripts import config
import time
print('{} Started.'.format(time.strftime('[%H:%M:%S]', time.localtime())))
urls = ['https://ua-pharm.com/wp-content/uploads/2021/11/Silymarin.pdf', 'https://ua-pharm.com/wp-content/uploads/2021/09/apnas-spray-d3-assorted-1-125x125.jpg',
'https://ua-pharm.com/wp-content/uploads/2020/04/SEPTOGAL_140x189_3D-1.png', 'https://ua-pharm.com/wp-content/uploads/2021/02/vitC-rose.png']
ua = UserAgent()
headers = [{'user-agent': ua.chrome,
'referer': 'https://ua-pharm.com/',
'accept': 'image/avif,image/webp,*/*',
'sec-fetch-dest': 'image',
'sec-fetch-mode': 'no-cors',
'sec-fetch-site': 'cross-site'
} for i in range(0, 100)]
pathDir = os.path.join(config.OUTPUTPATH, 'tor-{}'.format(time.strftime('%a-%b-%Y-%H-%M', time.localtime())))
os.makedirs(pathDir)
def torFetch(session, url):
with session as session:
with session.get_session() as s:
return s.get(url)
def downloadFile(url, fileName):
with open(os.path.join(pathDir, fileName), 'wb') as f:
f.write(torFetch(TorRequests(headers=random.choice(headers)), url).content)
for url in urls:
name = url.split('/')[::-1][0]
downloadFile(url, name)
print('{} Downloaded file. File {}'.format(time.strftime('[%H:%M:%S]', time.localtime()), name))
print('{} Cooldown {}s.'.format(time.strftime('[%H:%M:%S]', time.localtime()), config.COOLDOWN))
time.sleep(config.COOLDOWN)
print('{} Finished.'.format(time.strftime('[%H:%M:%S]', time.localtime())))
<!doctype html>
<html lang="en">
<head>
<title>Unauthorized Access</title>
<meta charset="UTF-8">
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'>
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
</head>
<body>
<div class="container-fluid">
<img src="data:image/png; .......>
<div class="alert alert-warning"><h2>The firewall on this server is blocking your connection.</h2></div>
<p>You need to contact the server owner or hosting provider for further information.</p>
<p>Your blocked IP address is: <b>205.185.113.225</b></p>
<p>The hostname of this server is: <b>rocket-cp2.hostsila.org</b></p>
<br />
<p>You can try to unblock yourself using ReCAPTCHA:</p>
<form action="" method="POST">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<div class="panel panel-default">
<div class="panel-body">
<div class="g-recaptcha" data-sitekey="6LeS6TEUAAAAADo_Gd9S6DgeV0wYtP0-RG_aSUh1"></div>
</div>
<div class="panel-footer text-center">
<button class='btn btn-primary' type="submit" name="submit">Unblock</button>
</div>
</div>
</div>
</div>
</form>
<br />
<div class="alert alert-info">Please note: Not all unblock requests will be successful as it is dependent on how your IP address is being blocked. If the unblock fails you will need to contact the server owner or hosting provider for further information.</div>
</div>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
What could be causing this
and how can this be solved?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question