Files
freeCodeCamp/curriculum/challenges/italian/09-information-security/python-for-penetration-testing/developing-a-port-scanner.md
Nicholas Carrigan (he/him) f25e3e69f8 feat: enable new langs (#42491)
Enable italian and portuguese
2021-06-15 13:19:18 +05:30

609 B

id, title, challengeType, videoId, dashedName
id title challengeType videoId dashedName
5ea9997bbec2e9bc47e94db4 Developing a Port Scanner 11 z_qkqZS7KZ4 developing-a-port-scanner

--question--

--text--

What is the main difference between the .connect() and .connect_ex() methods?

--answers--

There is no difference between the two methods.


If there is an error or if no host is found, .connect() returns an error code while .connect_ex() raises an exception.


If there is an error or if no host is found, .connect() raises an exception while .connect_ex() returns an error code.

--video-solution--

3