Created
September 10, 2015 04:43
-
-
Save yosangwon/5ba3d9956de850ccfc07 to your computer and use it in GitHub Desktop.
"VBScript 악성코드 분석"에서 아스키 코드를 써놓은 코드를 원본 소스 코드로 변환하기.
This file contains 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
# ASCII tokenized text decoder | |
# | |
# usage | |
# ruby ascii_decode.rb input output | |
File.open(ARGV[1], "w") do |outfile| | |
File.open(ARGV[0], "r") do |infile| | |
dzclover = "" | |
while line = infile.gets | |
dzclover += line | |
end | |
dzclover.split("|dz|").each do |char| | |
outfile.write char.to_i.chr | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment