Example #1
0
        /// <summary>
        /// Initializes the bot by creating a new WindowHandler and adding it as a tab to the ClientWindow
        /// </summary>
        /// <param name="cw">A reference to the ClientWindow</param>
        public void initializeBot(ClientWindow cw)
        {
            bot = new WindowHandler(cw);
            bot.bringToFront();
            bot.setTopLevel(false);
            bot.setVisible(true);

            bot.setFormBorderStyle(FormBorderStyle.None);
            bot.setDockStyle(DockStyle.Fill);

            cw.tabControl1.TabPages[0].Controls.Add(bot);
            cw.tabControl1.TabPages[0].Text = "Bot";


            /*
             * backgroundScripts = new List<Scriptable>();
             * Script.Scripts.InterfaceCloser icloser = new Script.Scripts.InterfaceCloser();
             * icloser.initializeInputs(bot);
             * backgroundScripts.Add(icloser);
             */

            this.cw = cw;
            //DEBUGGING STUFF
            //com = new Communicator("\\\\.\\pipe\\TestChannel");
            menuHandler = new MenuHandler(bot.MOUSE, bot.PMOUSE, bot.COMMUNICATOR, bot.KEYBOARD);
            over        = new OverviewHandler(bot.MENU, bot.MOUSE, bot.PMOUSE, bot.COMMUNICATOR);
        }
Example #2
0
 public Ship(WindowHandler wh)
 {
     overviewhandler = wh.OVERVIEW;
     com             = wh.COMMUNICATOR;
     menu            = wh.MENU;
     pm = wh.PMOUSE;
     m  = wh.MOUSE;
     kb = wh.KEYBOARD;
 }
Example #3
0
 public Ship(WindowHandler wh)
 {
     overviewhandler = wh.OVERVIEW;
     com = wh.COMMUNICATOR;
     menu = wh.MENU;
     pm = wh.PMOUSE;
     m = wh.MOUSE;
     kb = wh.KEYBOARD;
 }
Example #4
0
 /// <summary>
 /// Internal use, the Bot will initialize the script with its input handlers once its loaded into memory
 /// </summary>
 /// <param name="bot">The reference to the bot's windowhandler</param>
 public void initializeInputs(WindowHandler bot)
 {
     this.EMouse             = bot.MOUSE;
     this.EPreciseMouse      = bot.PMOUSE;
     this.EMenuHandler       = bot.MENU;
     this.ECommunicator      = bot.COMMUNICATOR;
     this.EOverViewHandler   = bot.OVERVIEW;
     this.EStationHandler    = bot.STATION;
     this.MyShip             = bot.SHIP;
     this.ESession           = bot.SESSION;
     this.ECamera            = bot.CAMERA;
     this.EKeyboard          = bot.KEYBOARD;
     this.ELocalHandler      = bot.LOCAL;
     this.EDrawingArea       = bot.DrawingArea;
     this.ELogger            = bot.LOGGER;
     this.ELogger.ScriptName = name;
     this.EAgentHandler      = bot.AGENT;
     ERandom = new Random();
 }
Example #5
0
        /// <summary>
        /// Initializes the bot by creating a new WindowHandler and adding it as a tab to the ClientWindow
        /// </summary>
        /// <param name="cw">A reference to the ClientWindow</param>
        public void initializeBot(ClientWindow cw)
        {
            bot = new WindowHandler(cw);
            bot.bringToFront();
            bot.setTopLevel(false);
            bot.setVisible(true);

            bot.setFormBorderStyle(FormBorderStyle.None);
            bot.setDockStyle(DockStyle.Fill);

            cw.tabControl1.TabPages[0].Controls.Add(bot);
            cw.tabControl1.TabPages[0].Text = "Bot";

            /*
            backgroundScripts = new List<Scriptable>();
            Script.Scripts.InterfaceCloser icloser = new Script.Scripts.InterfaceCloser();
            icloser.initializeInputs(bot);
            backgroundScripts.Add(icloser);
            */

            this.cw = cw;
            //DEBUGGING STUFF
            //com = new Communicator("\\\\.\\pipe\\TestChannel");
            menuHandler = new MenuHandler(bot.MOUSE, bot.PMOUSE, bot.COMMUNICATOR, bot.KEYBOARD);
            over = new OverviewHandler(bot.MENU, bot.MOUSE, bot.PMOUSE, bot.COMMUNICATOR);
        }
Example #6
0
 /// <summary>
 /// Internal use, the Bot will initialize the script with its input handlers once its loaded into memory
 /// </summary>
 /// <param name="bot">The reference to the bot's windowhandler</param>
 public void initializeInputs(WindowHandler bot)
 {
     this.EMouse = bot.MOUSE;
     this.EPreciseMouse = bot.PMOUSE;
     this.EMenuHandler = bot.MENU;
     this.ECommunicator = bot.COMMUNICATOR;
     this.EOverViewHandler = bot.OVERVIEW;
     this.EStationHandler = bot.STATION;
     this.MyShip = bot.SHIP;
     this.ESession = bot.SESSION;
     this.ECamera = bot.CAMERA;
     this.EKeyboard = bot.KEYBOARD;
     this.ELocalHandler = bot.LOCAL;
     this.EDrawingArea = bot.DrawingArea;
     this.ELogger = bot.LOGGER;
     this.ELogger.ScriptName = name;
     this.EAgentHandler = bot.AGENT;
     ERandom = new Random();
 }
Example #7
0
        /// <summary>
        /// Put Black.dll in the EVE process' memory
        /// </summary>
        private void inject()
        {
            if (injector != null && loaded)
            {
                try
                {
                    injector.Inject(dll, processName);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.ToString());
                    Console.WriteLine("failed to inject");
                }


                try
                {
                    if (injector.getSyringe() != null)
                    {
                        //Thread.Sleep(15000);
                        pipename = RandomString(9);
                        pipename = "\\\\.\\pipe\\" + pipename;
                        Console.WriteLine("creating pipe " + pipename);
                        com             = new Communicator(pipename);
                        menuhandler     = new MenuHandler(this);
                        overviewhandler = new OverviewHandler(this);
                        station         = new Station(this);
                        myShip          = new Ship(this);
                        eveSession      = new Session(this);
                        cam             = new Camera(this);
                        local           = new LocalHandler(this);
                        aHandler        = new AgentHandler(this);
                        mes             = new MessageStruct()
                        {
                            Text = pipename
                        };

                        backgroundScripts = new List <Scriptable>();


                        Script.Scripts.AutoLoger autoLogger = new Script.Scripts.AutoLoger();
                        autoLogger.onStart();
                        autoLogger.initializeInputs(this);
                        backgroundScripts.Add(autoLogger);


                        Script.Scripts.InterfaceCloser icloser = new Script.Scripts.InterfaceCloser();
                        icloser.initializeInputs(this);
                        icloser.onStart();
                        backgroundScripts.Add(icloser);



                        //injector.getSyringe().CallExport(dll, "startServer");

                        injector.getSyringe().CallExport(dll, "dropServer", mes);

                        //drawingScreen.Invalidate();
                        //this.Invalidate();
                        //cw.Invalidate();
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.ToString());
                    Console.WriteLine("Couldn't drop server");
                }
            }
        }