Advertisement
estriole

EST - ENCRYPTER

Jun 24th, 2014
1,277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 23.70 KB | None | 0 0
  1. =begin
  2.  ■ Information      ╒═════════════════════════════════════════════════════════╛
  3. #==============================================================================
  4. # EST - [Z - ENCRYPTER]
  5. #==============================================================================
  6. # Author  : Estriole
  7. # Version : 1.4
  8. #==============================================================================
  9.  
  10.   #==============================================================================
  11.   # OC AUDIO ENCRYPTION
  12.   #==============================================================================
  13.   # Author  : Ocedic
  14.   # Version : 1.00
  15.   #==============================================================================  
  16.   #==============================================================================
  17.   # Simple Audio Encryption
  18.   #==============================================================================
  19.   # Author  : Tsukihime
  20.   # Version : 1.00
  21.   #==============================================================================  
  22.  
  23.  
  24.  ■ Changelog        ╒═════════════════════════════════════════════════════════╛
  25.  v1.0 2014.06.19     >     Initial Release
  26.  v1.1 2014.06.25     >     Add some rescue if files deleted. it will redecrypt it.
  27.                            thanks to andar for pointing that out.
  28.                      >     Automatically decrypt ALL files when the game FIRST
  29.                            executed...
  30.  v1.2 2014.06.30     >     prevent admin right error showing the location of the resource.                          
  31.  v1.3 2014.07.19     >     upgrade the protection by making the path stored in private variable.
  32.                            so it cannot be printed outside the module/class. also some
  33.                            protection against thief that call script call from event
  34.                            or using damage formula to print the private variable.
  35.  v1.4 2014.07.21     >     fix error if you decide to not convert anything / partial
  36.  
  37.  ■ License        ╒═════════════════════════════════════════════════════════╛
  38.  Free to use in all project (except the one containing pornography)
  39.  as long as i credited (ESTRIOLE).
  40.  
  41.  the encrypt code based from (also take some code) from Ocedic script.
  42.  but i heavily modified it to able to encrypt graphic, sound, video (all playable format)
  43.  the decrypt code based from (also take some code) from tsukihime script.
  44.  so you need to credit both Ocedic and Tsukihime too if you use this script.
  45.  
  46.  so in summary... this is the list of people that you need to credit:
  47.  1) Estriole
  48.  2) Ocedic
  49.  3) Tsukihime
  50.  
  51.  ■ Introduction     ╒═════════════════════════════════════════════════════════╛
  52.    This script written following my idea from EST - SCRIPT CONTROL. this script
  53.  serialize the graphics/sounds/videos to rvdata2 files. so it can be encrypted too.
  54.  
  55.  this script will decrypt the files when the game needed it.
  56.  
  57.  like Ocedic said in his script. even with 100% encryption it would
  58.  still possible to stole the graphic/sound/video. but i made some extra layer of security.
  59.  which make it harder to stole. you can set WHERE you want the file placed.
  60.  
  61.  for example: C:/Windows/System32
  62.  (i won't go that far though) :p. OR still use that folder but create folders
  63.  with unique name. C:/Windows/System32/Est_Games
  64.  
  65.  if they don't know the path then it's almost impossible to know where the sound.
  66.  since when first time opening the graphic/sound/video. it will decrypt it. place it inside
  67.  the folder you set. with RANDOM NAME and with extension you can set inside the
  68.  configuration (you can even left it "" to make it without extension. harder to search).
  69.  to keep the game reference to the file. there's a special decrypt_list file with
  70.  name you can set (it would be better to make it random and without extension).
  71.  
  72.  but of course people can see when they decrypt your project and peek at this script.
  73.  THERE's EST_CS2 - SCRIPT CONTROL come to the rescue. so they cannot read this script(easily). :D.
  74.  (using external script import feature) (or even double encryption feature)
  75.  just call this script externally (read script control)
  76.  
  77.  ■ Features     ╒═════════════════════════════════════════════════════════╛
  78.  - Encrypt graphic files
  79.  - Encrypt sound files
  80.  - Encrypt video files
  81.  - Decrypt when the files needed in folder YOU set
  82.  - Great Combo with EST_CS2 - SCRIPT CONTROL so the path cannot be read easily.
  83.  
  84.  ■ Requirement     ╒═════════════════════════════════════════════════════════╛
  85.    Just RPG MAKER VX ACE program :D
  86.  
  87.  ■ Compatibility     ╒═════════════════════════════════════════════════════════╛
  88.  - Should work with most scripts. unless that scripts use Bitmap.new(path)
  89.    directly (as far as i know no scripts use that approach yet)
  90.  
  91.    if there's scripts that overwrite Audio.bgm_play (or other method in Audio module)
  92.    put this script below it.  
  93.    
  94.    Graphic / Sound / Video name should not contain . (period).
  95.    wrong example: And.I.Love.You.png
  96.    correct example: And I Love You.png
  97.    correct example: And_I_Love_You.png
  98.    
  99.  - you cannot have same image / sound / video name in SAME FOLDER. even though
  100.  they have different EXTENSION.
  101.  
  102.  - Put this script BELOW any scripts that OVERWRITE
  103.     >>  def eval
  104.    inside Game_Interpreter or RPG::UsableItem::Damage for better protection.
  105.  
  106.  -  when you use folder that not have write access for the windows username.
  107.  after you test play the project. it will throw errors. it's fine. the file
  108.  STILL encrypted. but you need to play using Game.exe WITH administrator access.
  109.  (right click > run as administrator access). that means you need to tell your
  110.  customer to play it using admininstrator access too.
  111.  FYI: this information is for Windows vista and above. since they usually don't
  112.  have write access to system folders. Windows XP have no issues about this.
  113.      
  114.  ■ How to Use     ╒═════════════════════════════════════════════════════════╛  
  115.  0) Finish your project first.
  116.  1) Change the configuration as you like (read the configuration comment)
  117.  2) Set this:
  118.         CONVERT_GRAPHIC_TO_RVDATA2 = true
  119.         CONVERT_SOUND_TO_RVDATA2 = true
  120.         CONVERT_VIDEO_TO_RVDATA2 = true
  121.     don't forget to save
  122.  3) Play test once (Read compatibility section above if it throws error).
  123.  4) delete Graphics, Audios, Movies folder (DO NOT EVER PLAY TEST with point 2 set
  124.     to true AFTER you delete the Graphics/Audios/Movies. because it might throw error)
  125.  5) Encrypt the game normally using the editor
  126.  
  127.  ■ Future Plan     ╒═════════════════════════════════════════════════════════╛  
  128.  - method to delete all decrypted sounds. (when want to uninstall???) but still
  129.    confused on how to execute the delete process.
  130.  
  131.  ■ Scripter Note     ╒═════════════════════════════════════════════════════════╛  
  132.  - I think this could be the standard script for encrypting games. it took days
  133.    writing this script. making some major changes in the process so it will be hard
  134.    to crack. before i also try GaryCXJk marshal dumpable bitmap scripts to serialize
  135.    the graphic. it would prove a better encryption but too bad the resulting file become too large.
  136.    then i switch using Ocedic audio encryption and modify it heavily to able to
  137.    encrypt graphic and video too. and the file become smaller.
  138.  - there's a slight delay when playing the sound for the first time (for that computer)
  139.    if the file is too big(not too noticeable though). but the next time playing
  140.    the sound it will play fine because it's saved in the computer
  141.    
  142. =end
  143. class Module
  144.   def include_module_methods(mod)
  145.     mod.singleton_methods.each do |m|
  146.       (class << self; self; end).send :define_method, m, mod.method(m).to_proc
  147.     end
  148.   end
  149. end
  150.  
  151. module ESTRIOLE
  152.   module ENCRYPTER
  153.   #>> Graphic + Sound + Video encryption settings
  154.     # activator. set this to true to serialize graphic
  155.     @@CONVERT_GRAPHIC_TO_RVDATA2 = true
  156.    
  157.     # activator. set this to true to serialize sound
  158.     @@CONVERT_SOUND_TO_RVDATA2 = true
  159.    
  160.     # activator. set this to true to serialize video
  161.     @@CONVERT_VIDEO_TO_RVDATA2 = true
  162.    
  163.     # crypt key for rvdata2 files (doesn't mean much because rvdata2 files
  164.     # cannot be played anyway. but to prevent people reverse engineering it easily
  165.     @@KEY = ""
  166.     # the longer above string. it might increase the size of the encrypted files.
  167.    
  168.     # key for alias to protect write class. change to any string you like (required)
  169.     MY_ALICIA_KEY = "to_make_sure_it_secure"
  170.     # THIS IS MORE IMPORTANT THAN @@KEY !!!
  171.    
  172.     # folder where the decrypt list file and decrypted sound file placed
  173.     # it would be better to specify STATIC path inside player computer.
  174.     @@FOLDER = "#{ENV['APPDATA']}/EST_GAMES"
  175.     # you can even set it in C:/Windows/System32 for example. but i won't go that far.
  176.     # as long as the drive is exist it will create the folder if it's not exist
  177.     # people that decrypt your project can see this. so use EST - SCRIPT CONTROL
  178.     # to hide this script. :D.
  179.     # if you want... you can use this to put decrypted files in %appdata%
  180.     # @@FOLDER = "#{ENV['APPDATA']}/yourfoldername"
  181.     # like most games do... but it's not as secure as:
  182.     # C:/Windows/System32/s/x/ccs/zlib/omg/wtf
  183.    
  184.     # WARNING. in playtest... if using folder that you cannot write too.
  185.     # it will throw error. ex: C:/Windows/System32 (in windows7 64 bit)
  186.     # it's okay. the files still encrypted. you can tell the user to right click at Game.exe
  187.     # then choose run with administrator right. it will load just fine.
  188.    
  189.     # file name of the decrypt list -> where the game will read the graphic/sound/video path reference
  190.     # can be with or without EXTENSION
  191.     @@DECRYPT_LIST_FILENAME = "AeWeLSeQRe"
  192.     # "AeWeLSeQRe" => without extension. "AeWeLSeQRe.dll" => with extension
  193.    
  194.     # number of random char for the decrypted graphic/sound/video filename. 10 is enough i guess.
  195.     @@CRYPT_FILENAME_NUMBER = 10
  196.    
  197.     # extension for the decrypted graphic/sound/video filename. if you don't want extension
  198.     # just left it "" (HARDER TO SEARCH)
  199.     @@CRYPT_EXTENSION = ".est_media"
  200.  
  201.   #====# DO NOT TOUCH BELOW THIS LINE # TOUCH AT YOUR OWN RISK #=================#
  202.   #ENCRYPT DECRYPT METHOD
  203.     def self.encrypt(filename)    
  204.       arr = filename.split("/")
  205.       arr[arr.size-1] = arr[arr.size-1].split(".")[0]
  206.       sourcefile = File.open(filename, "rb")
  207.       content = sourcefile.readlines
  208.       sourcefile.close
  209.       targetfile = File.new("Data/Z_EST_#{arr.join("_")}.rvdata2", "wb")
  210.       for i in 0...content.size
  211.         content[i] = @@KEY + content[i]
  212.       end
  213.       Marshal.dump(content, targetfile)
  214.       targetfile.close      
  215.     end
  216.  
  217.     def self.decrypt(filename)
  218.       decrypt_list = Marshal.load(File.open("#{@@FOLDER}/#{@@DECRYPT_LIST_FILENAME}"))
  219.       arr = filename.split("/")
  220.       arr[arr.size-1] = arr[arr.size-1].split(".")[0]
  221.       content = load_data("Data/Z_EST_#{arr.join("_")}.rvdata2")
  222.       for i in 0...content.size
  223.         value = content[i]
  224.         content[i] = value[@@KEY.length, content[i].size]
  225.       end
  226.  
  227.       samples = ('a'..'z').to_a + (0..9).to_a
  228.       checking = false
  229.       begin
  230.         while !checking
  231.           crypt = []
  232.           @@CRYPT_FILENAME_NUMBER.times.each do |i|
  233.             crypt.push(samples.sample)
  234.           end
  235.           checking = true if !decrypt_list.values.include?(crypt.join)
  236.         end
  237.         path = "#{@@FOLDER}/#{crypt.join}#{@@CRYPT_EXTENSION}"
  238.         targetfile = File.open(path, "wb")
  239.       rescue
  240.         while !checking
  241.           crypt = []
  242.           @@CRYPT_FILENAME_NUMBER.times.each do |i|
  243.             crypt.push(samples.sample)
  244.           end
  245.           checking = true if !decrypt_list.values.include?(crypt.join)
  246.         end
  247.         path = "#{@@FOLDER}/#{crypt.join}_clone#{@@CRYPT_EXTENSION}"
  248.         targetfile = File.open(path, "wb")
  249.       end
  250.    
  251.       for i in 0...content.size
  252.         targetfile.write(content[i])
  253.       end
  254.       targetfile.close
  255.       return path
  256.     end
  257.    
  258.   # decrypt list preparation code
  259.   def self.prepare_decrypt_list
  260.     begin
  261.       dirlist = @@FOLDER.split("/")
  262.       dircheck = []
  263.       dirlist.each_with_index do |dir, i|
  264.         dircheck.push(dir)
  265.         next if i == 0
  266.         string = dircheck.join("/")
  267.         Dir.mkdir(string) unless File.exist?(string)
  268.       end
  269.    
  270.       path = "#{@@FOLDER}/#{@@DECRYPT_LIST_FILENAME}"
  271.  
  272.       if !File.exist?(path)  
  273.         b = File.new(path, "wb")
  274.         Marshal.dump({:key => path},b)
  275.         b.close
  276.       end
  277.     rescue
  278.       raise "Run Game.exe with Administrator right \n(right click > run with administrator right)" if !$TEST
  279.       raise "You have no access to Folder... File still Encrypted though.\nTo play: Run Game.exe with Administrator right"
  280.     end
  281.   end
  282.  
  283.   def self.est_decrypt_all
  284.     dpath = "#{@@FOLDER}/#{@@DECRYPT_LIST_FILENAME}"
  285.     if !File.exist?(dpath)
  286.       begin
  287.         self.prepare_decrypt_list
  288.         decrypt_list = Marshal.load(File.open(dpath))    
  289.         list = load_data("Data/Z_ListGraphic.rvdata2")
  290.         list.each do |file|
  291.           path = self.decrypt(file)
  292.           decrypt_list[file.split(".")[0]] = path
  293.         end
  294.       rescue
  295.         p "no Z_ListGraphic.rvdata2 found"
  296.       end
  297.       begin
  298.         list = load_data("Data/Z_ListAudio.rvdata2")
  299.         list.each do |file|
  300.           path = self.decrypt(file)
  301.           decrypt_list[file.split(".")[0]] = path
  302.         end
  303.       rescue
  304.         p "no Z_ListAudio.rvdata2 found"
  305.       end
  306.       begin
  307.         list = load_data("Data/Z_ListMovie.rvdata2")
  308.         list.each do |file|
  309.           path = self.decrypt(file)
  310.           decrypt_list[file.split(".")[0]] = path
  311.         end
  312.         b = File.open(dpath, "wb")
  313.         Marshal.dump(decrypt_list,b)
  314.         b.close
  315.       rescue
  316.         p "no Z_ListMovie.rvdata2 found"
  317.       end
  318.     end
  319.   end
  320.  
  321.   # >> convert methods
  322.   def self.convert_graphic_to_rvdata2
  323.     return unless $TEST
  324.     return unless @@CONVERT_GRAPHIC_TO_RVDATA2
  325.     list = []
  326.     pathlist = Dir["Graphics/**/*"].select{|x| !File.directory?(x)}
  327.       pathlist.each do |path|
  328.         self.encrypt(path)
  329.         list.push(path).uniq!
  330.       end  
  331.     b = File.new("Data/Z_ListGraphic.rvdata2", "wb")
  332.     Marshal.dump(list,b)
  333.     b.close
  334.   end
  335.  
  336.   # sound convert
  337.   def self.convert_sound_to_rvdata2
  338.     return unless $TEST
  339.     return unless @@CONVERT_SOUND_TO_RVDATA2
  340.     list = []
  341.     pathlist = Dir["Audio/**/*"].select{|x| !File.directory?(x)}
  342.       pathlist.each do |path|
  343.         self.encrypt(path)
  344.         list.push(path).uniq!
  345.       end  
  346.     b = File.new("Data/Z_ListAudio.rvdata2", "wb")
  347.     Marshal.dump(list,b)
  348.     b.close
  349.   end
  350.  
  351.   # video convert
  352.   def self.convert_video_to_rvdata2
  353.     return unless $TEST
  354.     return unless @@CONVERT_VIDEO_TO_RVDATA2
  355.     list = []
  356.     pathlist = Dir["Movies/**/*"].select{|x| !File.directory?(x)}
  357.       pathlist.each do |path|
  358.         self.encrypt(path)
  359.         list.push(path).uniq!
  360.       end  
  361.     b = File.new("Data/Z_ListMovie.rvdata2", "wb")
  362.     Marshal.dump(list,b)
  363.     b.close
  364.   end
  365.  
  366.   module PROTECT_EVAL
  367.     @@KEY_ALIAS = ESTRIOLE::ENCRYPTER::MY_ALICIA_KEY.dup  
  368.     @@FILE_ALIAS_NAME = "#{@@KEY_ALIAS}est_encrypter_eval".to_sym
  369.     @@INSTANCE_METHODS_ALIAS_NAME = "#{@@KEY_ALIAS}_est_encrypter_instance_methods_protect".to_sym
  370.     @@METHODS_ALIAS_NAME = "#{@@KEY_ALIAS}_est_encrypter_methods_protect".to_sym
  371.  
  372.     def check_eval(*args)
  373.       script = args[0]
  374.       return msgbox "Protected!!!" if script.include?("@@KEY")
  375.       return msgbox "Protected!!!" if script.include?("@@FOLDER")
  376.       return msgbox "Protected!!!" if script.include?("@@DECRYPT_LIST_FILENAME")
  377.       return msgbox "Protected!!!" if script.include?("@@CRYPT_FILENAME_NUMBER")
  378.       return msgbox "Protected!!!" if script.include?("@@CRYPT_EXTENSION")
  379.       return msgbox "Protected!!!" if script.include?("@@KEY_ALIAS")
  380.       return msgbox "Protected!!!" if script.include?("@@FILE_ALIAS_NAME")
  381. #      return msgbox "Protected!!!" if script.include?("module ")
  382.      
  383.       send(@@FILE_ALIAS_NAME,args[0]) if args.size == 1
  384.       send(@@FILE_ALIAS_NAME,*args) if args.size > 1
  385.     end
  386.    
  387.    end #end module PROTECT EVAL
  388.   end #end module ENCRYPTER
  389. end #end module ESTRIOLE
  390.  
  391. # audio decrypt code
  392. module Audio
  393.   include ESTRIOLE::ENCRYPTER
  394.   include_module_methods ESTRIOLE::ENCRYPTER
  395.   class << self
  396.     alias :est_encrypter_bgm_play :bgm_play
  397.     alias :est_encrypter_bgm_stop :bgm_stop
  398.     alias :est_encrypter_bgs_play :bgs_play
  399.     alias :est_encrypter_me_play :me_play
  400.     alias :est_encrypter_se_play :se_play
  401.   end
  402.   def self.est_play_audio(symbol,*args)
  403.     self.prepare_decrypt_list if !File.exist?("#{@@FOLDER}/#{@@DECRYPT_LIST_FILENAME}")
  404.     decrypt_list = Marshal.load(File.open("#{@@FOLDER}/#{@@DECRYPT_LIST_FILENAME}"))
  405.     arr = args[0].split("/")
  406.     arr[arr.size-1] = arr[arr.size-1].split(".")[0]      
  407.     sound = load_data("Data/Z_EST_#{arr.join("_")}.rvdata2") rescue nil
  408.     return send(symbol,*args) if !sound
  409.  
  410.     if !decrypt_list[args[0]]
  411.     path = self.decrypt(args[0])
  412.     decrypt_list[args[0]] = path
  413.     else
  414.       if File.exist?(decrypt_list[args[0]])
  415.         path = decrypt_list[args[0]]
  416.       else
  417.         path = self.decrypt(args[0])
  418.         decrypt_list[args[0]] = path
  419.       end
  420.     end
  421.       begin
  422.       list = "#{@@FOLDER}/#{@@DECRYPT_LIST_FILENAME}"
  423.       b = File.open(list, "wb")
  424.       Marshal.dump(decrypt_list,b)
  425.       b.close
  426.       rescue
  427.       raise "Run Game.exe with Administrator right \n(right click > run with administrator right)" if !$TEST
  428.       raise "You have no access to Folder... File still Encrypted though.\nTo play: Run Game.exe with Administrator right"
  429.       end
  430.      
  431.     args[0] = path
  432.     send(symbol,*args)    
  433.   end
  434.   def self.bgm_play(*args)
  435.     est_play_audio(:est_encrypter_bgm_play,*args)
  436.   end
  437.   def self.bgs_play(*args)
  438.     est_play_audio(:est_encrypter_bgs_play,*args)
  439.   end
  440.   def self.me_play(*args)
  441.     est_play_audio(:est_encrypter_me_play,*args)
  442.   end
  443.   def self.se_play(*args)
  444.     est_play_audio(:est_encrypter_se_play,*args)
  445.   end
  446.  
  447. end
  448.  
  449. # movie decrypt code
  450. module Graphics  
  451.   include ESTRIOLE::ENCRYPTER
  452.   include_module_methods ESTRIOLE::ENCRYPTER
  453.   class << self; alias :est_encrypter_play_movie :play_movie ; end
  454.   def self.play_movie(*args)
  455.     self.prepare_decrypt_list if !File.exist?("#{@@FOLDER}/#{@@DECRYPT_LIST_FILENAME}")
  456.     decrypt_list = Marshal.load(File.open("#{@@FOLDER}/#{@@DECRYPT_LIST_FILENAME}"))
  457.     arr = args[0].split("/")
  458.     arr[arr.size-1] = arr[arr.size-1].split(".")[0]      
  459.     sound = load_data("Data/Z_EST_#{arr.join("_")}.rvdata2") rescue nil
  460.     return send(:est_encrypter_play_movie,*args) if !sound
  461.  
  462.     if !decrypt_list[args[0]]
  463.     path = self.decrypt(args[0])
  464.     decrypt_list[args[0]] = path
  465.     else
  466.       if File.exist?(decrypt_list[args[0]])
  467.         path = decrypt_list[args[0]]
  468.       else
  469.         path = self.decrypt(args[0])
  470.         decrypt_list[args[0]] = path
  471.       end
  472.     end
  473.    
  474.       begin
  475.       list = "#{@@FOLDER}/#{@@DECRYPT_LIST_FILENAME}"
  476.       b = File.open(list, "wb")
  477.       Marshal.dump(decrypt_list,b)
  478.       b.close
  479.       rescue
  480.       raise "Run Game.exe with Administrator right \n(right click > run with administrator right)" if !$TEST
  481.       raise "You have no access to Folder... File still Encrypted though.\nTo play: Run Game.exe with Administrator right"
  482.       end
  483.      
  484.     args[0] = path
  485.     send(:est_encrypter_play_movie,*args)    
  486.   end
  487. end
  488.  
  489. # graphic decrypt code
  490. module Cache
  491.   include ESTRIOLE::ENCRYPTER
  492.   include_module_methods ESTRIOLE::ENCRYPTER
  493.   class << self; alias :est_encrypter_normal_bitmap normal_bitmap; end
  494.   def self.normal_bitmap(*args)
  495.     self.prepare_decrypt_list if !File.exist?("#{@@FOLDER}/#{@@DECRYPT_LIST_FILENAME}")
  496.     decrypt_list = Marshal.load(File.open("#{@@FOLDER}/#{@@DECRYPT_LIST_FILENAME}"))
  497.     arr = args[0].split("/")
  498.     arr[arr.size-1] = arr[arr.size-1].split(".")[0]      
  499.     sound = load_data("Data/Z_EST_#{arr.join("_")}.rvdata2") rescue nil
  500.     return send(:est_encrypter_normal_bitmap,*args) if !sound
  501.  
  502.     if !decrypt_list[args[0]]
  503.     path = self.decrypt(args[0])
  504.     decrypt_list[args[0]] = path
  505.     else
  506.       if File.exist?(decrypt_list[args[0]])
  507.         path = decrypt_list[args[0]]
  508.       else
  509.         path = self.decrypt(args[0])
  510.         decrypt_list[args[0]] = path
  511.       end
  512.     end
  513.       begin
  514.       list = "#{@@FOLDER}/#{@@DECRYPT_LIST_FILENAME}"
  515.       b = File.open(list, "wb")
  516.       Marshal.dump(decrypt_list,b)
  517.       b.close
  518.       rescue
  519.       raise "Run Game.exe with Administrator right \n(right click > run with administrator right)" if !$TEST
  520.       raise "You have no access to Folder... File still Encrypted though.\nTo play: Run Game.exe with Administrator right"
  521.       end
  522.     args[0] = path
  523.     send(:est_encrypter_normal_bitmap,*args)    
  524.   end  
  525. end
  526.  
  527. class RPG::BGM < RPG::AudioFile
  528.   def replay
  529.     Audio.bgm_stop
  530.     play(@pos)
  531.   end
  532. end
  533.  
  534. # disabling Event script command to write variable to file / console / msgbox
  535. class Game_Interpreter
  536.   include ESTRIOLE::ENCRYPTER::PROTECT_EVAL
  537.  
  538.   class << self
  539.     alias_method "#{@@INSTANCE_METHODS_ALIAS_NAME}".to_sym , :instance_methods
  540.     alias_method "#{@@METHODS_ALIAS_NAME}".to_sym , :methods
  541.   end    
  542.  
  543.   alias_method "#{@@FILE_ALIAS_NAME}".to_sym, :eval
  544.   def eval(script)
  545.     check_eval(script)
  546.   end
  547.   def self.instance_methods
  548.     return eval("#{@@INSTANCE_METHODS_ALIAS_NAME.to_s}") - [@@FILE_ALIAS_NAME]
  549.   end
  550.   def self.methods
  551.     return eval("#{@@METHODS_ALIAS_NAME.to_s}") - [@@INSTANCE_METHODS_ALIAS_NAME, @@METHODS_ALIAS_NAME]
  552.   end
  553. end
  554.  
  555. # disabling damage formula command to write variable to file / console / msgbox
  556. class RPG::UsableItem::Damage
  557.   include ESTRIOLE::ENCRYPTER::PROTECT_EVAL
  558.  
  559.   class << self
  560.     alias_method "#{@@INSTANCE_METHODS_ALIAS_NAME}".to_sym , :instance_methods
  561.     alias_method "#{@@METHODS_ALIAS_NAME}".to_sym , :methods
  562.   end    
  563.  
  564.   alias_method "#{@@FILE_ALIAS_NAME}".to_sym, :eval
  565.   def eval(*args)
  566.     check_eval(@formula,*args)
  567.   end
  568.   def self.instance_methods
  569.     return eval("#{@@INSTANCE_METHODS_ALIAS_NAME.to_s}") - [@@FILE_ALIAS_NAME]
  570.   end
  571.   def self.methods
  572.     return eval("#{@@METHODS_ALIAS_NAME.to_s}") - [@@INSTANCE_METHODS_ALIAS_NAME, @@METHODS_ALIAS_NAME]
  573.   end
  574. end
  575.  
  576. #code run
  577. ESTRIOLE::ENCRYPTER.convert_graphic_to_rvdata2
  578. ESTRIOLE::ENCRYPTER.convert_sound_to_rvdata2
  579. ESTRIOLE::ENCRYPTER.convert_video_to_rvdata2
  580.  
  581. ESTRIOLE::ENCRYPTER.est_decrypt_all
  582.  
  583. ESTRIOLE.send(:remove_const, :ENCRYPTER)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement