Advertisement
Guest User

Untitled

a guest
May 26th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.03 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace ObjectScanner
  6. {
  7.     class Program
  8.     {
  9.         static Bot myBot;
  10.  
  11.         static void Main(string[] args)
  12.         {
  13.             if (args.Length < 3)
  14.             {
  15.                 Console.WriteLine("Usage: bot.exe <first> <last> <pass>");
  16.                 return;
  17.             }
  18.  
  19.             //create instance of the Bot class named myBot
  20.             myBot = new Bot(args[0], args[1], args[2]);
  21.  
  22.             //handle ctrl+c event
  23.             Console.CancelKeyPress += new ConsoleCancelEventHandler(Console_CancelKeyPress);
  24.            
  25.             //keep processing commands until ctrl+c is pressed
  26.             string read = Console.ReadLine();
  27.             while (read != null)
  28.             {
  29.                 myBot.ParseCommand(read);
  30.                 read = Console.ReadLine();
  31.             }
  32.         }
  33.  
  34.         static void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e)
  35.         {
  36.             myBot.Logout();
  37.         }
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement