Nouvelles Regex : FFE_SENDFILE validée

This commit is contained in:
Maximilien LEDOUX 2022-03-19 13:56:23 +01:00
parent 99c682015a
commit 8718d9c4ea
2 changed files with 5 additions and 2 deletions

View File

@ -2,17 +2,20 @@ package lightcontainer.protocol.rules.writer;
import lightcontainer.domains.client.Context; import lightcontainer.domains.client.Context;
import lightcontainer.protocol.ProtocolWriter; import lightcontainer.protocol.ProtocolWriter;
import lightcontainer.protocol.StandardizedDefinitions;
import lightcontainer.utils.FileSender; import lightcontainer.utils.FileSender;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import static lightcontainer.protocol.StandardizedDefinitions.FFE_SENDFILE;
/** /**
* Règle envoyée au SBE, demandant la sauvegarde d'un fichier. * Règle envoyée au SBE, demandant la sauvegarde d'un fichier.
*/ */
public class SendfileRule extends ProtocolWriter { public class SendfileRule extends ProtocolWriter {
//"^SENDFILE [A-Za-z0-9]{50,200} [0-9]{1,10} [A-Za-z0-9]{50,200}\r\n$" //"^SENDFILE [A-Za-z0-9]{50,200} [0-9]{1,10} [A-Za-z0-9]{50,200}\r\n$"
private static final String PATTERN = "^SENDFILE [A-Za-z0-9]{50,200} [0-9]{1,10} [A-Za-z0-9]{50,200}\\r\\n$"; private static final String PATTERN = FFE_SENDFILE;
public static final String NAME = "SENDFILE"; public static final String NAME = "SENDFILE";

View File

@ -1 +1 @@
{"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$Up/pME2iFKALVSu8/JDpG.8Vc2vidOm99SeVoayCB1th7KHMZ1gq2","aes_key":"4+D3geivckhduP14646nYBb91N71HJj+8uvHFb0su0o=","files":[{"name":"test.txt","fileNameSalt":"QTWuH0rNYf0+8ondzDlFeA==","size":301,"iv":"r+Lw9Qpo5Ca7cO45MytKwA==","storage":["lightcontainerSB01"]},{"name":"regex.txt","fileNameSalt":"hPTgHiTySuUiJE0I4QD1Gw==","size":1320,"iv":"Uw7pAMKAEJRL/vn2NJ//wA==","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$Up/pME2iFKALVSu8/JDpG.8Vc2vidOm99SeVoayCB1th7KHMZ1gq2","aes_key":"4+D3geivckhduP14646nYBb91N71HJj+8uvHFb0su0o=","files":[{"name":"test.txt","fileNameSalt":"JNJhoZl+MEBAZ+YSvpaCAg==","size":301,"iv":"eHHLWbm3Wry49SIkgofVTg==","storage":["lightcontainerSB01"]}]}]}