Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How to Decrypt with RSA

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Y.A.K.E
Advanced Cheater
Reputation: 0

Joined: 15 Jul 2019
Posts: 51

PostPosted: Fri Sep 20, 2019 3:29 am    Post subject: How to Decrypt with RSA Reply with quote

I found a code, but it didn't work.


rsa-crypt.lua
 Description:

Download
 Filename:  rsa-crypt.lua
 Filesize:  24.94 KB
 Downloaded:  156 Time(s)

Back to top
View user's profile Send private message
Lynxz Gaming
Expert Cheater
Reputation: 4

Joined: 01 Jul 2017
Posts: 208
Location: help

PostPosted: Fri Sep 20, 2019 5:23 am    Post subject: Re: How to Decrypt with RSA Reply with quote

Y.A.K.E wrote:
I found a code, but it didn't work.


for the "textutils.unserialize" add this function (got it from google)
Code:
textutils = {}
textutils.unserialize = function(s)
    if type( s ) ~= "string" then
        error( "bad argument #1 (expected string, got " .. type( s ) .. ")", 2 )
    end
    local func = load( "return "..s, "unserialize", "t", {} )
    if func then
        local ok, result = pcall( func )
        if ok then
            return result
        end
    end
    return nil
end


and second error is
the code checks a file, if u dont have a file it will not work

on line 899 :
Code:
local f = io.open("/public.key", "r")
local publicKey = textutils.unserialize(f:read("*a"))
f:close()
f = io.open("/private.key", "r")
local privateKey = textutils.unserialize(f:read("*a"))
f:close()

_________________
my english is bad
discord : rynx#9828
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Y.A.K.E
Advanced Cheater
Reputation: 0

Joined: 15 Jul 2019
Posts: 51

PostPosted: Fri Sep 20, 2019 6:08 am    Post subject: Re: How to Decrypt with RSA Reply with quote

Lynxz Gaming wrote:
Y.A.K.E wrote:
I found a code, but it didn't work.


for the "textutils.unserialize" add this function (got it from google)
Code:
textutils = {}
textutils.unserialize = function(s)
    if type( s ) ~= "string" then
        error( "bad argument #1 (expected string, got " .. type( s ) .. ")", 2 )
    end
    local func = load( "return "..s, "unserialize", "t", {} )
    if func then
        local ok, result = pcall( func )
        if ok then
            return result
        end
    end
    return nil
end


and second error is
the code checks a file, if u dont have a file it will not work

on line 899 :
Code:
local f = io.open("/public.key", "r")
local publicKey = textutils.unserialize(f:read("*a"))
f:close()
f = io.open("/private.key", "r")
local privateKey = textutils.unserialize(f:read("*a"))
f:close()


I revised it, but I still couldn't work.

Code:
textutils = {}
textutils.unserialize = function(s)
    if type( s ) ~= "string" then
        error( "bad argument #1 (expected string, got " .. type( s ) .. ")", 2 )
    end
    local func = load( "return "..s, "unserialize", "t", {} )
    if func then
        local ok, result = pcall( func )
        if ok then
            return result
        end
    end
    return nil
end
local f = io.open("public.key", "r")
local publicKey = textutils.unserialize(f:read("*a"))
print(f);
print(publicKey);
f:close()

f = io.open("private.key", "r")
local privateKey = textutils.unserialize(f:read("*a"))
f:close()


print:

Code:
7FFFD2A99090
 
error:[string "--
..."]:897: attempt to index a nil value (local 'key')


897:
is
Code:
if key.public then


Code:
local function crypt(key, number)
   local exp
   if key.public then
      exp = bigint(key.public)
   else
      exp = bigint(key.private)
   end

   return tostring(modexp(bigint(number), exp, bigint(key.shared)))
end


private.key:
Code:
MIIEogIBAAKCAQEA1ei3JxBiHbRARMtJLhuFBxNlkhfBEXyQKz4+T9bJ54L5oLAwrjBw9EVEwTnof8aiN8cZxRXrGWMecij4QMgVIz6TSnv8g2KSN29giS9jg3L5kZjCxU9KUwX9b5f/u0x7384cfK9boQEj22MKsJnf8OOOVN0uf4NbLdm9mOaXUdKgI/e7cXrSXWGZ6QE9c1zBKSut7weM1Jty7eSY4VkZpIjGSYYQaSN7eBBnCWrsxzk1vof7vX/HJJMAGhpRxjN/T1YTVlnFAzNIsmbUGSfviNzkSmEfuh3fx9pgx4+iN1TeET5BhgsVUhS3kt2aXycLLrw/JA9W88n5eNdkT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Q50ByO1Dnb3yFpEJawci0TuC5WTLU53OQBSz76aTR9pBenrYMJ+1mcnserE0HSwnWVJamZE14+Xgae44ryjpqGGZ0YDGmouDQr3rMmEOml5LHpZUYTKiHOp1AOqNQi76XAdgU9mi2G/F/FA24iU3atYXMxAWspqtJk=


public.key
Code:
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1ei3JxBiHbRARMtJLhuFBxNlkhfBEXyQKz4+T9bJ54L5oLAwrjBw9EVEwTnof8aiN8cZxRXrGWMecij4QMgVIz6TSnv8g2KSN29giS9jg3L5kZjCxU9KUwX9b5f/u0x7384cfK9boQEj22MKsJnf8OOOVN0uf4NbLdm9mOaXUdKgI/e7cXrSXWGZ6QE9c1zBKSut7weM1Jty7eSY4VkZpIjGSYYQaSN7eBBnCWrsxzk1vof7vX/HJJMAGhpRxjN/T1YTVlnFAzNIsmbUGSfviNzkSmEfuh3fx9pgx4+iN1TeET5BhgsVUhS3kt2aXycLLrw/JA9W88n5eNdkTDC7XwIDAQAB
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites