Pivity

file string replacements?

Last read Never
#1

so i saw '{{ user_id }}' and was planning to use it to make my own DRM something like

local purchaserID='{{ user_id }}'--steam id of the purchaser
local purchaserIP="0.0.0.0:27015"--the IP of the server that the purchaser wants
if file.Exists("drm/{{ script_id }}","DATA") then--was there a previous authentication?
purchaserIP=file.Read("drm/{{ script_id }}","DATA")
end
hook.Add("CheckPassword","drm_check",function(steamID64,ipAddress,svPassword,clPassword,name)
if string.Split(game.GetIPAddress(),":")[1]!=string.Split(purchaserIP,":")[1] and steamID64!=purchaserID and !string.StartWith(purchaserID,"{{ user_") then
--the 1st check sees if the IP is authorized and works if a previous authentication on that IP was successful.
--the 2nd check sees if the ID is the purchaser's ID and is why they need to be the first one joining.
--the 3rd check sees if the file string was replaced
timer.Simple(0,function()--delay the next line by one frame
RunConsoleCommand("disconnect")--shut down the server
end)
return false,[[Kicked by DRM: it seems like this server is using addons they weren't authorized to.
If the scripts were legitimately purchased, tell the one who purchased the script to get on first]]
--block the connection and tell them why
end
if game.IsDedicated() and !file.Exists("drm","DATA") then
file.CreateDir("drm")
file.write("drm/{{ script_id }}",game.GetIPAddress())
elseif game.IsDedicated() and !file.Exists("drm/{{ script_id }}","DATA")
file.write("drm/{{ script_id }}",game.GetIPAddress())
end
hook.remove("CheckPassword","drm_check")
end)

also i'm wondering if you are allowed to shut down a server if the DRM fails or what is allowed for DRM

Optimistic x 1
#2

What's to stop someone just removing those 23 lines and using the addon?

Agree x 1
#3
ByOwainat 24th of January 2018 14:59:02
What's to stop someone just removing those 23 lines and using the addon?

moral

Funny x 7
#4
ByOwainat 24th of January 2018 14:59:02
What's to stop someone just removing those 23 lines and using the addon?

honor

Funny x 7
#5
ByOwainat 24th of January 2018 14:59:02
What's to stop someone just removing those 23 lines and using the addon?

i would hide it amongst the serverside code, which can be quite massive. about 380 lines in my karma and bounty system.

Dumb x 1
#6
Byjoeyjumper94at 24th of January 2018 15:26:54
i would hide it amongst the serverside code, which can be quite massive. about 380 lines in my karma and bounty system.

Will you code nordahl style to hide it?

Funny x 2
#7
Byjoeyjumper94at 24th of January 2018 15:26:54
i would hide it amongst the serverside code, which can be quite massive. about 380 lines in my karma and bounty system.

Still, there are people out there that'll happily spend 15 minutes scanning through your files Ctrl+Fing their SteamID. But hey, who am I to stop you doing this? This is an "interesting" method of doing things, good luck!

#8
ByOwainat 24th of January 2018 15:47:14
Still, there are people out there that'll happily spend 15 minutes scanning through your filesCtrl+Fing their SteamID. But hey, who am I to stop you doing this? This is an "interesting" method of doing things, good luck!

doesn't '{{ user_id }}' turn into the purchaser's steamID64? which in my case would be "76561198051306817"

#9

Honestly, wouldn't even consider what you're making as DRM. It takes only one person to say "Hey, just remove these lines", and boom, your effort evaporates. - And your idea to hide this code has become futile now that you've made this thread.

If you truly believe you need DRM, securegmod is highly recommended.

Agree x 2
#10
Byjoeyjumper94at 24th of January 2018 16:00:39
doesn't '{{ user_id }}' turn into the purchaser's steamID64? which in my case would be "76561198051306817"

Ye, but I was referring to the person leaking the addon

#11

i saw on a leak forum when i was dmcaing one of richards' leaked addons that they already posted about finding shitty drms sorta like this.

Cause obviously they learned how to mass file search, they'll just search for the user_id

Also you're not allowed to shutdown servers nor kick people, it's against the rules after scriptenforcer

