This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Cloud Ninja's profile picture

Code Overhaulers

Started by Cloud Ninja, 15 May 2016 - 03:17 AM
Cloud Ninja #1
Posted 15 May 2016 - 05:17 AM
Me and my friend recently overhauled a program that got a bit of attention, BlueBank.

Since it got some traction, we took a look and noticed a lot of security issues.



Well, enough of that, thats where we came in

Not only did we overhaul his code, we want to do the same. Have a program that needs some tweaking? Come to us with a pastebin for it and we'll take a look!

(no one that's made major programs before should be posting here. Looking at you DannySMC95)

We will also NOT overhaul malicious code!

Previous attempts at overhauls

Spoiler

BlueBank


Previous code:


Admin: JZSSNS1N
Client: R4wwr3dY
Server: gSeZT7Re

New Code:


Server: i0ZscG8h
Client/Admin Combo: 2BCqWa2c


installer: pastebin run xRXts4yM <client/server>

Credits

Gui and minor programming CloudNinja

Main Programming and Overhaul Scoopta




You can also make donations to us via Krist using my krist addresses found in my signature. If you would like, please leave a note with your address and amount and i'll make a hall of fame for donations
Edited on 17 May 2016 - 12:32 AM
HDeffo #2
Posted 15 May 2016 - 03:45 PM
Not so much needing anything overhauled but I would love to help you guys in this project. Happen to need another overhauler on your team?
TrumpetMiner #3
Posted 16 May 2016 - 11:38 PM
I will definitely need your help in future projects. Thanks for helping out with BlueBank.
Cloud Ninja #4
Posted 17 May 2016 - 02:15 AM
I will definitely need your help in future projects. Thanks for helping out with BlueBank.
No problem man. The way you had it set up was in a way that it could very well be used on servers, and as a non-plugin form of economy, which is kinda scary seeing as how bad the security was (no hurt feelings hopefully) and how extensive it was.
Scoopta #5
Posted 17 May 2016 - 02:16 AM
Not so much needing anything overhauled but I would love to help you guys in this project. Happen to need another overhauler on your team?
Do you have any code of yours we could take a look at? I'm just trying to get a feel for your programming experience.
HDeffo #6
Posted 17 May 2016 - 01:14 PM
Not a problem at all. Most of the time I don't post programs to the forums and just hoard them for myself so not really much of my stuff on here.

switch statement
local function switch(vInput) --#our function magic at work
return function(tCases)
  local sent = vInput
  if type(vInput) == "string" then
   for k,v in next, tCases do
		if type(k)=="string" then
		 local s, e = vInput:find(k)
		 if s==1 and e==#vInput then
		  vInput = k
		  break
		 end
		end
   end
  end
  if tCases[vInput] then
   tCases[vInput](sent)
  elseif tCases["_"..type(vInput)] then
   tCases["_"..type(vInput)](sent)
  elseif tCases._default then
   tCases._default(sent)
  end
end
end

Tortoise API

Daemon API

Virus Arena(game not malicious)

command pocket computers

[WIP] image compression
DannySMc #7
Posted 17 May 2016 - 01:56 PM
(no one that's made major programs before should be posting here. Looking at you DannySMC95)


Well thank you I guess haha :P/>
MrScamander #8
Posted 17 May 2016 - 03:42 PM
Help me with this. It sais no server configured
Cloud Ninja #9
Posted 17 May 2016 - 09:10 PM
Help me with this. It sais no server configured
on the client computer, type edit .server and put the ID of the server there.

(no one that's made major programs before should be posting here. Looking at you DannySMC95)


Well thank you I guess haha :P/>
You know too much to be asking me for help Danny.
DannySMc #10
Posted 17 May 2016 - 09:41 PM
Help me with this. It sais no server configured
on the client computer, type edit .server and put the ID of the server there.

(no one that's made major programs before should be posting here. Looking at you DannySMC95)


Well thank you I guess haha :P/>/>
You know too much to be asking me for help Danny.

Well I'm honoured but you never know, there are a few things I'm not so good at :P/>
TrumpetMiner #11
Posted 17 May 2016 - 10:46 PM
I will definitely need your help in future projects. Thanks for helping out with BlueBank.
No problem man. The way you had it set up was in a way that it could very well be used on servers, and as a non-plugin form of economy, which is kinda scary seeing as how bad the security was (no hurt feelings hopefully) and how extensive it was.

Yeah I'm not too good with security. I don't really understand modem API very well.
Scoopta #12
Posted 18 May 2016 - 01:38 AM
I will definitely need your help in future projects. Thanks for helping out with BlueBank.
No problem man. The way you had it set up was in a way that it could very well be used on servers, and as a non-plugin form of economy, which is kinda scary seeing as how bad the security was (no hurt feelings hopefully) and how extensive it was.

Yeah I'm not too good with security. I don't really understand modem API very well.
If you need me to explain anything to you about how the modem API and such work just let me know.

Help me with this. It sais no server configured
Ideally you should be getting the software from the original bluebank post since I explained how to configure everything there. Make a file called .server on the client and put the server's ID inside it. That will fix your problem. To configure the initial admin make a directory named admin on the server and put an emtpy file named the user's username inside. I.e. /admin/Scoopta would make me an admin. Once you have the first admin configured they can modify the permissions of all other users through the client software.

Help me with this. It sais no server configured
on the client computer, type edit .server and put the ID of the server there.

(no one that's made major programs before should be posting here. Looking at you DannySMC95)


Well thank you I guess haha :P/>/>/>
You know too much to be asking me for help Danny.
Cloud there aren't many people who would ever find it useful to ask you for help. =P.
Edited on 17 May 2016 - 11:40 PM
Scoopta #13
Posted 18 May 2016 - 04:27 AM
Not a problem at all. Most of the time I don't post programs to the forums and just hoard them for myself so not really much of my stuff on here.

switch statement
local function switch(vInput) --#our function magic at work
return function(tCases)
  local sent = vInput
  if type(vInput) == "string" then
   for k,v in next, tCases do
		if type(k)=="string" then
		 local s, e = vInput:find(k)
		 if s==1 and e==#vInput then
		  vInput = k
		  break
		 end
		end
   end
  end
  if tCases[vInput] then
   tCases[vInput](sent)
  elseif tCases["_"..type(vInput)] then
   tCases["_"..type(vInput)](sent)
  elseif tCases._default then
   tCases._default(sent)
  end
end
end

Tortoise API

Daemon API

Virus Arena(game not malicious)

command pocket computers

[WIP] image compression
Your code is good. Honestly it's probably better than my own. If you want to help with our projects I wouldn't mind.
Edited on 18 May 2016 - 02:28 AM
HDeffo #14
Posted 18 May 2016 - 01:41 PM
Sweet I would love to :D/>
KingofGamesYami #15
Posted 18 May 2016 - 04:17 PM
You could update this to not teleport the player. I think someone mentioned it's easier to get the location of a player in 1.8, and I heard you could teleport an armor stand or something.
FoxData #16
Posted 18 May 2016 - 05:58 PM
Can you please overhaul the antivirus: http://www.computercraft.info/forums2/index.php?/topic/25662-fox-anti-virus-101/page__fromsearch__1
Scoopta #17
Posted 18 May 2016 - 09:02 PM
You could update this to not teleport the player. I think someone mentioned it's easier to get the location of a player in 1.8, and I heard you could teleport an armor stand or something.
Is that all you want me to do?
Cloud Ninja #18
Posted 18 May 2016 - 09:12 PM
Can you please overhaul the antivirus: http://www.computerc...__fromsearch__1
I could try to do something. Let me see what i can do.
KingofGamesYami #19
Posted 18 May 2016 - 09:32 PM
You could update this to not teleport the player. I think someone mentioned it's easier to get the location of a player in 1.8, and I heard you could teleport an armor stand or something.
Is that all you want me to do?

Hey, make whatever improvements you want. I just thought that'd be a good program which I'll never get around to updating.
Scoopta #20
Posted 18 May 2016 - 09:45 PM
You could update this to not teleport the player. I think someone mentioned it's easier to get the location of a player in 1.8, and I heard you could teleport an armor stand or something.
Is that all you want me to do?

Hey, make whatever improvements you want. I just thought that'd be a good program which I'll never get around to updating.
Alright haha. I've got the location without teleporting the player mostly figured out. It won't work if there is more than one armor stand in the world but that'll be an easy fix.