1

I'm trying to make a Lua program/script on ComputerCraft that acts like a botnet and pretends to DDoS the target input with the IP at the end randomizing every time.

However, currently I get an error that says I attempt to call a number. What's the problem with my code?

-- Written By 47
print("Enter Target:")
target = read() -- Target Name Input 
data = math.random(50,900) -- Generates Random Number
n1 = math.random(1,99)
n2 = math.random(0,255)
n3 = math.random(0,255)
n4 = math.random(0,255)
ip = print(n1 .. ".")(n2 .. ".")(n3 .. ".")(n4 .. ".")
print("Attacking" .. target .. " with " .. data ..  "GBs from" .. ip)
pppery
  • 3,731
  • 22
  • 33
  • 46

1 Answers1

3

I think you need this

ip = n1 .. "." .. n2 .. "." .. n3 .. "." .. n4 .. "."
lhf
  • 70,581
  • 9
  • 108
  • 149