Feat: add new Markdown parser (#39800)

and change all the challenges to new `md` format.
This commit is contained in:
Oliver Eyton-Williams
2020-11-27 19:02:05 +01:00
committed by GitHub
parent a07f84c8ec
commit 0bd52f8bd1
2580 changed files with 113436 additions and 111979 deletions

View File

@ -5,27 +5,25 @@ 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

View File

@ -5,40 +5,38 @@ 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

View File

@ -5,28 +5,25 @@ 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
</section>

View File

@ -5,27 +5,25 @@ 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

View File

@ -5,27 +5,25 @@ 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

View File

@ -5,28 +5,25 @@ 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
</section>

View File

@ -5,27 +5,25 @@ 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