feat(curriculum): add python multiple choice questions (#38890)

This commit is contained in:
Kristofer Koishigawa
2020-05-28 22:40:36 +09:00
committed by GitHub
parent 18d2dca05b
commit 3567813c51
98 changed files with 1118 additions and 398 deletions

View File

@ -15,12 +15,17 @@ videoId: ugYfJNTawks
```yml
question:
text: Question
text: |
Which socket object method lets you set the maximum amount of data your client accepts at once?
answers:
- one
- two
- three
solution: 3
- |
`.recv(1024)`
- |
`.decode('ascii')`
- |
`.connect(host, port)`
solution: 1
```
</section>

View File

@ -15,11 +15,23 @@ videoId: CeGW761BIsA
```yml
question:
text: Question
text: |
Fill in the blanks to complete the `banner` function below:
```py
def banner(ip, port):
s = socket.socket()
s.____((ip, ____))
print(s.recv(1024))
```
answers:
- one
- two
- three
- |
`connect`, `port`
- |
`getsockname`, `'1-1024'`
- |
`connect`, `int(port)`
solution: 3
```

View File

@ -15,11 +15,15 @@ videoId: z_qkqZS7KZ4
```yml
question:
text: Question
text: |
What is the main difference between the `.connect()` and `.connect_ex()` methods?
answers:
- one
- two
- three
- 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.
solution: 3
```

View File

@ -15,11 +15,16 @@ videoId: jYk9XaGoAnk
```yml
question:
text: Question
text: |
What is the correct command to install the Python 3 version of the `python-nmap` library?
answers:
- one
- two
- three
- |
`sudo apt install python-nmap`
- |
`pip install python-nmap`
- |
`pip3 install python-nmap`
solution: 3
```

View File

@ -0,0 +1,32 @@
---
id: 5ea9997bbec2e9bc47e94db2
title: Developing an Nmap Scanner part 2
challengeType: 11
isHidden: true
videoId: a98PscnUsTg
---
## Description
<section id='description'>
</section>
## Tests
<section id='tests'>
```yml
question:
text: |
Which of the following allows you to scan for UDP ports between 21 to 443?
answers:
- |
`.scan(ip_addr, '21-443', '-v -sU')`
- |
`.scan(ip_addr, '1-1024', '-v -sS')`
- |
`.scan(ip_addr, '21-443', '-v -sS')`
solution: 1
```
</section>

View File

@ -1,27 +0,0 @@
---
id: 5ea9997bbec2e9bc47e94db2
title: Developing and Nmap Scanner part 2
challengeType: 11
isHidden: true
videoId: a98PscnUsTg
---
## Description
<section id='description'>
</section>
## Tests
<section id='tests'>
```yml
question:
text: Question
answers:
- one
- two
- three
solution: 3
```
</section>

View File

@ -15,12 +15,14 @@ videoId: XeQ7ZKtb998
```yml
question:
text: Question
text: |
What code editor and extension does the instructor recommend for developing penetration testing tools in Python?
answers:
- one
- two
- three
solution: 3
- Atom and the atom-python-run extension.
- VSCode and Microsoft's Python extension.
- Sublime Text and the Anaconda package.
solution: 2
```
</section>

View File

@ -15,11 +15,16 @@ videoId: F1QI9tNuDQg
```yml
question:
text: Question
text: |
Which of the following functions creates a socket object?
answers:
- one
- two
- three
- |
`socket.bind((host, port))`
- |
`socket.gethostbyname()`
- |
`socket.socket(socket.AF_INET, socket.SOCK_STREAM)`
solution: 3
```