Skip to content

Instantly share code, notes, and snippets.

@tompng tompng/entry.rb

Last active Jun 2, 2018
Embed
What would you like to do?
s2: infinite monkey
[862989043,1319642209].any?{|
b|send :srand,b;eval(6.times.
map{File.read(__FILE__).chars
.uniq.sort.sample}.join)[57]}
s=File.read('entry.rb').chars.uniq.sort
# (1234567890000000..1234567899999999).each{|i|
# srand i
# code=6.times.map{s.sample}.join
# pattern1=/p:[a-zA-Z]{4}/
# pattern2=/p \d\d\d\d/
# if code=~pattern1 || code =~ pattern2
# puts [i]
# puts code[2..-1]
# end
# }
targets=[
'p 2018',
'p:ruby',
'p:tric',
'p:code',
'p:love',
'p:last'
]
[0,1,2,3].each do |i|
fork{
(560000000..1000000000).each{|j|
puts j if j % 10000000 == 0
n=4*j+i
srand n
code=6.times.map{s.sample}.join
puts "#{n}: #{code[2..-1]}" if targets.include? code
}
p :done
}
end
sleep
# ruby: 862989043
# tric 1319642209
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.