so far securegmod is the best drm that's out and probably will be, way better than whatever the hell this is tbh

Edited ik succgmod shuts down servers but it's unintentional plus once it's fixed, it's fixed for good and it's usually the client doing something wrong like not downloading it multiple times

Agree x 1
#12
ByLunaversity.me/c 🌸at 24th of January 2018 18:19:43
i saw on a leak forum when i was dmcaing one of richards' leaked addons that they already posted about finding shitty drms sorta like this.Cause obviously they learned how to mass file search, they'll just search for the user_idAlso you're not allowed to shutdown servers nor kick people, it's against the rules after scriptenforcerso far securegmod is the best drm that's out and probably will be, way better than whatever the hell this is tbhEditedik succgmod shuts down servers but it's unintentional plus once it's fixed, it's fixed for good and it's usually the client doing something wrong like not downloading it multiple times

there was a problem with crident not setting up the right IP or something like that, but when it's restarting it's 99% of the time the fault of the server provider/guy who configured the firewall

Disagree x 1Friendly x 1
#13
ByLapinat 25th of January 2018 08:29:04
there was a problem with crident not setting up the right IP or something like that, but when it's restarting it's 99% of the time the fault of the server provider/guy who configured the firewall

Tut, tut, tut. Shoulda used Hexane. Code Owain for 30% off

Dumb x 3Agree x 2Disagree x 2
#14
ByLapinat 25th of January 2018 08:29:04
there was a problem with crident not setting up the right IP or something like that, but when it's restarting it's 99% of the time the fault of the server provider/guy who configured the firewall

it was due to a silent gmod update but we already created an image for the previous version and dunno what cached it so we had to have users click on Steam Updater to fix the issue

#15
ByLapinat 25th of January 2018 08:29:04
there was a problem with crident not setting up the right IP or something like that, but when it's restarting it's 99% of the time the fault of the server provider/guy who configured the firewall

This is concerning to read. Firewall setup is automated & has been for quite a long time now. This leaves little room for human error. What makes you think we weren't setting IP's up correctly? We've never had an incident I can think of, like you're explaining with a firewall or IP configuration issue. It seems like a totally baseless claim - but I'll assume you know something we don't? If you could give me some more info on this ASAP so we can look into it, that would be awesome.

Do you have any reasonable ideas how restarting the game server would also correct these "issues", because I can't think of any way the issues you explained just can be fixed from a server restart in a practical way. The firewall is a L3 firewall - it's not like, running on the dedi - and for 98% of servers on our network there is virtually no firewall in place until an attack pattern is detected. Ultimately you can't block an attack without knowing the pattern, as such having firewalls in place when there isn't an attack would just increase the possibility for false positives - granted this only really applies to layer 7 attacks.

Edited

ByOwainat 25th of January 2018 15:25:35
Tut, tut, tut. Shoulda used Hexane. CodeOwainfor 30% off

I don't think pointing people to a smaller, younger, less experienced solution with no unique selling point that every other host doesn't already have is a reasonable suggestion. Not like you care as you're just trying to make money from some affiliate discount I'm sure. Just so you know - we probably have a higher affiliate payout sitting at 40% of the purchase recurring ;)

Edited

ByLunaversity.me/c 🌸at 25th of January 2018 19:43:06
it was due to a silent gmod update but we already created an image for the previous version and dunno what cached it so we had to have users click on Steam Updater to fix the issue

The issue with the broken gmod image shouldn't be able to happen again as we now run Steam Update's on deployment, also. I'm actually still looking into this. I will say (I'm most likely off-base here. I don't manage this part of Crident, Trixter will most likely correct me if I'm wrong here) one of our France nodes continued using a cached version for a reason I'm not entirely aware for a little while after they should have been purged. This is now fixed, however we are still monitoring this issue.

Edited On topic: If you want DRM, it's probably most cost-efficient to use SecureGmod. Although I don't like how users need to download a unique copy of their script per server, I'm sure it plays a huge role in preventing leaks.

#16

-sniper- Probably best not to start drama, don't fancy getting banned

Funny x 2
#17

that's what trixter said, about the IP, not the firewall

Users viewing this thread
Nobody