Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > League of Legends > League of Legends Hacks, Bots, Cheats & Exploits
You last visited: Today at 04:17

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Riot IngameAPI - Random Port Fix (Quick & Dirty)

Discussion on Riot IngameAPI - Random Port Fix (Quick & Dirty) within the League of Legends Hacks, Bots, Cheats & Exploits forum part of the League of Legends category.

Reply
 
Old   #1
 
Interløgy's Avatar
 
elite*gold: 729
Join Date: Aug 2016
Posts: 321
Received Thanks: 181
Riot IngameAPI - Random Port Fix (Quick & Dirty)

Hey,

As you have probably noticed, the ports for the League Ingame Api are random (before always 2999).
This was probably not intended by Riot. When a patch will be released is still written in the stars.


The code is not written properly, but it works.
It is not a beauty contest. It's just a workaround until the next patch.
To get the port for the ingame API you can use the following code:

Code:
private String GetPort()
        {
            var processes = Process.GetProcessesByName("League of Legends");

            using (var ns = new Process())
            {
                ProcessStartInfo psi = new ProcessStartInfo("netstat.exe", "-ano");
                psi.RedirectStandardOutput = true;
                psi.UseShellExecute = false;
                ns.StartInfo = psi;
                ns.Start();

                using (StreamReader r = ns.StandardOutput)
                {
                    string output = r.ReadToEnd();
                    ns.WaitForExit();

                    string[] lines = output.Split(new string[] { Environment.NewLine }, StringSplitOptions.None);

                    foreach (string line in lines)
                    {
                        if (line.Contains(processes[0].Id.ToString()) && line.Contains("0.0.0.0:0"))
                        {
                            var outp = line.Split(' ');
                            return outp[6].Replace("127.0.0.1:", "");
                        }
                    }
                }
            }
            return String.Empty;
        }
Interløgy is offline  
Thanks
2 Users
Old 09/04/2020, 12:58   #2
 
LeagueAddons's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 254
Received Thanks: 96
Great job!
Thank you for this <3
LeagueAddons is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
DC Random 8 -> 100 Gems + Random 3M --> 18 M Food + Random 3M --> 18M Gold
01/24/2015 - Dragon City - 25 Replies
DC Random 8 -> 100 Gems + Random 3M --> 18 M Food + Random 3M --> 18M Gold Dragon City Gem + Gold + Food +Exp
Java Color.rgb(random,random,random)
05/19/2014 - Java - 4 Replies
Guten Abend liebe Community, ich habe ein Anliegen. Wie ist es möglich bei der Methode : setTextColor(Color.rgb(0,0,0)); anstatt (0,0,0) 3 random Integer zu verwenden wenn ja wie? Ich habe es mal so probiert: final Random r = new Random();
[04.09.13] GigaByte v2.6 [FIX, FIX, FIX, FIX AND FIX]
09/11/2013 - WarRock Hacks, Bots, Cheats & Exploits - 79 Replies
http://www.elitepvpers.com/forum/warrock-hacks-bot s-cheats-exploits/2843300-11-09-gigabyte-public-v2 -7-a.html
[Dirty-Network.com] Dirty Minecraft Server [64Slots][24/7][NoLag][Live-Map][TS3]
08/29/2011 - Minecraft Server Advertising - 0 Replies
http://dirty-network.com/dn-logo-kl.pnghttp://dirt y-network.com/dn-logo-kl.pnghttp://dirty-network.c om/dn-logo-kl.pnghttp://dirty-network.com/dn-logo- kl.png Guten Tag Epvp-Community Ich möchte euch mal den Dirty Minecraft Server vorstellen, was vor einer Woche released worden ist und das von Dirty-Network.com - ein Projekt welches mehrere Spiele uvm. anbieten wird, gehostet und geleitet wird. Derzeit spiele ich selber auf deren Server und finde das einfach klasse dort....



All times are GMT +1. The time now is 04:18.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.