Inital commit

This commit is contained in:
2023-04-12 00:25:33 +02:00
commit f1f0b29fb6
6 changed files with 81 additions and 0 deletions

18
kapitel6/data.txt Normal file
View File

@@ -0,0 +1,18 @@
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Content-Length: 298
Server: netcat
<!doctype html>
<html lang="sv">
<head>
<meta charset="utf-8">
<title>Min egen HTTP-demon</title>
</head>
<body>
<h1>En liten och enkel HTTP-demon</h1>
<p>Webben är inte mycket mer än detta. En demon<br>
som lyssnar på en port och skickar några textsträngar.</p>
</body>
</html>

5
kapitel6/mini-httpd.sh Normal file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
while true; do
cat data.txt | nc -w1 127.0.0.1 -l 8999;
done