Skip to content

Instantly share code, notes, and snippets.

@yosangwon
Created September 10, 2015 04:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yosangwon/5ba3d9956de850ccfc07 to your computer and use it in GitHub Desktop.
Save yosangwon/5ba3d9956de850ccfc07 to your computer and use it in GitHub Desktop.
"VBScript 악성코드 분석"에서 아스키 코드를 써놓은 코드를 원본 소스 코드로 변환하기.
# 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