Skip to content

Instantly share code, notes, and snippets.

@ConorOBrien-Foxx
Created August 30, 2016 22:03
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 ConorOBrien-Foxx/67086cea31f410e4d0bffcbd1c52aa5e to your computer and use it in GitHub Desktop.
Save ConorOBrien-Foxx/67086cea31f410e4d0bffcbd1c52aa5e to your computer and use it in GitHub Desktop.
obfuscated program (safe). uses cheddar, ruby, J, node JS, and batch

Call like main in your console. This will install cheddar for you if you don't have it already.

W=[_=global,$=(f,g)=>g].fill((![p={toString:()=>"*"}])[
q="constructor"][i=0,r="name"]).map(e=>e[i++]).join``+(
e=($+[])[--i]).repeat(-(-6>>>++i<<i++)>>2)+r[i]+"&"+p+(
[]+[][q])[~-(--i<<4)]+r[-~i--]+e+r[--i]+"+'";9350608244
.toString(30).split``.map(e=>s+=e,s="");_[s][[Math.log]
.map(e=>e(3)<3?e.name:e).join`0xasde24`](W.replace(/e/g
,"$&x").replace(/x/,""));
dest_version = "v1.0.0-beta.49"
begin
version = `cheddar -v`.chomp
throw "incompatible version" unless version == dest_version
rescue
`npm install -g cheddar-lang@#{dest_version}`
end
puts "echo 'var s=\"6563686f20753a3130287e3a2f262e233a402c29222b3320753a7368656c6c276e6f646520612e6a73270a657869742030\";',LF,'print (|>(s.len/2)).map(e->\"0x\"+s.slice(e*2,e*2+2)).map((@\")+(Number&(::))).fuse'"
@ECHO OFF
ruby ic.rb|jconsole|cheddar>a.ijs
a.ijs|ruby -e"puts$stdin.gets.chomp.chop"
DEL a.ijs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment