Jump to content

Kaarpas

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by Kaarpas

  1. 16 hours ago, IIYAMA said:

    @majqq

    Using triggerClientEvent you can actually making it harder as you can create your own keys to secure the scripts. But it will comes at a huge price.

    1. You are risking your variable names.
    2. You have to create your own security.
    3. You are risking your security keys.
    4. Converting your encrypted code to loadstring code comes at a cost of performance. (+ it is done in Lua and not C++)
    5. The download speed isn't optimised as you are requesting files per resource.
    6. The start sequence of the files for all resources in total is something you do not have full control over.
    7. ...

     

    My recommendation for high security:

    1. compile them (losing variable names +) (Optimised +)
    2. obfuscation (secure layer +) (decrypt time - )
    3. disable cache (not available as file) (download time - )

     

    But if you want to give high load/download time to the players. Do only step 1.

     

     

    Thanks for the help, it's something like @majqq I've already done in my scripts!

    • Like 1
  2.     function kikarplayer (theClient, commandName, kickedName, ...) 
            local account = getAccountName (getPlayerAccount (theClient))
         	if isObjectInACLGroup ("user."..account, aclGetGroup ("Admin")) then 
                if not ... then 
                    return outputChatBox ("#bf2e2e* Erro: /kick [nick] [motivo]",theClient,255,255,255,true) 
                end 
                local reason = table.concat({...}," ") 
                local kickerName = getPlayerName(theClient):gsub("#%x%x%x%x%x%x","") 
                local kickedPlayer = getPlayerFromName(kickedName) 
                if not isElement(kickedPlayer) then 
                    outputChatBox ("#bf2e2e* Erro: Player Invalido!",theClient,255,255,255,true) 
                end 
                outputChatBox ( "#c9c9c9[#1a6cefFW-INFORMA#c9c9c9]O #1a6cef" .. kickerName .. "  #c9c9c9Kickou o Player #1a6cef" ..getPlayerName(kickedPlayer):gsub("#%x%x%x%x%x%x","").. "#c9c9c9 | Motivo #1a6cef" ..reason.. "#c9c9c9", getRootElement(), 255, 0, 0, true )  
                banPlayer ( kickedPlayer, theClient, reason ) 
            else 
                outputChatBox ("#bf2e2e* Erro: Você Não tem Permissão!",theClient,255,255,255,true) 
            end 
        end 
        addCommandHandler ( "kick", kikarplayer )

     

    • Like 1
  3. 1 minute ago, majqq said:

    I'm not expert at this, but yes, compiling with highest level of obfuscation. Since i don't get answer yet for my topic, one more possible way is sending client scripts with loadstring and triggerClientEvent, i've saw it somewhere, but i don't know if at the moment is worth to add this kind of protection, or if it's working at all. 

    It's something that worries me a lot, since I spend a lot of time in scripting, just as you should do.

  4. 5 minutes ago, majqq said:

    Related topic:

     

    Thank you, but you have not helped me yet. It is because I believe that the code has to be sent to the client for it to run, I do not know if with some type of proxy it is possible to intercept it and read it, I do not understand much of proxys. And good, since you cite in your topic, what is the best way to compile a script, having three options in luac?

  5. Olá, pessoal...

    Em um script, chamo uma exportação que fiz de outro script.

    Essa função exportada retorna mais de um valor, como eu separo-os na função que o chamou?

    Função que chama a exportação:

    function Login()
    	account = getAccountName(getPlayerAccount(source))
    	info = Login:getNumInfo(account)
    end
    addEventHandler("onPlayerLogin", getRootElement(), Login)

    Função exportada: 

    function getNumInfo(account)
    	local data = dbPoll(dbQuery(databDB, "SELECT * FROM Contas WHERE User = ?", account), -1)
    	if type(data) == "table" and #data ~= 0 then
    		n1 = data[1]["Vr1"]
    		n2 = data[1]["Vr2"]
    		return n1, n2
    	end
    end

     

    EDIT: *Consegui fazer-lo com gettok.*

  6. 19 hours ago, Lord Henry said:

    Exato. O setElementData, independente se for feito client ou server-side, sempre será sincronizado com todos os outros jogadores. E essa sincronização consome bastante processamento do servidor.

     

    Totalmente inviável. Conexão com banco de dados não deve ser feito a cada frame, ele é pesado demais para ser feito tantas vezes em curtos períodos de tempo. Além disso, conexão com banco de dados só pode ser feita server-side, e um "draw" só pode ser feito client-side. Ou seja, vc precisaria de um triggerServerEvent a cada frame, que ficaria absurdamente mais pesado ainda.

    Sim, eu sei sobre o trigger. Então a melhor opção vai ser por tabelas... Obrigado guys!

    • Like 1
  7. Quote
    4 hours ago, Lord Henry said:

    Depende muito da quantidade de datas que são salvas. É o mesmo que você ficar criando um monte de variável no seu código, cada uma consome um pouco de memória, mas quando são muitas, o consumo tende a ser bem perceptível.

    Então se eu for fazer um draw por exemplo, a cada frame o cliente buscar uma conexão com o banco de dados pra informar um mesmo valor que seria informado quando ele entrasse? PS: Conexão com um SQLITE hospedado na mesma máquina do servidor, não por MySQL. E se não for, MySQL é mais viável que SQLite?

    Ahh, e uma dúvida também. Se eu setar um element data do lado cliente, o element data ocupará a memória do cliente, né?

×
×
  • Create New...