Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module DSIVER144
- module CG_Password
- UNIQUE_ID = "Z01"
- GetComputerName = Win32API.new("Kernel32.dll", "GetComputerName" , "pl", "")
- FILE_PATH = "C:\\Passcode.bin"
- def self.dump_file(key, code)
- name = "\0" * 265
- GetComputerName.call(name)
- p name
- if !FileTest.exist?(FILE_PATH)
- p "Can't find!"
- code_hash = {}
- code_hash[key] = code.to_s
- File.open(FILE_PATH, "w") do |f|
- Marshal.dump(code_hash, f)
- p "Created File!"
- end
- else
- File.open(FILE_PATH, "r") do |f|
- code_hash = Marshal.load(f)
- end
- code_hash[key] = code.to_s
- File.open(FILE_PATH, "w") do |f|
- Marshal.dump(code_hash, f)
- p "Saved File!"
- end
- p code_hash
- end
- end
- end
- end
- class Game_System
- end
- #~ DSIVER144::CG_Password.dump_file("AAAA")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement