mirror of https://github.com/MISP/misp-modules
chg: [clamav] TCP port connection must be an integer
parent
8b8ac581e5
commit
0872bb820c
|
@ -51,7 +51,7 @@ def connect_to_clamav(connection_string: str) -> clamd.ClamdNetworkSocket:
|
||||||
return clamd.ClamdUnixSocket(connection_string.replace("unix://", ""))
|
return clamd.ClamdUnixSocket(connection_string.replace("unix://", ""))
|
||||||
elif ":" in connection_string:
|
elif ":" in connection_string:
|
||||||
host, port = connection_string.split(":")
|
host, port = connection_string.split(":")
|
||||||
return clamd.ClamdNetworkSocket(host, port)
|
return clamd.ClamdNetworkSocket(host, int(port))
|
||||||
else:
|
else:
|
||||||
raise Exception("ClamAV connection string is invalid")
|
raise Exception("ClamAV connection string is invalid")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue