dde272c4b8
i18n - Build Validation / Validate i18n Builds (24) (push) Has been cancelled
CI - Node.js / Lint (24) (push) Has been cancelled
CI - Node.js / Build (24) (push) Has been cancelled
CI - Node.js / Test (24) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (24) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 24) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 24) (push) Has been cancelled
CD - Docker - GHCR Images / Build and Push Images (push) Has been cancelled
48 lines
557 B
Markdown
48 lines
557 B
Markdown
---
|
|
id: 5ea9997bbec2e9bc47e94db3
|
|
title: Developing a Banner Grabber
|
|
challengeType: 11
|
|
videoId: CeGW761BIsA
|
|
bilibiliIds:
|
|
aid: 633014533
|
|
bvid: BV1Sb4y127H9
|
|
cid: 409036288
|
|
dashedName: developing-a-banner-grabber
|
|
---
|
|
|
|
# --questions--
|
|
|
|
## --text--
|
|
|
|
Fill in the blanks to complete the `banner` function below:
|
|
|
|
```py
|
|
def banner(ip, port):
|
|
s = socket.socket()
|
|
s.__A__((ip, __B__))
|
|
print(s.recv(1024))
|
|
```
|
|
|
|
## --answers--
|
|
|
|
A: `connect`
|
|
|
|
B: `port`
|
|
|
|
---
|
|
|
|
A: `getsockname`
|
|
|
|
B: `'1-1024'`
|
|
|
|
---
|
|
|
|
A: `connect`
|
|
|
|
B: `int(port)`
|
|
|
|
## --video-solution--
|
|
|
|
3
|
|
|