chore(learn): Applied MDX format to Chinese curriculum files (#40462)

This commit is contained in:
Randell Dawson
2020-12-16 00:37:30 -07:00
committed by GitHub
parent 873fce02a2
commit 9ce4a02a41
1665 changed files with 58741 additions and 88042 deletions

View File

@ -4,27 +4,30 @@ challengeType: 11
videoId: ugYfJNTawks
---
## Description
<section id='description'>
</section>
# --question--
## Tests
<section id='tests'>
## --text--
```yml
question:
text: |
Which socket object method lets you set the maximum amount of data your client accepts at once?
Which socket object method lets you set the maximum amount of data your client accepts at once?
answers:
- |
`.recv(1024)`
- |
`.decode('ascii')`
- |
`.connect(host, port)`
solution: 1
```
## --answers--
</section>
`.recv(1024)`
---
`.decode('ascii')`
---
`.connect(host, port)`
## --video-solution--
1
# --hints--
# --solutions--

View File

@ -4,40 +4,43 @@ challengeType: 11
videoId: CeGW761BIsA
---
## Description
<section id='description'>
</section>
# --question--
## Tests
<section id='tests'>
## --text--
```yml
question:
text: |
Fill in the blanks to complete the `banner` function below:
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)`
solution: 3
```py
def banner(ip, port):
s = socket.socket()
s.__A__((ip, __B__))
print(s.recv(1024))
```
</section>
## --answers--
A: `connect`
B: `port`
---
A: `getsockname`
B: `'1-1024'`
---
A: `connect`
B: `int(port)`
## --video-solution--
3
# --hints--
# --solutions--

View File

@ -4,28 +4,30 @@ challengeType: 11
videoId: z_qkqZS7KZ4
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
What is the main difference between the `.connect()` and `.connect_ex()` methods?
<section id='tests'>
## --answers--
```yml
question:
text: |
What is the main difference between the `.connect()` and `.connect_ex()` methods?
There is no difference between the two 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.
solution: 3
```
---
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
# --hints--
# --solutions--
</section>

View File

@ -4,27 +4,30 @@ challengeType: 11
videoId: jYk9XaGoAnk
---
## Description
<section id='description'>
</section>
# --question--
## Tests
<section id='tests'>
## --text--
```yml
question:
text: |
What is the correct command to install the Python 3 version of the `python-nmap` library?
What is the correct command to install the Python 3 version of the `python-nmap` library?
answers:
- |
`sudo apt install python-nmap`
- |
`pip install python-nmap`
- |
`pip3 install python-nmap`
solution: 3
```
## --answers--
</section>
`sudo apt install python-nmap`
---
`pip install python-nmap`
---
`pip3 install python-nmap`
## --video-solution--
3
# --hints--
# --solutions--

View File

@ -4,27 +4,30 @@ challengeType: 11
videoId: a98PscnUsTg
---
## Description
<section id='description'>
</section>
# --question--
## Tests
<section id='tests'>
## --text--
```yml
question:
text: |
Which of the following allows you to scan for UDP ports between 21 to 443?
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
```
## --answers--
</section>
`.scan(ip_addr, '21-443', '-v -sU')`
---
`.scan(ip_addr, '1-1024', '-v -sS')`
---
`.scan(ip_addr, '21-443', '-v -sS')`
## --video-solution--
1
# --hints--
# --solutions--

View File

@ -4,28 +4,30 @@ challengeType: 11
videoId: XeQ7ZKtb998
---
## Description
# --question--
<section id='description'>
</section>
## --text--
## Tests
What code editor and extension does the instructor recommend for developing penetration testing tools in Python?
<section id='tests'>
## --answers--
```yml
question:
text: |
What code editor and extension does the instructor recommend for developing penetration testing tools in Python?
Atom and the atom-python-run extension.
answers:
- |
Atom and the atom-python-run extension.
- |
VSCode and Microsoft's Python extension.
- |
Sublime Text and the Anaconda package.
solution: 2
```
---
VSCode and Microsoft's Python extension.
---
Sublime Text and the Anaconda package.
## --video-solution--
2
# --hints--
# --solutions--
</section>

View File

@ -4,27 +4,30 @@ challengeType: 11
videoId: F1QI9tNuDQg
---
## Description
<section id='description'>
</section>
# --question--
## Tests
<section id='tests'>
## --text--
```yml
question:
text: |
Which of the following functions creates a socket object?
Which of the following functions creates a socket object?
answers:
- |
`socket.bind((host, port))`
- |
`socket.gethostbyname()`
- |
`socket.socket(socket.AF_INET, socket.SOCK_STREAM)`
solution: 3
```
## --answers--
</section>
`socket.bind((host, port))`
---
`socket.gethostbyname()`
---
`socket.socket(socket.AF_INET, socket.SOCK_STREAM)`
## --video-solution--
3
# --hints--
# --solutions--