mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-11 17:29:16 +05:00
nfqws: prohibit extra modes in --dpi-desync
This commit is contained in:
parent
83f18fbe63
commit
86241cb56c
@ -712,9 +712,12 @@ int main(int argc, char **argv)
|
||||
{
|
||||
mode = mode2;
|
||||
mode2 = mode3;
|
||||
mode3 = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
params.desync_mode0 = DESYNC_NONE;
|
||||
}
|
||||
params.desync_mode = desync_mode_from_string(mode);
|
||||
params.desync_mode2 = desync_mode_from_string(mode2);
|
||||
if (params.desync_mode0==DESYNC_INVALID || params.desync_mode==DESYNC_INVALID || params.desync_mode2==DESYNC_INVALID)
|
||||
@ -722,6 +725,11 @@ int main(int argc, char **argv)
|
||||
fprintf(stderr, "invalid dpi-desync mode\n");
|
||||
exit_clean(1);
|
||||
}
|
||||
if (mode3)
|
||||
{
|
||||
fprintf(stderr, "invalid desync combo : %s+%s+%s\n",mode,mode2,mode3);
|
||||
exit_clean(1);
|
||||
}
|
||||
if (params.desync_mode2 && !(desync_valid_first_stage(params.desync_mode) && desync_valid_second_stage(params.desync_mode2)))
|
||||
{
|
||||
fprintf(stderr, "invalid desync combo : %s+%s\n", mode,mode2);
|
||||
|
Loading…
Reference in New Issue
Block a user