Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions 403.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<html>
<head>
<title>Error!!!</title>
</head>
<body>
<H1>Error 403</H1>
<B><p>Wrong file type!</p></B>
<H5>Please, check the problems with your file's type.</H5>
</body>
</html>
10 changes: 10 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<html>
<head>
<title>Error!!!</title>
</head>
<body>
<H1>Error 404</H1>
<B><p>File not Found!</p></B>
<H5>Please check your file's name</H5>
</body>
</html>
274 changes: 274 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,274 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css?family=Kaushan+Script|Montserrat:400,700&amp;subset=cyrillic-ext" rel="stylesheet">
<script src="https://kit.fontawesome.com/71a5ff4102.js"></script>
<title>Soshadora life</title>
</head>
<body>
<header class="header">
<div class="container">
<div class="header_inner">
<div class="logo">Soshadora</div>
<nav class="nav">
<a class="nav_link active" href="#">About</a>
<a class="nav_link" href="#">Characters</a>
<a class="nav_link" href="#">Work</a>
<a class="nav_link" href="#">Life</a>
<a class="nav_link" href="#">Contact</a>
</nav>
</div>
</div>
</header>
<div class="intro">
<div class="container">
<div class="intro_inner">
<h2 class="intro_subtitle">This is my love</h2>
<h1 class="intro_title">Sonya Ravich-Sherba</h1>
<a class="btn" href="#">Learn more</a>
</div>
</div>
<div class="slider">
<div class="container">
<div class="slider_inner">
<div class="slider_item active_1"><span class="slider_num">01</span>Intro</div>
<div class="slider_item"><span class="slider_num">02</span> Biography</div>
<div class="slider_item"><span class="slider_num">03</span> Boyfriend</div>
<div class="slider_item"><span class="slider_num">04</span> Dreams</div>
</div>
</div>
</div>
</div>
<section class="section">
<div class="container">
<div class="section_header">
<h3 class="section_subtitle">Soshadora</h3>
<h2 class="section_title">Story about us</h2>
<div class="section_text"><p>I met her at the camp. She was great. I fell in love with her at first sight, but we met other people. After two months our paths unite into one branch - <b>Soshadora</b>. Since them, we have been Dating for 3 years, and then only better...</p></div>
</div>
<div class="about">
<div class="about_item">
<div class="about_img">
<img src="Team.jpg" alt="">
</div>
<div class="about_text">Soshadora team</div>
</div>
<div class="about_item">
<div class="about_img">
<img src="History.jpg" alt="">
</div>
<div class="about_text">Soshadora history</div>
</div>
<div class="about_item">
<div class="about_img">
<img src="Today.jpg" alt="">
</div>
<div class="about_text">Soshadora today</div>
</div>
</div>
</div>
</section>

<div class="statistics">
<div class="container">
<div class="stat">
<div class="stat_item">
<div class="stat_count">3M+</div>
<div class="stat_text">kisses and hugs</div>
</div>
<div class="stat_item">
<div class="stat_count">10M+</div>
<div class="stat_text">phrases "I love you"</div>
</div>
<div class="stat_item">
<div class="stat_count">40K+</div>
<div class="stat_text">photos and videos</div>
</div>
<div class="stat_item">
<div class="stat_count">17</div>
<div class="stat_text">kilos of pure happiness</div>
</div>
</div>
</div>
</div>

<section class="section">
<div class="container">
<div class="section_header">
<h3 class="section_subtitle">So why I love</h3>
<h2 class="section_title">Sofya Ravich-Sherba?</h2>
</div>
<div class="services" >
<div class="services_item">
<div class="services_title">Caring</div>
<div class="services_text">At any difficult moment, she will not leave in trouble, will try to solve the problem and wiil console in case of falture.</div>
</div>
<div class="services_item">
<div class="services_title">Generous</div>
<div class="services_text">If I have a problem, she will give me the last clumb to solve it.</div>
</div>
<div class="services_item">
<div class="services_title">Funny</div>
<div class="services_text">Her laugh is a way to resolve any dispute, it helps not to get lost in an infamillar company and also acts like a pill from depression.</div>
</div>
</div>
<hr>
<div class="services">
<div class="services_item">
<div class="services_title">Clever</div>
<div class="services_text">She knows perfecty what she needs from life and independently achieves her own goals, not paying attention to anyone.</div>
</div>
<div class="services_item">
<div class="services_title">Infantile</div>
<div class="services_text">And despite your intelligence, passion and self-sufficiency, you are a little girl, who likes hugs, sweets and toys.</div>
</div>
</div>
</div>
</section>

<section class="section section--devices">
<div class="container">
<div class="section_header">
<h3 class="section_subtitle">Our love is</h3>
<h2 class="section_title">Uniqie and beautiful</h2>
</div>
<div class="devices">
<img class="devices_item" src="ipad_slide.png" alt="">
<img class="devices_item devices_item--iphone" src="iphone1.png" alt="">
</div>
</div>
</section>

