Jump to content




[1.33][SMP] Rednet DDoS


14 replies to this topic

#1 G3R4RD

  • Members
  • 25 posts

Posted 08 May 2012 - 12:03 AM

Hello World.

In a Server we have a next problem: people make a script which is spamming rednet broadcast. It looks not a problem, but it is.
ComputerCraft is crashing and Terminals/Turtles are crashing in the whole server.

Maybe there should be a time-out or something, because this is pretty annoying.

Thank's for reading,
Gerard.

#2 libraryaddict

  • New Members
  • 195 posts

Posted 10 May 2012 - 07:35 AM

There is always going to be abuse.
This is just the next generation of spam.

Why not edit rednet and add a program to it.
If this message has been repeated 5times in 1 second. Then error("Please stop spamming rednet")

#3 ComputerCraftFan11

  • Members
  • 771 posts
  • LocationHawaii

Posted 11 May 2012 - 02:44 AM

View Postlibraryaddict, on 10 May 2012 - 07:35 AM, said:

There is always going to be abuse.
This is just the next generation of spam.

Why not edit rednet and add a program to it.
If this message has been repeated 5times in 1 second. Then error("Please stop spamming rednet")

That will do the same thing: crash it.

You can try this:
while true do
   sleep(0) --Stops crashing
   --your code
end


#4 BigSHinyToys

  • Members
  • 1,001 posts

Posted 11 May 2012 - 03:13 AM

find the source and detonate it. It is broadcasting so you know its ID and how far from a terminal it is.

write a program on a turtle that turns rednet on for 1 sec then off again (so it don't crash). Make the turtle move and then check if it is closer or further away from the computer ID.if further away then move in the opsite direction X2 eventual the turtle should stumble near the transmitter and you can turn it off / destroy it.

#5 G3R4RD

  • Members
  • 25 posts

Posted 11 May 2012 - 07:12 PM

View PostBigSHinyToys, on 11 May 2012 - 03:13 AM, said:

find the source and detonate it. It is broadcasting so you know its ID and how far from a terminal it is.

write a program on a turtle that turns rednet on for 1 sec then off again (so it don't crash). Make the turtle move and then check if it is closer or further away from the computer ID.if further away then move in the opsite direction X2 eventual the turtle should stumble near the transmitter and you can turn it off / destroy it.

And what if ComputerCraft is crashed, he can't create a new thread or the server is crashed? :)/>

#6 cant_delete_account

  • Members
  • 484 posts

Posted 11 May 2012 - 11:52 PM

It's possible if you edit the rom/apis/rednet and check if the person sends more than like 4 messages in 1-3 seconds then exit their program if they did.

#7 ComputerCraftFan11

  • Members
  • 771 posts
  • LocationHawaii

Posted 12 May 2012 - 05:37 AM

View Postthesbros, on 11 May 2012 - 11:52 PM, said:

It's possible if you edit the rom/apis/rednet and check if the person sends more than like 4 messages in 1-3 seconds then exit their program if they did.

Unless they put it in startup and reboot if it exits.

#8 Teraminer

  • New Members
  • 175 posts
  • LocationDon't look behind you..

Posted 12 May 2012 - 11:48 AM

Just find the id and got to your servers programs and delete the program(s), or tell the owner to..

#9 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 12 May 2012 - 02:14 PM

View PostComputerCraftFan11, on 12 May 2012 - 05:37 AM, said:

View Postthesbros, on 11 May 2012 - 11:52 PM, said:

It's possible if you edit the rom/apis/rednet and check if the person sends more than like 4 messages in 1-3 seconds then exit their program if they did.

Unless they put it in startup and reboot if it exits.
sleep(1) in bios.lua
:P/>

#10 ComputerCraftFan11

  • Members
  • 771 posts
  • LocationHawaii

Posted 12 May 2012 - 05:20 PM

View PostTeraminer, on 12 May 2012 - 11:48 AM, said:

Just find the id and got to your servers programs and delete the program(s), or tell the owner to..

Put it in a disk :D/>

View Postabc, on 12 May 2012 - 02:14 PM, said:

View PostComputerCraftFan11, on 12 May 2012 - 05:37 AM, said:

View Postthesbros, on 11 May 2012 - 11:52 PM, said:

It's possible if you edit the rom/apis/rednet and check if the person sends more than like 4 messages in 1-3 seconds then exit their program if they did.

Unless they put it in startup and reboot if it exits.
sleep(1) in bios.lua
:P/>
That would make the computers lag.... ALOT (especially for global Multiplayer games)

#11 Teraminer

  • New Members
  • 175 posts
  • LocationDon't look behind you..

Posted 12 May 2012 - 07:07 PM

delete the disk.. :P/>

#12 ComputerCraftFan11

  • Members
  • 771 posts
  • LocationHawaii

Posted 12 May 2012 - 07:09 PM

View PostTeraminer, on 12 May 2012 - 07:07 PM, said:

delete the disk.. :D/>

How would they know what disk it is? :P/>

#13 ComputerCraftFan11

  • Members
  • 771 posts
  • LocationHawaii

Posted 12 May 2012 - 07:16 PM

People can also disguise the program, like this:
local x,y = term.getSize()
rednet.open("top")
title = "Rednet Explorer 2.0" --Add title = "name" to change the webpage's title!
local website = "home";
if fs.exists(".cache") then fs.delete(".cache") end
fs.makeDir(".cache")
local cPrint = function(text)
local x2,y2 = term.getCursorPos()
term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2)

print(text)
end
search = function(message)
while true do
  sleep(0)
  rednet.broadcast(message) --Search for that message
end
end
function createSite(websitename)
	 cPrint("Hosting " ..websitename.. "...n")
	 test = fs.open(websitename, "r")
	 fileContents = test:readAll()
	 test.close()
	 while true do
	  sleep(0)
	  id, message = rednet.receive()
	  if message == websitename then
	   print("[" ..os.time().."] [" ..id.. "] Pinged Website.")
	   rednet.send(id, fileContents)
	   print("[" ..os.time().."] [" ..id.. "] Received Data")
	  end
	 end
end
local Address = function()
text = "rdnt://"
term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), 2)
term.clearLine()

