Skip to content
Open

V2 #3

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
adabf77
Update README.md
learn7995 Jul 7, 2021
fa26f8d
Update README.md
learn7995 Jul 7, 2021
e7e81c5
Update README.md
learn7995 Jul 7, 2021
a4927d8
Update README.md
learn7995 Jul 7, 2021
e92625d
Update README.md
learn7995 Jul 7, 2021
8256c1b
Update README.md
learn7995 Jul 7, 2021
fd37270
Update README.md
learn7995 Jul 7, 2021
75c7917
Update README.md
learn7995 Jul 7, 2021
8438832
Update README.md
learn7995 Jul 7, 2021
7f6e3eb
Rename 05_shell/README.md to 06_shell/README.md
learn7995 Jul 7, 2021
aea68b4
Rename 06_shell/README.md to 05_shell/README.md
learn7995 Jul 7, 2021
e167a20
Create README.md
learn7995 Jul 7, 2021
f9775f4
Update README.md
learn7995 Jul 7, 2021
6b2efc0
Update README.md
learn7995 Jul 7, 2021
7b3fe6a
Delete 06_c directory
learn7995 Jul 7, 2021
0b8c531
Create README.md
learn7995 Jul 26, 2021
e16d7e4
Create README.md
learn7995 Jul 26, 2021
75af6e2
Create README.md
learn7995 Jul 26, 2021
758d526
Create README.md
learn7995 Jul 26, 2021
51dc7c9
Create README.md
learn7995 Jul 26, 2021
d0bdbe4
Create README.md
learn7995 Jul 26, 2021
5afb497
Delete 06_python1 directory
learn7995 Jul 26, 2021
e6d4bb4
Delete 07_python2 directory
learn7995 Jul 26, 2021
b6b1337
Delete 08_python3 directory
learn7995 Jul 26, 2021
4d98ba2
Delete 10_sd directory
learn7995 Jul 26, 2021
168a066
Delete 11_reverse directory
learn7995 Jul 26, 2021
9b97ae0
Update README.md
learn7995 Jul 26, 2021
5997236
Create README.md
learn7995 Jul 26, 2021
e2540cd
Create README.md
learn7995 Jul 26, 2021
6631ef5
Create README.md
learn7995 Jul 26, 2021
d8c6347
Create README.md
learn7995 Jul 26, 2021
dfb550c
Create README.md
learn7995 Jul 26, 2021
f2dc7ea
Create README.md
learn7995 Jul 26, 2021
e266a83
Update README.md
learn7995 Jul 26, 2021
abafccd
Update README.md
learn7995 Jul 26, 2021
a9a7c0a
Update README.md
learn7995 Jul 26, 2021
97013ac
Update README.md
learn7995 Jul 26, 2021
8c07057
Update README.md
learn7995 Jul 26, 2021
1b1b215
Update README.md
learn7995 Jul 26, 2021
b11c266
Update README.md
learn7995 Jul 26, 2021
6161f35
Update README.md
learn7995 Jul 26, 2021
2dcbf3b
Delete 09_go directory
learn7995 Jul 26, 2021
6a4d328
Delete 10_go directory
learn7995 Jul 26, 2021
0a00886
Delete 11_go directory
learn7995 Jul 26, 2021
5d98cf0
Create README.md
learn7995 Jul 26, 2021
ee45ac9
Add files via upload
learn7995 Jul 26, 2021
330ff42
Update README.md
learn7995 Jul 26, 2021
6785c28
Add files via upload
learn7995 Jul 26, 2021
b52bc95
Create readme
learn7995 Jul 26, 2021
17a6e8b
Add files via upload
learn7995 Jul 26, 2021
3c0021b
Delete readme
learn7995 Jul 26, 2021
d7153fe
Update README.md
learn7995 Jul 26, 2021
d6adb64
Create 1
learn7995 Jul 26, 2021
1924aaa
Add files via upload
learn7995 Jul 26, 2021
f87cdc4
Update README.md
learn7995 Jul 26, 2021
ce34c68
Delete 07_c directory
learn7995 Jul 26, 2021
a02042b
Delete 08_c directory
learn7995 Jul 26, 2021
6b79324
Delete 09_c directory
learn7995 Jul 26, 2021
5df9866
Update README.md
learn7995 Jul 26, 2021
b147d38
Update README.md
learn7995 Jul 30, 2021
34afe1c
Update README.md
learn7995 Jul 30, 2021
e398753
Update README.md
sashalisina Aug 6, 2021
683b29b
Update README.md
learn7995 Aug 19, 2021
879e2f5
Update README.md
learn7995 Aug 19, 2021
27a3906
Update README.md
learn7995 Aug 24, 2021
28c8023
Add files via upload
learn7995 Aug 25, 2021
79fd997
Update README.md
learn7995 Aug 25, 2021
2a987e0
Update README.md
learn7995 Aug 25, 2021
f1feaf9
Update README.md
learn7995 Aug 25, 2021
912e830
Update README.md
learn7995 Aug 25, 2021
6506d59
Update README.md
learn7995 Sep 7, 2021
94dabee
Update README.md
learn7995 Oct 22, 2021
028f75b
Update README.md
learn7995 Jan 3, 2022
db7888a
Update README.md
learn7995 Jun 27, 2022
5c302e5
Update README.md
learn7995 Feb 15, 2023
0f2d37d
Update README.md
learn7995 Feb 15, 2023
94bce9b
Update README.md
learn7995 Feb 15, 2023
3cf1291
Update README.md
learn7995 Mar 20, 2023
773e6f3
Update README.md
okskharitonova May 4, 2023
e439bae
Update README.md
okskharitonova May 4, 2023
67e3d7b
Update README.md
learn7995 Aug 14, 2023
7da1e32
Update README.md
NatashaNagaeva May 28, 2024
195135a
Update README.md
NatashaNagaeva May 28, 2024
18f40d4
Update README.md
NatashaNagaeva Feb 24, 2025
68fe7c6
Update README.md
NatashaNagaeva Feb 24, 2025
5d9f48d
Update README.md
NatashaNagaeva Feb 24, 2025
6b87d9b
Update README.md
NatashaNagaeva Feb 24, 2025
fd93e37
Update README.md
NatashaNagaeva Feb 24, 2025
fde0aa5
Update README.md
NatashaNagaeva Apr 24, 2025
518fb08
Update README.md
NatashaNagaeva Apr 24, 2025
1cb683b
Update README.md
NatashaNagaeva Apr 24, 2025
9f8cf57
Update README.md
NatashaNagaeva Apr 24, 2025
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
11 changes: 11 additions & 0 deletions 00_Code/12_check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-

