Results 1 to 10 of 10
  1. #1
    ThatPurpleGuy's Avatar
    Join Date
    Jul 2014
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    17
    My Mood
    Sleepy

    Post Network String Grabber

    Just a lua file which will grab a bunch of network strings and ids.
    Just run it when you're on a server and will save to data/opennetfunctions inside of your garrysmod folder, with the string and id.
    inspiration for this

    Virus scans:
    https://www.virustotal.com/en/file/7...is/1498284840/
    https://r.virscan.org/report/2c9cfbf9...503c185e0fe3bd
    <b>Downloadable Files</b> Downloadable Files
    Last edited by ThatPurpleGuy; 06-24-2017 at 06:37 AM.

  2. The Following 15 Users Say Thank You to ThatPurpleGuy For This Useful Post:

    cipotegorgon (01-07-2020),FiRazone (05-05-2018),leek21 (06-28-2017),Maaate (06-25-2017),Midow12 (06-08-2018),miniLua (06-24-2017),noaccessl (04-11-2019),NSKASS (10-24-2023),Odifall32 (02-22-2019),raymondfather (03-29-2020),RecoilYT (02-12-2018),TenX (12-29-2017),TopKekSwag (08-12-2018),Verplix (08-10-2017),YOLOAXE (08-23-2018)

  3. #2
    T-800's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Location
    Romania
    Posts
    17,076
    Reputation
    1688
    Thanks
    84,839
    //Appproved.

    "Never stop being a good person because of bad people"


    Super User -> 15-7-2020
    Global Moderator -> 23-3-2019 - 15-7-2020
    Steam Moderator -> 12-12-2017 - 23-3-2019
    Steam Minion+ -> 09-04-2017 - 12-12-2017
    Steam Minion -> 03-01-2017 - 09-04-2017


  4. #3
    Cyaegha's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Posts
    536
    Reputation
    17
    Thanks
    526
    There are actually a few methods for doing this
    Code:
    local Messages = {}
    
    -- Method 1
    local i = 1
    local NetworkString = true
    
    while NetworkString do
    	NetworkString = util.NetworkIDToString(i)
    	Messages[NetworkString] = true
    	i = i + 1
    end
    
    -- Method 2
    for i = 1, math.huge do
    	local str = util.NetworkIDToString(i)
    	if not str then break end
    
    	Messages[str] = true
    end
    
    -- Method 3
    local i = 1
    local NetworkString = true
    
    repeat
    	NetworkString = util.NetworkIDToString(i)
    	Messages[NetworkString] = true
    	i = i + 1
    until not NetworkString
    Personally I'd use the second method but all three do the same thing.
    Also there's no need to use the server's IP in the created file's name, use GetHostName. It'll make it way easier to find if you join a shit ton of servers.
    Last edited by Cyaegha; 06-24-2017 at 06:09 PM.

  5. #4
    ThatPurpleGuy's Avatar
    Join Date
    Jul 2014
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    17
    My Mood
    Sleepy
    Quote Originally Posted by Cyaegha View Post
    There are actually a few methods for doing this
    snip
    Personally I'd use the second method but all three do the same thing.
    Also there's no need to use the server's IP in the created file's name, use GetHostName. It'll make it way easier to find if you join a shit ton of servers.
    GetHostName would always result in it not saving, so i didn't bother :/
    with you saving it into a table, what does Messages[str] = true mean?

  6. #5
    Cyaegha's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Posts
    536
    Reputation
    17
    Thanks
    526
    Quote Originally Posted by ThatPurpleGuy View Post
    GetHostName would always result in it not saving, so i didn't bother :/
    with you saving it into a table, what does Messages[str] = true mean?
    It just makes checking if the table has the message more efficiently than using table.HasValue. With that method I can just check if the key exists by doing
    Code:
    if Messages["message"] then
    instead of looping through the entire table to check for a value.

    This probably goes through it in more depth.

    - - - Updated - - -

    And to fix the GetHostName issue you could use string.gsub to replace non-alphanumeric characters.

  7. #6
    Razon91's Avatar
    Join Date
    Nov 2014
    Gender
    male
    Location
    star69
    Posts
    62
    Reputation
    10
    Thanks
    120
    dumb thread -rep it because i can

    everyone here is a stupid, half-intellegent thirdworlder . i am an american who is not afraid to express his forum rights. all you mongs struggle with easy lua syntax issues and simple algorithm problems. ha ha ha, dont make me laugh. just yesterday, i programmed my reverse engineered i7 cpu to communicate back-and-fourth with me in machine code. all you nerds on UC and MPGH dont even know a lick of assembly either! hahaha. Terry Davis is a phony CIA ******. Reminder to everyone, whatever I say goes. Respect and worship the HolyC and it's covenant 640x480 resolution. Your absolution depends on it. This is a wakeup call for every wannabe hacker in this trash mobile site.
    Last edited by Razon91; 06-25-2017 at 05:25 PM.

  8. #7
    meme420's Avatar
    Join Date
    Dec 2015
    Gender
    female
    Posts
    54
    Reputation
    10
    Thanks
    11
    Quote Originally Posted by Cyaegha View Post
    There are actually a few methods for doing this
    Code:
    local Messages = {}
    
    -- Method 1
    local i = 1
    local NetworkString = true
    
    while NetworkString do
    	NetworkString = util.NetworkIDToString(i)
    	Messages[NetworkString] = true
    	i = i + 1
    end
    
    -- Method 2
    for i = 1, math.huge do
    	local str = util.NetworkIDToString(i)
    	if not str then break end
    
    	Messages[str] = true
    end
    
    -- Method 3
    local i = 1
    local NetworkString = true
    
    repeat
    	NetworkString = util.NetworkIDToString(i)
    	Messages[NetworkString] = true
    	i = i + 1
    until not NetworkString
    Personally I'd use the second method but all three do the same thing.
    Also there's no need to use the server's IP in the created file's name, use GetHostName. It'll make it way easier to find if you join a shit ton of servers.
    Code:
    local Messages = {}
    local i = 1
    
    for i = 1, math.huge do
    	local str = util.NetworkIDToString(i)
    	if not str then break end
    
    	Messages[str] = true
    	print(str)
    end
    anyway to make it print only certain net messages?

  9. #8
    0x28's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    53
    Reputation
    10
    Thanks
    193
    Quote Originally Posted by meme420 View Post
    Code:
    local Messages = {}
    local i = 1
    
    for i = 1, math.huge do
    	local str = util.NetworkIDToString(i)
    	if not str then break end
    
    	Messages[str] = true
    	print(str)
    end
    anyway to make it print only certain net messages?
    search for specific string and if it matches print it

  10. #9
    Cyaegha's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Posts
    536
    Reputation
    17
    Thanks
    526
    Quote Originally Posted by 0x28 View Post
    search for specific string and if it matches print it
    That's good if you only have a couple messages. If you have a shit ton of messages you can put them in a table like
    Code:
    local tbl ={["Net message"] = true,}
    then check if tbl[key] is true, you don't have to if you don't want to but it'd save you from typing
    Code:
    elseif msg == "string" then
    a bunch of times.

  11. #10
    TenX's Avatar
    Join Date
    Dec 2017
    Gender
    male
    Posts
    0
    Reputation
    10
    Thanks
    0
    Nice one, lad

Similar Threads

  1. Website network issues
    By Dave84311 in forum News & Announcements
    Replies: 2
    Last Post: 11-30-2007, 11:28 PM
  2. [RELEASE] Weapon Grabber V1
    By mains3rv3r in forum WarRock - International Hacks
    Replies: 17
    Last Post: 06-06-2007, 05:59 AM
  3. String Theory
    By arunforce in forum General
    Replies: 8
    Last Post: 01-14-2007, 09:49 AM
  4. Wireless Networking
    By Jackal in forum Hardware & Software Support
    Replies: 10
    Last Post: 08-05-2006, 08:48 AM
  5. Help me with my Email to K2 Job Network
    By styx23 in forum WarRock - International Hacks
    Replies: 37
    Last Post: 06-03-2006, 11:08 PM

Tags for this Thread