This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<nav class="navbar navbar-default" role="navigation"> | |
<div class="container"> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
</button> | |
<a class="navbar-brand" href="{{ root_url }}/">{{ site.title }}</a> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smtplib | |
import sys | |
from email.mime.text import MIMEText | |
def mail(motion,smoke): | |
me = '[email protected]' | |
you = ['[email protected]', '[email protected]','[email protected]'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
def internet_on(): | |
try: | |
response=urllib2.urlopen('http://74.125.228.100',timeout=1) | |
return True | |
except urllib2.URLError as err: pass | |
return False | |
print internet_on() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect | |
spawn mount.davfs https://webdav.yandex.ru/RPI /home/sarkisn/webdav/yandex | |
expect "Username:" | |
send "[email protected]\r" | |
expect "Password:" | |
send "PASSWORD\r" | |
expect eof | |
#sudo apt-get install expect |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Нанян Саркис АК5-81 | |
# Вариант 11, 5 субъектов 3 объекта | |
# Функция вывода списка файлов с правами | |
def sprint(sb,objects,ss=-1): | |
print "\nСписок файлов для пользователя %s: " % subjects[sb] | |
si = 0 | |
while si<3: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Нанян Саркис АК5-81 | |
# Вариант 11, 5 субъектов 3 объекта | |
import random | |
# print random.randint(0,7) | |
# Функция вывода списка файлов с правами | |
def sprint(sb,ss=-1): | |
print '------------------------------------------------------------------------------------' | |
print "\nСписок файлов для пользователя %s: " % subjects[sb] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Нанян Саркис АК5-81 | |
# Вариант 11, 5 субъектов 3 объекта | |
import random | |
# Массив пользователей системы | |
subjects = {'Michael':0, 'Gabriel':0, 'Raphael':0, 'Uriel':0,'Salaphiel':0} | |
# Массив объектов системы | |
objects = {'file1.doc':0, 'report.doc':0, 'config.txt':0} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Нанян Саркис АК5-81 | |
# ДЗ1 Защита информации. Расчет рисков | |
print "Расчет рисков\n" | |
"""k = False | |
while not k: | |
# r - режим работы, 1 или 3 угрозы | |
r = input("Введите 1 для режима с одной базовой угрозой и 3 для режима с тремя угрозами: ") | |
if r == 1 or r == 3: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Нанян Саркис АК5-81 | |
# Лабораторная работа № 4. Защита информации | |
km = false | |
def kword(sz) | |
kk = false | |
while !kk | |
keyword = gets | |
keyword.chomp! | |
if keyword.length == sz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alpha = ('a'..'z').to_a | |
#num = (0..25).to_a | |
print alpha | |
puts | |
puts "Шифр Цезаря" | |
print "Введите исходный текст: " | |
text = gets | |
text.gsub!(/\s+/, '') | |
print "Введите ключ: " | |
key = gets.to_i |