write("rdnt://")
website = read()
loadWebpage()
end
function done()
term.setCursorPos(1, y)
name = "F5 = Refresh"
write("Press CTRL to travel the web! :P/>/>")
term.setCursorPos(x - name:len(), y)
write(name)

while true do
  sleep(0) -- stop crashing
  e, k = os.pullEvent("key")
  if k == 63 then
   loadWebpage()
   break
  else
   Address()
   break
  end
end
end
loadWebpage = function()
term.clear()
term.setCursorPos(1,1)
cPrint(title)
cPrint("rdnt://" ..website.. "n")
if website == "home" then
  print("Welcome to RedNet explorer (2.0)! This requires you to have a wireless modem on your computer.")
  print("Host a website at:			    ")
  print("rdnt://newsite!		    ")
  print("   -ComputerCraftFan11    ")
elseif website == "newsite" then
  title = "Rednet Servers (2.0)"
  print("Are you sure you would like to make this PC a server?")
  cPrint("Y = Yes N = No")
  while true do
   e, k = os.pullEvent("char")
   if k == "y" or k == "n" then
    break
   end
  end
 
  if k == "y" then
   term.clear()
   term.setCursorPos(1,1)
   print("Welcome to the Rednet Servers. Please enter the website name: ")
   websitename = read()
   rednet.broadcast(websitename)
   i, me = rednet.receive(0.001)
   if me == nil then
    print("Thank you! This website will be running off of the file:n" ..websitename.. "n")
    write("Are you sure? (Y = Continue, V = Edit)")
    input = read()
    if input == "Y" or input == "y" then
	 if fs.exists(websitename) == false then
	  print("Please create " ..websitename.. " first!")
	  sleep(0.5)
	  shell.run("edit", websitename)
	 end
	 term.clear()
	 term.setCursorPos(1,1)
	 createSite(websitename)
    elseif input == "V" or input == "v" then
	 shell.run("edit", websitename)
	 term.clear()
	 term.setCursorPos(1,1)
	 createSite(websitename)
    end
   else
    print("I'm sorry, this domain name is taken.")
   end
  end
else
  title = "Rednet Explorer 2.0"
  rednet.broadcast(website)
  print("Connecting...")
  id, message = rednet.receive(0.1)
  if message == nil then
   print("Unable to load webpage.")
   search("Loading " ..website.. " failed.")
  else
   if fs.exists(".cache/" ..website) then fs.delete(".cache/" ..website) end
   webpage = fs.open(".cache/" ..website, "w")
   webpage.write(message)
   webpage.close()
   term.clear()
   term.setCursorPos(1,1)
   cPrint("Rednet Explorer 2.0")
   cPrint("rdnt://" ..website.. "n")
   shell.run(".cache/" ..website)
  end
end

done()
end
loadWebpage()
Activate it by typing anything in the address bar.

Or this:
local x1, y1 = term.getSize() --Returns the size of your terminal
local char = ">" --Stores your character direction
local currentX = 1 --Saves the current X of the cursor
local currentY = 1 --Saves the current Y of the cursor

function newObject(oX, oY, title)
if oX - currentX < x then
  term.setCursorPos(oX- currentX, oY- currentY)
  write(title)
  if oX- currentX == x/2 and oY- currentY == y/2 then
   if char == "v" then --up
	    currentY = currentY -1
   elseif char == "^" then --down
		 currentY = currentY +1
   elseif char == ">" then --left
		 currentX = currentX -1
   elseif char == "<" then --right
		  currentX = currentX +1
   end
 
   drawCursor()
  end
end
function world()
  --Put code for the world in here.
  --Ex)
  newObject(5,5, "O")
end
function drawCursor()
  term.clear() --Clears the screen
  world() --Draws the world
  term.setCursorPos(x1/2, y1/2)  --Draws a cursor at the current X/Y
  write(char)
end
while true do
  drawCursor()
  sleep(0)
  local e,key = os.pullEvent()
  if e == "key" then
   if key == 17 or key == 200 then --up
	 currentY = currentY -1
	 char = "^" --Change your direction to face up
	 rednet.broadcast("ServerConnected:UP")
   elseif key == 31 or key == 208 then --down
	 currentY = currentY +1
	 char = "v" --Change your direction to face down
	 rednet.broadcast("ServerConnected:DOWN")
   elseif key == 203 or key == 30 then --left
	 currentX = currentX -1
	 char = "<" --Change your direction to face left
	 rednet.broadcast("ServerConnected:LEFT")
    elseif key == 205 or key == 32 then --right
	 currentX = currentX +1
	 char = ">" --Change your direction to face right
	 rednet.broadcast("ServerConnected:RIGHT")
    end
end

rednet.broadcast("ServerConnected:ON")
end
It looks like a game, but it broadcasts in the background.

#14 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 12 May 2012 - 10:49 PM

We don't need any more examples. We know about the bug, that should be enough.

#15 Teraminer

  • New Members
  • 175 posts
  • LocationDon't look behind you..

Posted 15 May 2012 - 02:39 PM

You are right you can't tell which is the disk you want to delete... :P/>





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users