Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 22/06/21 in all areas

  1. Com a opção "d" no campo de opções (Options), no IPB, é possível ver qual arquivo, qual linha, qual função/evento. Só pra constar, a opção "a" atualiza o collectgarbage em tempo real.
    1 point
  2. There's no need to use that resource, just use TEA, it will do the job. I think i've answered your question, that is how to protect files. You should try and experiment around yourself with what i gave you, if you expect me to post a full code here that you'll just copy and paste then you're wrong and you'll never learn.
    1 point
  3. I don't know what you're saying but it would look something like this: Server: local file = fileOpen("file.dff") --Open the file you want local data = fileRead(file, fileGetSize(file)) --Get the data in it fileClose(file) --Don't need it anymore data = teaEncode(data, "secret") --Encrypt the data with the passkey "secret" if fileExists("protected/file.dff") then --Check if it's there already fileDelete("protected/file.dff") --If so, delete it end local newFile = fileCreate("protected/file.dff") --Create a new one in 'protected' directory (so the names don't collide) fileWrite(newFile, data) --Write the encrypted data fileClose(newFile) --Save & close You would have to restart the resource after the encryption so that the HTTP cache is updated and players download the new ecrypted versions. Client: local file = fileOpen("protected/file.dff") --open the encrypted file local data = fileRead(file, fileGetSize(file)) --Read the encrypted data fileClose(file) data = teaDecode(data, "secret") --Decrypt the data using the "secret" passkey local dff = engineLoadDFF(data) --Load the DFF data --Do your stuff here.. Now in meta: <meta> <!-- Your scripts and stuff --> <file src="protected/file.dff"> </meta> Don't put in the original files. And of course, if it's not just a single file then rework it into a loop, this is just an example.
    1 point
×
×
  • Create New...