extract host and port from a proxy with authentication
(data: str)
| 72 | |
| 73 | |
| 74 | def extract_auth_proxy(data: str) -> (str, str): |
| 75 | """ |
| 76 | extract host and port from a proxy with authentication |
| 77 | """ |
| 78 | auth = data.split('@')[0] |
| 79 | ip_port = data.split('@')[1] |
| 80 | ip = ip_port.split(':')[0] |
| 81 | port = ip_port.split(':')[1] |
| 82 | host = auth + '@' + ip |
| 83 | return host, port |
| 84 | |
| 85 | |
| 86 | if __name__ == '__main__': |
no outgoing calls
no test coverage detected