description = [[
Tests shifts near the 64-bit boundary.
]]

author = "Mak Kolybabi"

license = "Same as Nmap--See http://nmap.org/book/man-legal.html"

categories = {"discovery"}

require("bit")
require("stdnse")

hostrule = function(host)
	return true
end

action = function(host, port)
	local cur, i, prv

	cur = 0
	for i = 1, 16 do
		prev = cur
		cur = bit.lshift(prev, 8)
		stdnse.print_debug(1, "%016x = %016x << 8", cur, prev)

		prev = cur
		cur = bit.bor(prev, 0xFF)
		stdnse.print_debug(1, "%016x = %016x or 0xFF", cur, prev)
	end
end
