MCPcopy Index your code
hub / github.com/MatrixTM/MHDDoS / open_connection

Method open_connection

start.py:935–951  ·  view source on GitHub ↗
(self, host=None)

Source from the content-addressed store, hash-verified

933 "\r\n"))
934
935 def open_connection(self, host=None) -> socket:
936 if self._proxies:
937 sock = randchoice(self._proxies).open_socket(AF_INET, SOCK_STREAM)
938 else:
939 sock = socket(AF_INET, SOCK_STREAM)
940
941 sock.setsockopt(IPPROTO_TCP, TCP_NODELAY, 1)
942 sock.settimeout(.9)
943 sock.connect(host or self._raw_target)
944
945 if self._target.scheme.lower() == "https":
946 sock = ctx.wrap_socket(sock,
947 server_hostname=host[0] if host else self._target.host,
948 server_side=False,
949 do_handshake_on_connect=True,
950 suppress_ragged_eofs=True)
951 return sock
952
953 @property
954 def randHeadercontent(self) -> str:

Callers 15

POSTMethod · 0.95
TORMethod · 0.95
STRESSMethod · 0.95
COOKIESMethod · 0.95
APACHEMethod · 0.95
XMLRPCMethod · 0.95
PPSMethod · 0.95
GETMethod · 0.95
BOTMethod · 0.95
EVENMethod · 0.95
OVHMethod · 0.95
CFBUAMMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected