Created
August 7, 2020 09:09
-
-
Save lega911/4606bdf38fc441ad106af151c9a33e7d to your computer and use it in GitHub Desktop.
test connection to web.smscom.se
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import time | |
def main(): | |
ok = 0 | |
fail = 0 | |
for i in range(1000): | |
try: | |
r = requests.post('https://web.smscom.se/sendSms/sendSms.asmx') | |
print(i, r, r.content[:100] + b'...') | |
ok += 1 | |
except requests.exceptions.SSLError as e: | |
print(i, '--- ERROR ---', e) | |
fail += 1 | |
time.sleep(0.1) | |
print(f'ok {ok}, fail {fail}') | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Result: 48% SSL errors.
Test system: Amazon EC2 Stockholm, Ubuntu 20.04.1 LTS, Python 3.8.2 (all fresh upgraded)
part of logs: