nfqws: support +offset@filename fake/pattern loading

This commit is contained in:
bol-van
2025-09-24 16:08:25 +03:00
parent ce367b1a91
commit 784058cf66
5 changed files with 178 additions and 145 deletions

View File

@@ -241,11 +241,11 @@ bool dp_fake_defaults(struct desync_profile *dp)
{
struct blob_item *item;
if (blob_collection_empty(&dp->fake_http))
if (!blob_collection_add_blob(&dp->fake_http,fake_http_request_default,strlen(fake_http_request_default),0))
if (!blob_collection_add_blob(&dp->fake_http,fake_http_request_default,strlen(fake_http_request_default),0,0))
return false;
if (blob_collection_empty(&dp->fake_tls))
{
if (!(item=blob_collection_add_blob(&dp->fake_tls,fake_tls_clienthello_default,sizeof(fake_tls_clienthello_default),4+sizeof(((struct fake_tls_mod*)0)->sni))))
if (!(item=blob_collection_add_blob(&dp->fake_tls,fake_tls_clienthello_default,sizeof(fake_tls_clienthello_default),4+sizeof(((struct fake_tls_mod*)0)->sni),0)))
return false;
if (!(item->extra2 = malloc(sizeof(struct fake_tls_mod))))
return false;
@@ -253,13 +253,13 @@ bool dp_fake_defaults(struct desync_profile *dp)
}
if (blob_collection_empty(&dp->fake_unknown))
{
if (!(item=blob_collection_add_blob(&dp->fake_unknown,NULL,256,0)))
if (!(item=blob_collection_add_blob(&dp->fake_unknown,NULL,256,0,0)))
return false;
memset(item->data,0,item->size);
}
if (blob_collection_empty(&dp->fake_quic))
{
if (!(item=blob_collection_add_blob(&dp->fake_quic,NULL,620,0)))
if (!(item=blob_collection_add_blob(&dp->fake_quic,NULL,620,0,0)))
return false;
memset(item->data,0,item->size);
item->data[0] = 0x40;
@@ -269,7 +269,7 @@ bool dp_fake_defaults(struct desync_profile *dp)
{
if (blob_collection_empty(*fake))
{
if (!(item=blob_collection_add_blob(*fake,NULL,64,0)))
if (!(item=blob_collection_add_blob(*fake,NULL,64,0,0)))
return false;
memset(item->data,0,item->size);
}