<section class="section">
<div class="container">
<div class="section_header">
<h3 class="section_subtitle">Soshadora's life</h3>
<h2 class="section_title">What we do</h2>
<div class="section_text">
<p>I believe that Soshadora's life is very bright and varied. We're both extroverts, so we're always looking for adventures. The brightness of our life give the following elements.</p>
</div>
</div>
<div class="whatwedo">
<div class="whatwedo_item">
<img src="whatwedo.jpg" alt="">
</div>
<div class="whatwedo_item">
<div class="accordeon">
<div class="accordeon_item active">
<div class="accordeon_header">
<img class="accordeon_icon" src='photogr.png' alt="">
<div class="accordeon_title">Photography</div>
</div>
<div class="accordeon_content">
<p>For 3 years, Soshadora has made more than 40 thousand photos and videos that keep in our mind the moments when we aspired, despaired, laughed, cried and were just happy.</p>
</div>
</div>
<div class="accordeon_item">
<div class="accordeon_header">
<img class="accordeon_icon" src='travel.png' alt="">
<div class="accordeon_title">journey</div>
</div>
<div class="accordeon_content">
<p>For 3 years, Soshadora has made more than 40 thousand photos and videos that keep in our mind the moments when we aspired, despaired, laughed, cried and were just happy.</p>

</div>
</div>
<div class="accordeon_item">
<div class="accordeon_header">
<img class="accordeon_icon" src='intim.png' alt="">
<div class="accordeon_title">romantic moments</div>
</div>
<div class="accordeon_content">
<p>For 3 years, Soshadora has made more than 40 thousand photos and videos that keep in our mind the moments when we aspired, despaired, laughed, cried and were just happy.</p>

</div>
</div>
<div class="accordeon_item">
<div class="accordeon_header">
<img class="accordeon_icon" src='sun.png' alt="">
<div class="accordeon_title">unexpected walks</div>
</div>
<div class="accordeon_content">
<p>For 3 years, Soshadora has made more than 40 thousand photos and videos that keep in our mind the moments when we aspired, despaired, laughed, cried and were just happy.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>

<div class="section section--gray">
<div class="container">
<div class="reviews">
<a class="reviews_btn reviews_btn--prev" href="#">prev</a>
<a class="reviews_btn reviews_btn--next" href="#">next</a>
<div class="reviews_item">
<img class= "reviews_photo" src="review.png" alt="">
<div class="reviews_text">
You can say "I love you" to anyone, but I believe that it can only be said to someone with whom you can run in the middle of the night, look at the stars, laugh and dream.
</div>
<div class="reviews_author">Sofya Ravich-Sherba</div>
</div>
</div>
</div>
</div>

<section class="section">
<div class="container">
<div class="section_header">
<h3 class="section_subtitle">Who we are</h3>
<h2 class="section_title">Meet our team</h2>
<div class="section_text">
<p>Today, the team of Soshadora consists of 2 people. These are developed relations that have an extremely positive trend. However, the team has enough ambition and love to expand.</p>
</div>
</div>
<div class="about">
<div class="about_item">
<div class="about_img">
<img src="sasha.jpg" alt="">
</div>
<div class="about_text">
<div class="social">
<a class="social_item" href="#" target="_blank">
<i class="fab fa-vk"></i>
<i class="fab fa-instagram"></i>
<i class="fab fa-whatsapp"></i>
<i class="fab fa-skype"></i>
</a>
</div>
</div>
</div>
<div class="about_item">
<div class="about_img">
<img src="asia.jpg" alt="">
</div>
<div class="about_text">Not information</div>
</div>
<div class="about_item">
<div class="about_img">
<img src="sofya.jpg" alt="">
</div>
<div class="about_text">
<div class="social">
<a class="social_item" href="#" target="_blank">
<i class="fab fa-vk"></i>
<i class="fab fa-instagram"></i>
<i class="fab fa-whatsapp"></i>
<i class="fab fa-skype"></i>
</a>
</div>
</div>
</div>
</div>
</div>
</section>
</body>
</html>






10 changes: 10 additions & 0 deletions index2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<html>
<head>
<title>Hi</title>
</head>
<body>
<H1>Hello, my friend
</H1>
<B><p>So, it's work!</p></B>
</body>
</html>
31 changes: 22 additions & 9 deletions server.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import socket

import os
sock = socket.socket()

try:
Expand All @@ -10,22 +10,35 @@
print("Using port 8080")

sock.listen(5)

conn, addr = sock.accept()
print("Connected", addr)

data = conn.recv(8192)
msg = data.decode()

print(msg)
n = msg.split()[1][1:]
rasr = str(n).split('.')[1]
print(n)
print('--------------------')
print(rasr)
dost_rasr = ["js","html","css","php","jpg", "png", "gif", "ico"]
if n in os.listdir():
file = n
elif rasr in dost_rasr:
file = "404.html"
else:
file = "403.html"

res = open(file)
result = res.read()
print("\nFile:\n", result)

resp = """HTTP/1.1 200 OK
Server: SelfMadeServer v0.0.1
Content-type: text/html
Connection: close

Hello, webworld!"""

{0}""".format(result)


conn.send(resp.encode())

conn.close()