Ejemplo n.º 1
0
        static int Main(string[] args)
        {
            if(args.Length < 2){
                Console.WriteLine("You should provide:\n\t1) The database connection string\n\t2) The location of your Tor executable");
                Environment.Exit(1);
            }
            string dbstring = args[0];
            string torloc = args[1];
            System.Console.WriteLine(string.Format("DBSTRING: {0} | TORLOC: {1}", dbstring, torloc));
            DB db = new DB(dbstring);

            W***e w***e = new W***e(db, torloc);
            //  Dns.readRootHints();

            #region StaticTasks
            // Assign some tasks
            //            w***e.queue(new WhoisTask("example.com"));
            //            w***e.queue(new DnsTask(new DnsTransaction.QuestionRecord("example.com", DnsTransaction.QTYPE.A, DnsTransaction.RCLASS.IN)));
            //            w***e.queue(new DnsTask(new DnsTransaction.QuestionRecord("gungo.com", DnsTransaction.QTYPE.A, DnsTransaction.RCLASS.IN)));
            #endregion

            Thread requesthandler = new Thread(new ThreadStart(w***e.clientListener));
            requesthandler.IsBackground = true;
            requesthandler.Start();

            // Main loop
            while (true)
            {
                w***e.doWork();
            }
        }
Ejemplo n.º 2
0
        static int Main(string[] args)
        {
            if (args.Length < 2)
            {
                Console.WriteLine("You should provide:\n\t1) The database connection string\n\t2) The location of your Tor executable");
                Environment.Exit(1);
            }
            string dbstring = args[0];
            string torloc   = args[1];

            System.Console.WriteLine(string.Format("DBSTRING: {0} | TORLOC: {1}", dbstring, torloc));
            DB db = new DB(dbstring);

            W***e w***e = new W***e(db, torloc);

            //  Dns.readRootHints();

            #region StaticTasks
            // Assign some tasks
            //            w***e.queue(new WhoisTask("example.com"));
            //            w***e.queue(new DnsTask(new DnsTransaction.QuestionRecord("example.com", DnsTransaction.QTYPE.A, DnsTransaction.RCLASS.IN)));
            //            w***e.queue(new DnsTask(new DnsTransaction.QuestionRecord("gungo.com", DnsTransaction.QTYPE.A, DnsTransaction.RCLASS.IN)));
            #endregion

            Thread requesthandler = new Thread(new ThreadStart(w***e.clientListener));
            requesthandler.IsBackground = true;
            requesthandler.Start();

            // Main loop
            while (true)
            {
                w***e.doWork();
            }
        }
Ejemplo n.º 3
0
 //<summary> Handles a client's requests, adding their tasks to the task
 //queue. Currently does not return results, need to modify callback operation
 //for that to work. </summary>
 public ClientInterface(W***e _creator)
 {
     creator = _creator;
 }
Ejemplo n.º 4
0
 //<summary> Handles a client's requests, adding their tasks to the task
 //queue. Currently does not return results, need to modify callback operation
 //for that to work. </summary>
 public ClientInterface(W***e _creator)
 {
     creator = _creator;
 }
Ejemplo n.º 5
0
 //<summary> Handles a client's requests, adding their tasks to the task
 //queue. Currently does not return results, need to modify callback operation
 //for that to work. </summary>
 public ClientInterface(W***e _creator)
 {
     creator = _creator;
     taskcount = 0;
 }