Esempio n. 1
0
        private void btnConnect_Click(object sender, EventArgs e)
        {
            if ((ccapi.Connect(this.BoxIP.Text) == CCAPI.OK))
            {
                ccapi.VshNotify(CCAPI.NotifyIcon.Trophy2, "Connected CCCheaterX by Xex (Thanks Barthen)");
                ccapi.RingBuzzer(CCAPI.BuzzerType.Triple);
                this.EnableBoxes(true);
                int firmware = 0, version = 0;
                CCAPI.ConsoleType cType = CCAPI.ConsoleType.UNK;
                int cell = 0, rsx = 0;
                int ret = ccapi.GetFirmwareInfo(ref firmware, ref version, ref cType) |
                          ccapi.GetTemperature(ref cell, ref rsx);

                if (ret != CCAPI.OK)
                {
                    Console.WriteLine("An error occured while retrieving console details.");
                }
                else
                {
                    label3.Text = ("CCAPI Version: " + version);
                    label4.Text = ("CCAPI Library version: " + ccapi.GetDllVersion());
                    label2.Text = ("Firmware: " + CCAPI.FirmwareToString(firmware));
                    label5.Text = ("Console Type: " + CCAPI.ConsoleTypeToString(cType));
                    label6.Text = ("CELL Temp: " + cell);
                    label7.Text = ("RSX Temp: " + rsx);
                }

                if (Form1.ccapi.AttachGameProcess())
                {
                    this.currentGame = true;
                    int num = (int)MessageBox.Show("Successfully connected to game!");
                }
                else
                {
                    int num1 = (int)MessageBox.Show("Are you in a game?", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                }
            }
            else
            {
                this.EnableBoxes(false);
                int num = (int)MessageBox.Show("Can't connect!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (!ccapi.GetLibraryState())
            {
                Console.WriteLine("CCAPI Library couldn't be loaded.");
                Console.WriteLine("Check that you are using the correct CCAPI.dll.");
            }
            else
            {
                List <CCAPI.ConsoleInfo> cInfo = ccapi.GetConsoleList();

                for (int c = 0; c < cInfo.Count; ++c)
                {
                    Console.WriteLine("Console:{0} Ip:{1}", cInfo[c].name, cInfo[c].ip);
                }

                if (ccapi.Connect("192.168.1.91") != CCAPI.OK) //_PS3_IP_HERE_
                {
                    Console.WriteLine("Couldn't establish a connection with your PS3.");
                    Console.WriteLine("Verify your ps3 ip.");
                }
                else
                {
                    Console.WriteLine("Connected to your PS3.");
                    ccapi.VshNotify(CCAPI.NotifyIcon.Trophy2, "Connected to CCAPI");
                    ccapi.RingBuzzer(CCAPI.BuzzerType.Triple);

                    int firmware = 0, version = 0;
                    CCAPI.ConsoleType cType = CCAPI.ConsoleType.UNK;
                    int cell = 0, rsx = 0;
                    int ret = ccapi.GetFirmwareInfo(ref firmware, ref version, ref cType) |
                              ccapi.GetTemperature(ref cell, ref rsx);

                    if (ret != CCAPI.OK)
                    {
                        Console.WriteLine("An error occured while retrieving console details.");
                    }
                    else
                    {
                        Console.WriteLine("CCAPI Version: {0}", version);
                        Console.WriteLine("CCAPI Library version: {0}", ccapi.GetDllVersion());
                        Console.WriteLine("Firmware: {0}", CCAPI.FirmwareToString(firmware));
                        Console.WriteLine("Console Type: {0}", CCAPI.ConsoleTypeToString(cType));
                        Console.WriteLine("CELL Temp: {0}", cell);
                        Console.WriteLine("RSX Temp: {0}", rsx);


                        if (!ccapi.AttachGameProcess())
                        {
                            Console.WriteLine("Couldn't find a game process.");
                        }
                        else
                        {
                            Console.WriteLine("Process {0:X} attached with success.", ccapi.GetAttachedProcess());

                            byte i = ccapi.ReadMemoryU8(0x50000);
                            Console.WriteLine("Read at 0x50000: {0:X}", i);


                            //  ccapi.SetConsoleIds(CCAPI.ConsoleIdType.Idps,"0123456789ABCDEF0123456789ABCDEF");
                            //  ccapi.WriteMemoryString(0x,"Hello");
                            //  Console.WriteLine("{0}",ccapi.ReadMemoryString(0x));
                            //  ccapi.WriteMemoryI32(0x, 1000);
                        }
                    }
                }
            }
            ccapi.Disconnect();
        }