import os

path = "c:\windows"
#path = "c:\windows1"

if os.path.exists(path):
print("Каталог", path, "сущестует")
else:
print("Каталог", path, "не сущестует")
17 changes: 17 additions & 0 deletions 00_Code/13_for.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-

import os

last = 10
mask = "127.0.0."


for i in range(1, last):

host = mask + str(i)
result = os.system("ping -n 1 -w 1 " + host)

if not result:
print("Хост", host, "сущестует")
else:
print("Хост", host, "не сущестует")
2 changes: 2 additions & 0 deletions 00_Code/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

Код из лекций
13 changes: 13 additions & 0 deletions 00_Code/crypto_back.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-

plain_text = "Очень секретная информация"
ciphertext = ""

i = len(plain_text) - 1

while i >= 0:
ciphertext = ciphertext + plain_text[i]
i = i - 1

print(ciphertext)

41 changes: 41 additions & 0 deletions 00_Code/crypto_caesar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-

plain_text = 'Секретная информация о русских хакерах'
key = 10

aphabet = 'АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ\
абвгдежзийклмнопрстуфхцчшщъыьэюя'
ciphertext = ''

for symbol in plain_text:
if symbol in aphabet:
num = aphabet.find(symbol)
num = num + key

if num >= len(aphabet):
num = num - len(aphabet)

ciphertext = ciphertext + aphabet[num]

else:
ciphertext = ciphertext + symbol

print(ciphertext)

plain_text = ciphertext
ciphertext = ''

for symbol in plain_text:
if symbol in aphabet:
num = aphabet.find(symbol)
num = num - key

if num < 0:
num = num + len(aphabet)

ciphertext = ciphertext + aphabet[num]

else:
ciphertext = ciphertext + symbol

print(ciphertext)
24 changes: 24 additions & 0 deletions 00_Code/crypto_caesar_brute.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-

ciphertext = 'ЫпфъпьчкЙжтчюшъцкАтЙжшжъэыыфтяжякфпъкя'

aphabet = 'АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ\
абвгдежзийклмнопрстуфхцчшщъыьэюя'

for key in range(len(aphabet)):
plain_text = ''

for symbol in ciphertext:
if symbol in aphabet:
num = aphabet.find(symbol)
num = num - key

if num < 0:
num = num + len(aphabet)

plain_text = plain_text + aphabet[num]
else:
plain_text = plain_text + symbol

print(key, ":", plain_text)

104 changes: 104 additions & 0 deletions 00_Code/crypto_hash.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# -*- coding: utf-8 -*-

import hashlib

'''
text = "Секретная информация о русских хакерах".split()

for i in text:
md5 = hashlib.md5(i.encode())
print(i,":", md5.hexdigest())
'''

"""
print("Посимвольно:")
md5 = hashlib.md5()
md5.update(b"t")
print(md5.hexdigest())
md5.update(b"e")
print(md5.hexdigest())
md5.update(b"x")
print(md5.hexdigest())
md5.update(b"t")
print(md5.hexdigest())

md5 = hashlib.md5(b"text")
print("text:\n" + md5.hexdigest())
"""

'''
md5 = hashlib.md5(b"text")
print("MD5:", md5.hexdigest())
md5 = hashlib.sha1(b"text")
print("SHA-1:", md5.hexdigest())
md5 = hashlib.sha256(b"text")
print("SHA-256:", md5.hexdigest())
md5 = hashlib.sha512(b"text")
print("SHA-512:", md5.hexdigest())
'''

