OverTheWire - Natas : Level 1 -> Level 2
Natas : Level 1 -> Level 2
Browse to the URL natas1.natas.labs.overthewire.org
Enter the username as
natas1
and password obtained fromnatas0
level fornatas1
.View page source of the HTML page to get the password to next level
natas2
.
Below is the python script to Automate using request library
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import requests as r
import re
def auth(username ,password, URL) :
with r.session() as s :
resp = s.get(URL, auth=(username,password))
content = resp.text
print(re.findall("<!--The password for natas2 is (.*) -->", content)[0])
def main():
username = 'natas1'
password = 'g9D9cREhslqBKtcA2uocGHPfMZVzeFK6' # natas1 password obtained from natas0
URL = f"http://{username}.natas.labs.overthewire.org"
results = auth(username, password, URL)
main()
This post is licensed under CC BY 4.0 by the author.