Posted 04 November 2016 - 01:27 AM
How to easily anonymize yourself in CC.
​Disclaimer: This is not meant to be used maliciously. Sure, I'm using the way you program in Lua to my advantage here, but seriously.
Already, you might be asking, why do I need this? How would I use this? How could it help me? And all that jazz, but just to answer all of these questions I've used for an example:
- Anonymizing your network traffic. (sender = 0, receiver = 0)
- Research, maybe even to see what your server clients are up to just in case there is something fishy going on.
- [offtopic]nsa stuff :(/> boooo[/offtopic]
So, how do I do this?
Well, it's actually pretty simple. You can use Lua to its advantage and overwrite existing functions. Kinda scary when you look at it, but it can be useful sometimes.
First off, we are going to get our ID. You can do this by the following:
--variant 1
oldID = os.getComputerID() --call the function and store whatever is returned in a variable
--variant 2
oldID = os.getComputerID --make a variable and copy os.getComputerID to it
Once you got one of them in your code, you can now anonymize yourself, then revert back when you need to!
How do you anonymize yourself? Well, remember how I said I'm using Lua to it's advantage…
function os.getComputerID() --were giving it an already existing variable in a table so it overwrites that variable
return 0 --or whatever id you prefer
end
Put two and two together, and we could make a little program!
local oldID = os.getComputerID --copy the old function into a local variable so we can restore it, note that there are no ()!
print("Anonymizing the computer...")
function os.getComputerID() --override variable
return 0 --thats now our id to computer software
end
print("Done! Your ID is " .. os.getComputerID() .. "!")
print("Press any key to de-anonymize.")
read()
os.getComputerID = oldID --note that there is no ()
print("Your computer ID has been reverted to " .. os.getComputerID() .. "!")
Use multishell with that program with a rednet messenger that uses ID's and your set.
For example, run this string in a server computer that you didn't anonymize and you got the ID of it:
rednet.open( put in your modem side here ); local i,m = rednet.recieve(); print(i .. ": "..m)
What that does is it opens a modem on the side you put it to, then you tell the computer "Wait until somebody says something to you" and it will wait until a message is intercepted by the computer. It will then print the ID of the sender and the contents.Use that with our little anonymizer thingy and this will come out when you send a message to the computer
"(id you set the anonymized computer to, maybe 0): (your message, maybe a hello world)"
If you didnt modify the ID and you sent a hello world then your output would be this:
"0: Hello world!"
How does this work?
Well, we overwrite os.getComputerID which gives us the ID of the computer with our own function to return a custom ID.
So, to EVERYBODY on rednet or something now knows you as 0 or 1 or 6 or something. It gets even messier when there are multiple computers with the same ID on rednet. (there are 5 computers, all with the ID of 1)
I hope I explained that well, I just kinda wrote how I thought it worked, then made it as non-techy as possible.
Why does this work?
Because of the way Lua is programmed, putting a variable into function is now a function. Want the OS api to be a function?
function os()print("hey");end
Done!Plus, from the majority of program's I've seen that use rednet don't cache the ID's, or so I thought.
Anyways, I'm going to end it off here, and what makes it worse is that I don't know how to end of these kinds of things, so thanks for reading?!?!?!?
(just to let you know, to me this was a bad way of describing what im doing and all of that, so either way any criticism is accepted but it already is accepted idk why i am still writing k bye)