Sha256: 9252abb1e5e8ed786be2b3e7ddae7a8348ecda140f7d8f43d8e1cf7e0d7dde1b
Contents?: true
Size: 506 Bytes
Versions: 11
Compression:
Stored size: 506 Bytes
Contents
# -*- encoding: utf-8 -*- class PayloadGenerator private @@BSTRING = "" public def self.initialize(min = 1, max = 4096) srand() # @@min, @@max = min, max if @@min > @@max @@min, @@max = @@max, @@min warn "Swapping min and max values" end # @@BSTRING = "9" * @@max nil end # of initialize def self.payload i = rand(@@max - @@min) i = 1 if i == 0 i += @@min # puts "DBI: #{i}" @@BSTRING.byteslice(0, i) end end # of class
Version data entries
11 entries across 11 versions & 1 rubygems