Why does this script BSOD-ize windows ?

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jul 21 03:41:53 PDT 2015


try this:

import std.process, std.stdio;
import core.thread;
import std.random;

void main(string[] args)
{
     string on = "netsh interface set interface \"Connexion au 
réseau local\" Enable";
     string off = "netsh interface set interface \"Connexion au 
réseau local\" Disable";

     while(true)
     {
         executeShell(on);
         const t=uniform(2000, 5000);
         writeln("timeout: ",t);
         readln();
         Thread.sleep(dur!("msecs")(t));
         executeShell(off);
         Thread.sleep(dur!("msecs")(2000));
     }
}


More information about the Digitalmars-d-learn mailing list