Exemplo n.º 1
0
        public void Consoles()
        {
            PS3API PS3 = new PS3API(SelectAPI.ControlConsole);
            Dictionary <IPAddress, PhysicalAddress> all = GetAllDevicesOnLAN();
            IPList ip = new IPList();

            foreach (KeyValuePair <IPAddress, PhysicalAddress> kvp in all)
            {
                Thread.Sleep(100);
                string infos          = "IP: " + kvp.Key + Environment.NewLine + "Mac: " + kvp.Value;
                string fullmacaddress = Convert.ToString(kvp.Value);
                fullmacaddress = fullmacaddress.Substring(0, 6);
                //    if (PS3OUIs.Contains(fullmacaddress))
                //     {
                // IPList ip = new IPList();
                MACIP = kvp.Key.ToString();
                //  ip.ipmac = ip.ipmac + kvp.Key + ", " + kvp.Value;
                List <String> iplist = new List <String>();
                iplist.Add(kvp.Key.ToString() + " - " + kvp.Value.ToString());
                foreach (string ips in iplist)
                {
                    ip.ipmac = new string[] { ips };
                }
            }
            ip.Show();
        }
Exemplo n.º 2
0
        public void CCAPIConnect()
        {
            PS3API PS3 = new PS3API(SelectAPI.ControlConsole);
            Dictionary <IPAddress, PhysicalAddress> all = GetAllDevicesOnLAN();

            foreach (KeyValuePair <IPAddress, PhysicalAddress> kvp in all)
            {
                Thread.Sleep(100);
                //"IP : {0}\n MAC {1}" +
                string infos = "IP: " + kvp.Key + Environment.NewLine + "Mac: " + kvp.Value;
                //  MessageBox.Show(infos);
                //   consoleandmacs = new [] { infos };
                //http://pastebin.com/yKLTzdW8
                // MessageBox.Show(infos);
                string fullmacaddress = Convert.ToString(kvp.Value);
                fullmacaddress = fullmacaddress.Substring(0, 6);

/*
 *              if (fullmacaddress.Length >= 6)
 *              {
 *                  fullmacaddress = fullmacaddress.Substring(0, 6);
 *              }
 *              else
 *              {
 *                  try
 *                  {
 *                      fullmacaddress = fullmacaddress.Substring(0, 3);
 *                  }
 *                  catch
 *                  {
 *                      MessageBox.Show("Error getting Macaddresses on the Network!");
 *                      MessageBox.Show(fullmacaddress);
 *                  }
 *              }*/
                if (PS3OUIs.Contains(fullmacaddress))
                {
                    MACIP = kvp.Key.ToString();

                    if (PS3.ConnectTarget(MACIP))
                    {
                        CCAPIConnection = true;
                        PS3.CCAPI.RingBuzzer(CCAPI.BuzzerMode.Double);
                        //   PS3.CCAPI.BaSs_HaXoRwazHere();
                        this.MACIP = kvp.Key.ToString();
                        return;
                    }
                    else
                    {
                        CCAPIConnection = false;
                        //MessageBox.Show("Failed to connect to Console!");
                        // PS3.ConnectTarget("192.168.137.201");
                        //PS3.CCAPI.Notify(CCAPI.NotifyIcon.WRONGWAY, "Failed!");
                    }
                }
                else
                {
                    //   MessageBox.Show("No PS3 Consoles found on your Network!");
                }
            }
        }
Exemplo n.º 3
0
        //
        public string[] searchNetwork()
        {
            PS3API PS3 = new PS3API(SelectAPI.ControlConsole);
            Dictionary <IPAddress, PhysicalAddress> all = GetAllDevicesOnLAN();

            foreach (KeyValuePair <IPAddress, PhysicalAddress> kvp in all)
            {
                string Consoles = "";//clear console
                string infos    = "IP: " + kvp.Key + Environment.NewLine + "Mac: " + kvp.Value;
                //http://pastebin.com/yKLTzdW8
                string fullmacaddress = Convert.ToString(kvp.Value);
                fullmacaddress = fullmacaddress.Substring(0, 6);
                MessageBox.Show("IPaddress: " + kvp.Key + Environment.NewLine + "MAC: " + kvp.Value);
                if (PS3OUIs.Contains(fullmacaddress))
                {
                    string[] consoleandmacs = null;
                    string   ip             = Convert.ToString(kvp.Key);
                    string   mac            = Convert.ToString(kvp.Value);
                    Consoles       = Consoles + ip + Environment.NewLine + mac + " ";
                    consoleandmacs = new[] { Consoles };
                    MessageBox.Show("" + kvp.Key);
                }
            }
            return(new string[0]);
        }
Exemplo n.º 4
0
 public ConsoleList(PS3API f)
 {
     Api  = f;
     data = Api.CCAPI.GetConsoleList();
 }
 // Token: 0x06000CE1 RID: 3297 RVA: 0x000406EC File Offset: 0x0003E8EC
 public ConsoleList(PS3API f)
 {
     this.Api  = f;
     this.data = this.Api.CCAPI.GetConsoleList();
 }