v3.1
This commit is contained in:
BIN
Binary file not shown.
BIN
Binary file not shown.
+1
-1
@@ -1 +1 @@
|
|||||||
b=КxЉјврgi”ГT§мcQБ,|‚В{u«к
|
/ϋ �Ν=η9Ϋ�υuό�DζΧH€α�ΫΐΎ[
|
||||||
@@ -182,7 +182,7 @@ document.addEventListener('DOMContentLoaded', async function () {
|
|||||||
.then(() => console.log('Alert window opened'))
|
.then(() => console.log('Alert window opened'))
|
||||||
.catch(error => console.error('Error showing alert:', error)));
|
.catch(error => console.error('Error showing alert:', error)));
|
||||||
|
|
||||||
const button = document.getElementById('share_alert');
|
const button = document.getElementById('share_file_alert');
|
||||||
button.remove();
|
button.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"7c0ef9d5-23ed-47a6-bfb4-fdcfce436904": {
|
"7c0ef9d5-23ed-47a6-bfb4-fdcfce436904": {
|
||||||
"ip": "192.168.169.19",
|
"ip": "192.168.169.127",
|
||||||
"directoryStructure": "{\"backup_dir\":{\"files\":[],\"fisiere\":{\"files\":[\"New Microsoft Excel Worksheet.xlsx\",\"New Microsoft Word Document.docx\"]}}}",
|
"directoryStructure": "{\"backup_dir\":{\"files\":[],\"fisiere\":{\"files\":[\"New Microsoft Excel Worksheet.xlsx\",\"New Microsoft Word Document.docx\"]}}}",
|
||||||
"totalSize": 19363
|
"totalSize": 19363
|
||||||
},
|
},
|
||||||
"59c712d9-e6dd-438f-aec9-31ca2ae750e6": {
|
"59c712d9-e6dd-438f-aec9-31ca2ae750e6": {
|
||||||
"ip": "192.168.169.53",
|
"ip": "192.168.169.19",
|
||||||
"directoryStructure": "{\"backup_dir\":{\"files\":[],\"fisiere\":{\"files\":[\"New Microsoft Excel Worksheet.xlsx\",\"New Microsoft Word Document.docx\"]}}}",
|
"directoryStructure": "{\"backup_dir\":{\"files\":[],\"fisiere\":{\"files\":[\"New Microsoft Excel Worksheet.xlsx\",\"New Microsoft Word Document.docx\"]}}}",
|
||||||
"totalSize": 19363
|
"totalSize": 19363
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"7c0ef9d5-23ed-47a6-bfb4-fdcfce436904": {
|
||||||
|
"ip": "192.168.169.127",
|
||||||
|
"directoryStructure": "{\"backup_dir\":{\"files\":[],\"fisiere\":{\"files\":[\"New Microsoft Excel Worksheet.xlsx\",\"New Microsoft Word Document.docx\"]}}}",
|
||||||
|
"totalSize": 19363
|
||||||
|
},
|
||||||
|
"59c712d9-e6dd-438f-aec9-31ca2ae750e6": {
|
||||||
|
"ip": "192.168.169.19",
|
||||||
|
"directoryStructure": "{\"backup_dir\":{\"files\":[],\"fisiere\":{\"files\":[\"New Microsoft Excel Worksheet.xlsx\",\"New Microsoft Word Document.docx\"]}}}",
|
||||||
|
"totalSize": 19363
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"path": "/home/andrei/Desktop/proiect-licenta/dirs/user/backup_dir",
|
||||||
|
"structure": {
|
||||||
|
"backup_dir": {
|
||||||
|
"files": [],
|
||||||
|
"fisiere": {
|
||||||
|
"files": [
|
||||||
|
"New Microsoft Excel Worksheet.xlsx",
|
||||||
|
"New Microsoft Word Document.docx"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"size": 19363
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"path": "/home/andrei/Desktop/proiect-licenta/dirs/user/department_dir"
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"path": "/home/andrei/Desktop/proiect-licenta/dirs/user/share_dir"
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ż)ř‰;ĘŃŞÓĆ'Fw-`Źeµ±/öd©K
|
||||||
+3
-3
@@ -265,6 +265,7 @@ async function decryptDepartmentFilesToDirectory() {
|
|||||||
|
|
||||||
await lockFile(loginDataPath);
|
await lockFile(loginDataPath);
|
||||||
await lockFile(usersConfigPath);
|
await lockFile(usersConfigPath);
|
||||||
|
await lockFile(dirDepartmentPath);
|
||||||
|
|
||||||
await decryptFileInPlace(loginDataPath);
|
await decryptFileInPlace(loginDataPath);
|
||||||
await decryptFileInPlace(usersConfigPath);
|
await decryptFileInPlace(usersConfigPath);
|
||||||
@@ -286,8 +287,7 @@ async function decryptDepartmentFilesToDirectory() {
|
|||||||
|
|
||||||
await unlockFile(loginDataPath);
|
await unlockFile(loginDataPath);
|
||||||
await unlockFile(usersConfigPath);
|
await unlockFile(usersConfigPath);
|
||||||
|
await unlockFile(dirDepartmentPath);
|
||||||
await removeDirectory(destinationDir);
|
|
||||||
|
|
||||||
for (const userId of users) {
|
for (const userId of users) {
|
||||||
const userDir = path.join(sourceDir, userId);
|
const userDir = path.join(sourceDir, userId);
|
||||||
@@ -331,7 +331,7 @@ decryptAndGetServerIP(path.join(__dirname, '..', 'ipConfig.json')).then(ip => {
|
|||||||
serverIp = ip;
|
serverIp = ip;
|
||||||
});
|
});
|
||||||
|
|
||||||
const timeoutInterval = 7 * 60 * 1000 //minutes * seconds * miliseconds
|
const timeoutInterval = 1 * 10 * 1000 //minutes * seconds * miliseconds
|
||||||
|
|
||||||
setInterval(async () => {
|
setInterval(async () => {
|
||||||
await decryptDepartmentFilesToDirectory();
|
await decryptDepartmentFilesToDirectory();
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Ï5oÏí™âʾ´ˆÐ8ð´úcAš=6ZÍö·š¯±�ûøÄ—‚¼–Êhå£Ñ«E ëšýY¦Œ•ÛF�Y«áQ>tá݃xÔFFÙ�z™EoašE␍×CEŽƒèüzȽAé\$¬¨‰D¬ÿ*}>ŸŒ¬�}Kâ¡/ev(¯¤Ý¸E`øg.GܽÙl¶Ã§‰ž�`ÿÝ]SXwã¨ÛwˆðUûL
|
||||||
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user