KingofGamesYami, on 29 November 2014 - 07:23 PM, said:
Rougeminner, on 29 November 2014 - 06:57 PM, said:
Rougeminner, on 29 November 2014 - 06:57 PM, said:
Rougeminner, on 29 November 2014 - 06:57 PM, said:
input2 = base64.encode( AES.encrypt( "XXX", input2 ) ) rednet.broadcast( input2 )
if event == "rednet_message" then arg2 = AES.decrypt( base64.decrypte( arg2 ) ) print(arg1,',',arg2)
what do you mean event corruption. i still get a java exception thrown error. Almost forgot heres my code
os.loadAPI("apps/aes/framework/AES")
os.loadAPI('Base64')
print("please enter encryption key/salt")
key = read("*")
print("please enter protocol")
input3 = read()
rednet.host("rougeminner",input3)
term.setCursorPos(1,1)
term.clear()
string1 = "Rougeminner Has left this chat "--id was ",os.getComputerID()
rednet.open("left")
rednet.broadcast("Rougeminner has joined the Chat")
running = true
while running do
event,arg1,arg2,arg3 = os.pullEventRaw()
if event == "mouse_click" then
if arg1 == 1 and arg2 == 1 and arg3 == 1 then
running = false
rednet.broadcast(string1)--,os.getComputerID())
else
end
elseif event == "key" then
--print(arg1)
if arg1 == 29 then
rednet.broadcast(string1)
term.setCursorPos(1,1)
term.clear()
running = false
end
elseif event == "rednet_message" then
arg2 = Base64.decode(AES.decrypt(key,arg2))
print('ID: ',arg1," message ",arg2)
elseif arg2 == nil then
--print("please enter ID")input1 = read()
--term.setCursorPos(1,17)
--term.setCursorPos(1,10)
print("Enter Message")input2 = read()
--print("please Enter Protocol") input3 = read()
--h = tonumber(input3)
--rednet.broadcast(input2,"TCP1")--input3)
--if input2:sub(1,1) == "/" then
--print("Commands are: /List , /leave , /clear")
if input2 == "/clear" then
term.clear()
term.setCursorPos(1,1)
elseif input2 == "/help" then
print("commands are /help , /clear , and you can press left control to leave along with clicking a cords X1,Y1")
elseif input2 == "/List" or input2 == "/list" then
list = rednet.lookup(input3)
print(list)
--rednet.lookup(input3))
--elseif input2 == "/msg" then
--print("Enter ID")input1 = read()
--input1 = 18--"hi there"
--num = tonumber(input1)
--print("Enter Message") input2 = read()
--print(input1)
--rednet.send(input1,input2,input3)
--end
--elseif input2 == "/leave" then
--input3 = read()
--rednet.broadcast(string1)
--rednet.host("rougeminner's cell",input3)
--elseif input2 == not(nil) then
--rednet.broadcast(input2,input3)
--print("<ME>:",input2)
else
rednet.broadcast(input2,input3)
input2 = Base64.encode(AES.encrypt(key,input2))
print("<ME>:",input2)
end
else
end
end
Yes the code is very unorganized and hard to read right now. i have not had the time to fix with more organized code
Edited by Rougeminner, 30 November 2014 - 01:19 AM.












