(url: str, username: str, password: str)
| 7 | |
| 8 | |
| 9 | def are_credentials_valid(url: str, username: str, password: str) -> bool: |
| 10 | res = requests.get(url=f"{url}/rest/api/user?username={username}", auth=(username, password)) |
| 11 | if res.status_code == 200: |
| 12 | print(f"[+] Credentials are valid for user '{username}'") |
| 13 | return True |
| 14 | else: |
| 15 | print(f"[-] Status-Code: {res.status_code} for user '{username}'") |
| 16 | return False |
| 17 | |
| 18 | |
| 19 | def vulnerability(url: str) -> bool: |