'''
text = "text"
salt = "salt"

md5 = hashlib.sha512(b"text")
print("SHA-512:", md5.hexdigest())

md5 = hashlib.sha512(salt.encode() + text.encode())
print("SHA-512 with salt:", md5.hexdigest())
'''

'''
import bcrypt

user_pass = "12345"
hashed_pass = bcrypt.hashpw(user_pass.encode(), bcrypt.gensalt())
print(hashed_pass)

user_text = input("Введите пароль:")

if bcrypt.hashpw(user_text.encode(), hashed_pass) == hashed_pass:
print("Пароли совпадают.")
else:
print("Пароли не совпадают.")
'''


'''
from Crypto.Cipher import AES
import os

key = os.urandom(16)
print("key: ", key.hex())
aes = AES.new(key, AES.MODE_EAX)

ciphertext, tag = aes.encrypt_and_digest(b"data")

print("Ciphertext:", ciphertext.hex())
'''


from Crypto.Cipher import AES
from Crypto import Random

BS = AES.block_size
pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS)
unpad = lambda s : s[:-ord(s[len(s)-1:])]

plain_text = "Top secret1"
key = hashlib.sha256(b"12345").digest()
print("Key:", key)

plain_text = pad(plain_text)
iv = Random.new().read(BS)
cipher = AES.new(key, AES.MODE_CBC, iv)
cipher_text = (iv + cipher.encrypt(plain_text.encode()))
print("\nCiphered text:", cipher_text)

cipher_text = cipher_text
iv = cipher_text[:BS]
cipher = AES.new(key, AES.MODE_CBC, iv )
plain_text = unpad(cipher.decrypt(cipher_text[BS:]))
print("\nPlain text:", plain_text)


Binary file added 00_Code/main
Binary file not shown.
Binary file added 00_Code/main1
Binary file not shown.
16 changes: 16 additions & 0 deletions 00_Code/nmap_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/python3

import nmap3
import json

scan = nmap3.NmapScanTechniques()
result = scan.nmap_syn_scan("192.168.0.5")

print(result)
#print(result["192.168.0.5"])
#print(result["192.168.0.5"]["ports"][0]["protocol"])
#print(result["192.168.0.5"]["ports"][0]["portid"])
#print(result["192.168.0.5"]["ports"][0]["state"])

for i in result["192.168.0.5"]["ports"]:
print(i["protocol"], i["portid"], i["state"])
42 changes: 42 additions & 0 deletions 00_Code/pywifi_scrypt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-

import pywifi
import time

wifi = pywifi.PyWiFi()
iface = wifi.interfaces()[0]
print("Мой интерфейс:", iface.name())

iface.scan()
time.sleep(2)

result = iface.scan_results()

print("\nДоступные сети:")
for i in range(len(result)):
print(result[i].ssid, result[i].bssid)


profile = pywifi.Profile()
profile.ssid = 'iphone'
profile.auth = pywifi.const.AUTH_ALG_OPEN
profile.akm.append(pywifi.const.AKM_TYPE_WPA2PSK)
profile.cipher = pywifi.const.CIPHER_TYPE_CCMP
profile.key = '1!234567'

profile = iface.add_network_profile(profile)
iface.connect(profile)

result = iface.status()

if result == pywifi.const.IFACE_CONNECTING:
print("Пробуем присоединиться")

time.sleep(10)

result = iface.status()
if result == pywifi.const.IFACE_CONNECTED:
print("Соединение установлено")
else:
print("Статус соединения", result)

20 changes: 20 additions & 0 deletions 00_Code/wifi_scapy_sniff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-

from scapy.all import *
from time import sleep

iface = "Realtek 8812AU Wireless LAN 802.11ac USB NIC"
devices = set()

# отбрасываем beacons, probe request и responses
def dump_packet(pkt):
if not pkt.haslayer(Dot11Beacon) and not pkt.haslayer(Dot11ProbeReq) and not pkt.haslayer(Dot11ProbeResp):
print(pkt.summary())

if pkt.haslayer(Raw):
print(hexdump(pkt.load), "\n")

print ("Прослушиваем интерфейс:" + iface)
while True:
sleep(0.01)
sniff(iface=iface, prn=dump_packet, count=10, timeout=3, store=0)
2 changes: 1 addition & 1 deletion 01_win/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

### Задача

Скачайте установочный [ISO-файл от Microsoft](https://www.microsoft.com/ru-ru/software-download/windows10ISO).
Скачайте установочный [ISO-файл от Microsoft](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-10-enterprise).

<details>
<summary>Для Windows</summary>
Expand Down
2 changes: 1 addition & 1 deletion 03_nix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

С помощью `journalctl` отследите, лог приложения (не менее 2х минут) и пришлите:
1. Скриншот, либо содержимое файла `app.service`
1. Ответы на впоросы:
1. Ответы на вопросы:
1. На каком IP и порту запускается сервис
1. Кто (IP и порт) шлёт запросы на этот сервис и на какой путь
1. Какие ответы (формат) получает клиент из п.ii получает в ответ на свои запросы
Expand Down
Loading