Nouvelles Regex : CLIENT_GET_FILE validée

This commit is contained in:
Maximilien LEDOUX 2022-03-19 12:48:00 +01:00
parent d17cd59af8
commit fdcccc1788
2 changed files with 31 additions and 2 deletions

View File

@ -3,15 +3,19 @@ package lightcontainer.protocol.rules.reader;
import lightcontainer.domains.client.Context;
import lightcontainer.interfaces.ProtocolRepository;
import lightcontainer.protocol.ProtocolReader;
import lightcontainer.protocol.StandardizedDefinitions;
import lightcontainer.protocol.rules.writer.GetFileErrorRule;
import lightcontainer.protocol.rules.writer.RetrieveFileRule;
import lightcontainer.storage.ReadOnlyFile;
import java.util.Iterator;
import static lightcontainer.protocol.StandardizedDefinitions.CLIENT_GET_FILE;
public class GetFileRule extends ProtocolReader {
// Constants
private static final String PATTERN = "^GETFILE ([^ !]{1,20})\r\n$";
//"^GETFILE ([^ !]{1,20})\r\n$"
private static final String PATTERN = CLIENT_GET_FILE;
private static final String NAME = "GETFILE";
// -- arguments
private static final int FILE_NAME = 0; // Index file name.

View File

@ -1 +1,26 @@
{"unicast_port":8000,"multicast_ip":"224.66.66.1","multicast_port":15502,"network_interface":"lo","tls":true,"storagePath":"C:\\Users\\ledou\\Documents\\ffe","users":[{"name":"aaaaa","password":"$2a$10$Tuh5xmGEy0g26hQO1SHNY.TNy8rY9VCkpzRLP3rlpnVHtwYew4.km","aes_key":"a68CqbWmmf0cuvgvMhm9OC+Y24ut3DY/0WBqtd3nGfU=","files":[{"name":"test.txt","fileNameSalt":"3yLVBqM/zf8CcCFPqdh15Q==","size":301,"iv":"WfokhcAIefnnZnk3sYLjiA==","storage":["lightcontainerSB01"]}]}]}
{
"unicast_port": 8000,
"multicast_ip": "224.66.66.1",
"multicast_port": 15502,
"network_interface": "lo",
"tls": true,
"storagePath": "C:\\Users\\ledou\\Documents\\ffe",
"users": [
{
"name": "aaaaa",
"password": "$2a$10$Tuh5xmGEy0g26hQO1SHNY.TNy8rY9VCkpzRLP3rlpnVHtwYew4.km",
"aes_key": "a68CqbWmmf0cuvgvMhm9OC+Y24ut3DY/0WBqtd3nGfU=",
"files": [
{
"name": "test.txt",
"fileNameSalt": "3yLVBqM/zf8CcCFPqdh15Q==",
"size": 301,
"iv": "WfokhcAIefnnZnk3sYLjiA==",
"storage": [
"lightcontainerSB01"
]
}
]
}
]
}