Using username "root".
Authenticating with public key "imported-openssh-key"
Linux v43195 4.9.0-16-amd64 #1 SMP Debian 4.9.272-2 (2021-07-19) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@v43195:~# python3
Python 3.7.2 (default, Oct 10 2020, 15:44:37)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>>
>>> listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>>> listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
>>> listener.bind(('0.0.0.0', 9999))
>>> listener.listen(0)
>>> print("Wait")
Wait
>>> listener.accept()
(<socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('46.17.45.71', 9999), raddr=('5.101.156.100', 56353)>, ('5.101.156.100', 56353))
>>> print("Connect")
Connect
>>>
Using username "x90048bt".
Pre-authentication banner message from server:
| Welcome to LTD BeGet SSH Server 'bigbone'
End of banner message from server
Authenticating with public key "imported-openssh-key"
Welcome to Ubuntu 12.04.5 LTS (GNU/Linux 4.9.207-1-beget-acl x86_64)
* Documentation: https://help.ubuntu.com/
Last login: Sun Jan 2 18:58:44 2022 from 85.249.21.110
x90048bt@bigbone:~ [0] $ python
Python 2.7.3 (default, Oct 26 2016, 21:01:49)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>>> connection.connect(('46.17.45.71', 9999))
>>> connection.close()
>>>
http://rucaptcha.example.com/in.php?image=qwe.png&callback=https://mysite.example.com/success.php
rucaptcha.example.com
сам его тебе отправит на твой сайт mysite.example.com
.from bs4 import BeautifulSoup
from urllib.request import urlopen
from json import dumps
url = "https://rozklad.ztu.edu.ua/schedule/group/%D0%86%D0%9F%D0%97-21-3?new"
bs=BeautifulSoup(urlopen(url).read(), features="lxml")
schedule = []
schedule_table = bs.find("table", attrs={"class":"schedule"})
for tr in schedule_table.findAll("tr"):
if str(tr.th.text).strip() == "":
continue
tds = tr.findAll("td")
for td in tds:
newitem = {
"day": td.get("day")[0:-2],
"hour": td.get("hour")
}
if len(td.get("class")) > 0:
newitem.update({
"content": {
"variative": {
"subject": td.find("div", attrs={"class":"subject"}).text.strip(),
"room": td.find("span", attrs={"class":"room"}).parent.text.strip(),
"room_span": td.find("span", attrs={"class":"room"}).text.strip(),
"room_changed": "changed" in td.find("span", attrs={"class":"room"}).get("class"),
"teacher": td.find("div", attrs={"class":"teacher"}).text.strip(),
}
}
})
schedule.append(newitem)
print(dumps(schedule, indent = 4, ensure_ascii = False))
# так можно фильтровать
wednesdays = [d for d in schedule if d["day"] == "Середа"]
print(dumps(wednesdays, indent = 4, ensure_ascii = False))
# и так по любому из параметров
<?php
if ($_SERVER['REQUEST_METHOD'] == "POST") {
header('Content-type: text/plain; charset=utf-8');
$to = "damirgaliev587@gmail.com";
$tema = "Форма обратной связи на PHP";
$message = "Ваше имя: ".htmlspecialchars($_POST['name'])."<br>";
$message .= "E-mail: ".htmlspecialchars($_POST['email'])."<br>";
$message .= "Номер телефона: ".htmlspecialchars($_POST['phone'])."<br>";
$message .= "Сообщение: ".htmlspecialchars($_POST['message'])."<br>";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
mail($to, $tema, $message, $headers);
}
header('Location: index.html');
?>
R::getAll( 'select * from yourtablename where email = :email',
array(':email'=>$_POST['email'])
);
PassengerEnabled On
PassengerPython /usr/bin/python
Готово!#!/usr/bin/env python2
#-*- coding: utf-8 -*-
print("Content-type: text/html")
print("\n")
print("<h1>Hello world!</h1>")