Last active
August 14, 2021 07:17
-
-
Save Pldare/a74d1a8a9f604defb69433cbf9fed4b3 to your computer and use it in GitHub Desktop.
SHINY_COLORS_dec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.IO.Compression; | |
namespace Shiny | |
{ | |
class Shiny_dec | |
{ | |
static void Main(string[] args) | |
{ | |
using (FileStream fs = new FileStream(args[0],FileMode.Open)) { | |
using (BinaryReader bs = new BinaryReader(fs)) { | |
byte[] key_array=new byte[]{0x42,0x27,0x4B,0x59,0x57,0x4C,0x5B,0x44,0x49,0x5C,0x76,0x71,0x55,0x49,0x79,0x77,0x5F,0x77,0x65,0x5F,0x61,0x72,0x65,0x5F,0x68,0x69,0x72,0x69,0x6E,0x67,0x5F,0x68,0x74,0x74,0x70,0x73,0x3A,0x2F,0x2F,0x6B,0x6E,0x6F,0x63,0x6B,0x6E,0x6F,0x74,0x65,0x2E,0x63,0x6F,0x2E,0x6A,0x70}; | |
byte[] resultarray=new byte[fs.Length]; | |
for (int i = 0; i < fs.Length; i++) { | |
resultarray[i]=(byte)(bs.ReadByte()^key_array[i%key_array.Length]); | |
} | |
using(MemoryStream ms =new MemoryStream(resultarray)){ | |
using(GZipStream gzs=new GZipStream(ms,CompressionMode.Decompress)){ | |
using(FileStream df=new FileStream(args[0]+".dec",FileMode.OpenOrCreate,FileAccess.Write)) | |
{ | |
int data; | |
while((data=gzs.ReadByte())!=-1) | |
{ | |
df.WriteByte((byte)data); | |
} | |
} | |
} | |
} | |
} | |
} | |
log_msg("Done!"); | |
} | |
static void log_msg(string msg) | |
{ | |
Console.WriteLine(msg); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def c2i(str_c) | |
return str_c.unpack("C")[0] | |
end | |
def i2c(int_i) | |
return [int_i].pack("C") | |
end | |
def decryptResource(file_name) | |
key='B\'KYWL[DI\vqUIyw_we_are_hiring_https://knocknote.co.jp' | |
File.open(file_name,"rb") do |fs| | |
File.open(file_name+".gz","wb") do |ws| | |
for i in 0...fs.size | |
ws<<i2c(c2i(fs.read(1))^c2i(key[i%key.size])) | |
end | |
end | |
end | |
end | |
file_name=ARGV[0] | |
decryptResource(file_name) if FileTest.exist?(file_name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'digest' | |
def encryptPath(path,name) | |
ext_name=File.extname(path) | |
get_sha=Digest::SHA256.hexdigest(name[0]+name[-1]+path) | |
return get_sha+=[".mp4",".mp3",".m4a"].include?(ext_name) ? ext_name : "" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment