Jump to content




Security Suite V2.1.2 PDA Support For Remote Control

utility computer

77 replies to this topic

#61 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 06 April 2015 - 12:31 AM

View PostTheEisbaer, on 05 April 2015 - 02:08 PM, said:

On FTB Infinity the OpenPDetect program throws an error in line 363, it's because they changed getPlayerNames() to getPlayers() and the UUID is maybe messing it up too.

I kinda fixed it:
function checkScanner()
	allowPlayer = false
denyPlayer = false
	nearbyPlayers = Sensor.getPlayerNames()
if nearbyPlayers then

for i=1,#nearbyPlayers do
tempname=nearbyPlayers[i]

for j=1,#current.settings.WhiteList do
   if current.settings.WhiteList[j]==tempname.name then
	  openSide()
   allowPlayer = true
	else
	  if not allowPlayer then
		openAlarmSide()
	 denyPlayer = true
   end
	end
  end
   end
end
scanPlayers = os.startTimer(0.5)
if denyPlayer or allowPlayer then return true else return false end
end

Maybe a few "end"s are missing but it work for me now :)/>

EDIT: Fancied the code a bit, it now support any number of whitelisted users, thanks to a friend.
http://ideone.com/vQ2B06 for better "tabbing"
EDIT2: Fancied even more

I will look into this issue and update the program with a fix. Due to the license you are not supposed to adjust code to suit your needs, the update should be released tomorrow, I will also fix GUI bugs that are causing issues.

The code you have posted has various vulnerability problems with the new Security Suite that will be released soon, thus this code will not be used in the patch. Thanks for letting me know, youll have a patch for it soon.

Also the code already supported multiple whitelisted players, and I have no idea what you mean by "tabbing", do you mean in the program or as in the browser?

Edited by Hbomb_79, 06 April 2015 - 01:53 AM.


#62 TheEisbaer

  • Members
  • 37 posts

Posted 06 April 2015 - 02:14 AM

By "tabbing" I meant better indent(if thats correct, I am not native english speaking) then my post here in the forums has. About the license, sorry about that I didn't know that. I tried to have it working at least in some way. As for the multiple whitelisted players, I first hardcoded it to two whitelisted players and then changed the code a bit.

Thank you fixing that error and that nice OS.

Edited by TheEisbaer, 06 April 2015 - 02:19 AM.


#63 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 06 April 2015 - 02:24 AM

View PostTheEisbaer, on 06 April 2015 - 02:14 AM, said:

By "tabbing" I meant better indent(if thats correct, I am not native english speaking) then my post here in the forums has. About the license, sorry about that I didn't know that. I tried to have it working at least in some way. As for the multiple whitelisted players, I first hardcoded it to two whitelisted players and then changed the code a bit.

Thank you fixing that error and that nice OS.

Thats fine, Indentation is important (for the looks (except python...)). Thanks for the compliment, the suite will soon allow you to pick your own colors so... yeah. The license can be found in the Documentation directory.

Ill look into version detection so I can run a certain function depending on the version of Open Blocks/Peripherals (I forget :D)

Edited by Hbomb_79, 06 April 2015 - 02:25 AM.


#64 micmou

  • Members
  • 54 posts

Posted 06 April 2015 - 02:29 AM

I know this is gonna sound weird but how bout a port to Open Computers for some reason TPPI 2 Does not have CC and my server has decided to move that direction.


EDIT: Another Suggestion a http based hook to a graphical website to monitor or even control.

Edited by micmou, 06 April 2015 - 02:30 AM.


#65 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 06 April 2015 - 03:47 AM

View Postmicmou, on 06 April 2015 - 02:29 AM, said:

I know this is gonna sound weird but how bout a port to Open Computers for some reason TPPI 2 Does not have CC and my server has decided to move that direction.


EDIT: Another Suggestion a http based hook to a graphical website to monitor or even control.

I haven't messed with OpenComputers, they use Libraries i'm not familiar with, I may look into in the future, but as long as CC is popular, Ill always be part of its community.

What do you mean with a hook to monitor or control? what exactly would it me monitoring?

Edited by Hbomb_79, 06 April 2015 - 03:48 AM.


#66 micmou

  • Members
  • 54 posts

Posted 06 April 2015 - 05:21 AM

View PostHbomb_79, on 06 April 2015 - 03:47 AM, said:

View Postmicmou, on 06 April 2015 - 02:29 AM, said:

I know this is gonna sound weird but how bout a port to Open Computers for some reason TPPI 2 Does not have CC and my server has decided to move that direction.


EDIT: Another Suggestion a http based hook to a graphical website to monitor or even control.

I haven't messed with OpenComputers, they use Libraries i'm not familiar with, I may look into in the future, but as long as CC is popular, Ill always be part of its community.

What do you mean with a hook to monitor or control? what exactly would it me monitoring?


Possibly the reactor or maybe if you implement some other features I suggested before some sort of home automation except in Minecraft. I know CC will always be super popular, but CC isn't in TPPI 2 D: and it is always good to broaden your horizons. A website that can display stuff on a real web browser I have seen it done here before. Just not well...

Edited by micmou, 06 April 2015 - 05:22 AM.


#67 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 06 April 2015 - 06:09 AM

View Postmicmou, on 06 April 2015 - 05:21 AM, said:

View PostHbomb_79, on 06 April 2015 - 03:47 AM, said:

View Postmicmou, on 06 April 2015 - 02:29 AM, said:

I know this is gonna sound weird but how bout a port to Open Computers for some reason TPPI 2 Does not have CC and my server has decided to move that direction.


EDIT: Another Suggestion a http based hook to a graphical website to monitor or even control.

I haven't messed with OpenComputers, they use Libraries i'm not familiar with, I may look into in the future, but as long as CC is popular, Ill always be part of its community.

What do you mean with a hook to monitor or control? what exactly would it me monitoring?


Possibly the reactor or maybe if you implement some other features I suggested before some sort of home automation except in Minecraft. I know CC will always be super popular, but CC isn't in TPPI 2 D: and it is always good to broaden your horizons. A website that can display stuff on a real web browser I have seen it done here before. Just not well...

I love the idea, I just wouldn't know how to get the Data from CC to PHP/website, would you recommend some sort of PHP script that uploads it to MySQL, and from there you can view your profile (logged in) and also stats on connected devices... I have no idea but maybe each CC device can have its own table full of rows containing data that is reloaded live using Ajax.

I have used a lot of Ajax and PHP before, just not with CC, check out my sites here and here

The first link was my first website, and therefore is very basic, although the second one is a private blog (Soon to be a 'replica' of wordpress (basically a public blog))

Thanks for the suggestion, it would be very complicated, but damn awesome! Im sure I can use PHP (like my error reporter) although security would be an issue, I would need some sort of hash to verify the identity of the computer. Maybe you have to create a username and password on the computer and a random hash is created that will be sent with the PHP request, that way when the computer is registered for the first time the HASH will be stored online and therefore must match each time, i'm thinking something like

updateCC.php?ccID=1&ccName=NAME&HASH=4b473138n474md&task=updateReactor&reactorStats="somesort of array containing the information"
im not sure how to send tables from lua over to PHP, maybe a serialised array that I can use PHP to separate into the separate parts, therefore the being able to display them on screen.

The only big problem is how often to update the database, would the database be 'overloaded' if the computer is updating too often, I could have a parallel event that updates the database every 10/20 seconds and then an update button on the site, but if I had 20 computers doing that, would the database and or server host become too busy with the requests and take my site down xD

Ill stack overflow some of the things i've spoken about, thanks for the great suggestion, as usual.

Edited by Hbomb_79, 06 April 2015 - 07:44 AM.


#68 micmou

  • Members
  • 54 posts

Posted 06 April 2015 - 07:21 AM

I love your sig BTW and here is some stuff taking from a thread here should still be relvant

http://www.computerc...s-on-a-website/

CC Code:
local function postScore(nick, score)
http.post(
"http://YourWebsite.whatever/scorepost.php",
"nick="..textutils.urlEncode(tostring(nick)).."&"..
"score="..textutils.urlEncode(tostring(score))
)
end
postScore("TestName", 5982)

PHP, scorepost.php

<?php
if(isset($_POST['nick']) && isset($_POST['score'])){
$nick = urldecode($_POST['nick']);
$score = intval(urldecode($_POST['score']));
//Do stuff with the nick and score here
}
?>


Only issues is figuring out a login system

#69 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 06 April 2015 - 07:55 AM

View Postmicmou, on 06 April 2015 - 07:21 AM, said:

I love your sig BTW and here is some stuff taking from a thread here should still be relvant

http://www.computerc...s-on-a-website/

CC Code:
local function postScore(nick, score)
http.post(
"http://YourWebsite.whatever/scorepost.php",
"nick="..textutils.urlEncode(tostring(nick)).."&"..
"score="..textutils.urlEncode(tostring(score))
)
end
postScore("TestName", 5982)

PHP, scorepost.php

<?php
if(isset($_POST['nick']) && isset($_POST['score'])){
$nick = urldecode($_POST['nick']);
$score = intval(urldecode($_POST['score']));
//Do stuff with the nick and score here
}
?>


Only issues is figuring out a login system

If you clicked the links, then you may have noticed I already have a login system, I would just have the following procdeure:

- User installs program on computers and registers for a HASH (not the site, like internet banking, the app has its own password)
- Once program installed, it creates a random MD5 hash, and it is displayed on screen
- the signup page on the website will request they create a username and password, once created, and verified (using email) they can login and register computers
- Registering a computer will allow the user to specify a computer display name, then they copy the HASH key into the field as well, then, when the computer next sends the information to the site, it will see that the hash belongs to a user and therefore update that users computer details, because a different hash is used per PC and per program, this allows the user to monitor multiple computers.
- when a computer submits data, it will be stored in the computer table with the column HASH containing the computers HASH and a user table telling the system who this computer belongs to, A "type" column will tell the system "hey, this is a computer, not a user settings, put that on that there nice page will ya for peet sake".

Then when the user goes to a url like

"http://stats.harryfelton.web44.net/USERID"

it will display all the registered computers providing they are logged in

The example code you posted, is similar to what I used with my Error Reporter, so im glad were on the same page there (Probably not, I may be somewhere else on the web by now).


Let me know what floors there are with this method and we can work together to bring justice to the streets of... this place! yes.

Edited by Hbomb_79, 06 April 2015 - 08:07 AM.


#70 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 06 April 2015 - 08:22 AM

Well I was making HexAlarm, but I wanna do this now! I am going to start this project and get back to you as it progresses through PM to stop this forum post getting any bigger!

#71 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 06 April 2015 - 11:28 AM

View Postmariodk, on 25 March 2015 - 10:52 AM, said:

is it possible to use this as a player detector?
emit a redstone signel if a player(any player) stays on a block and stop the redstone signel if no player on that block(cant use pressure plate and the modpack i am in dont have secret room mod so no pressure plate as a whole block instead of top of a block)
also is it possible to use this on a server but not as a admin that is able to change the serverĀ“s files but just as a normal player?

You can use the Player Detector from open blocks if you have that mod installed, other than that, without using other mods there is no way short of trip wires

#72 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 07 April 2015 - 04:18 AM

Update 2.2 Progress
(Discontinued - New system to come! Watch my GitHub for more info: https://github.com/h...ab=repositories )
This update is mainly a bug fixer, but it does bring some new features to the table, granted this update is NOT finished, but is approaching complete, so I wanted to fill you guys in:

Things To Come

+ Reactor program will stream its information online
+ Pin lock program will stream incorrect and correct inputs online, allowing you to see when people did/didnt access your base (minecraft world time + server time (PST))
+ Digital lock program will stream incorrect and correct inputs online, much like above.
- Removed alias for element API
* Fixed graphical bug in reactor program
* Fixed reactor program crashing after a certain amount of time (I think, this one keeps popping up).
+ Security hashing to protect a users online sync information

If you want to stay up to date, or get the inside scoop on these updates, then check this page out.

With the home management system, im not sure how to go about it, I would like to use class like meta objects to make the program modular, so you could create events like so:

- Pick a client (wireless)
- Pick a task (redstone etc.. & side)
- Pick a trigger (redstone, timer)

I would like to have a client have its own events that then informs the master, the event would have a name (like a custom os.queueevent), which would then tell the master to do something.

This may happen, or it may not, we'll just have to see :P
Any suggestions? Let me know, and I will consider them for the next update!

Edited by Hbomb_79, 31 July 2015 - 06:27 AM.


#73 micmou

  • Members
  • 54 posts

Posted 13 April 2015 - 06:53 AM

Kinda an offshot but maybe a turtle that follows you like an umbrella take that sun light usefulness is you allow me outside as I am a witchery vampire also again a feature I will request forever OpenComputers support the move to TPPI2 is going to suck

#74 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 13 April 2015 - 10:00 AM

View Postmicmou, on 13 April 2015 - 06:53 AM, said:

Kinda an offshot but maybe a turtle that follows you like an umbrella take that sun light usefulness is you allow me outside as I am a witchery vampire also again a feature I will request forever OpenComputers support the move to TPPI2 is going to suck

Any further requests wont be addressed until I have finished the web interface, if you want to check the site out, then this is the link:
http://stats.harryfelton.web44.net/

It is not public as yet, so signing up requires an access code, but hopefully the site should be done soon, I am focussing on the looks and adding the functionality later as adding the looks afterwards is very difficult for me when working with PHP, at least this way I can plan the looks and then add the function.

Its going very well currently and hopefully by the end of April the site will be finished, although I will PM you the access code once testing is viable (Hopefully this week)

Edited by Hbomb_79, 13 April 2015 - 10:02 AM.


#75 Rand_Al_Thorn

  • New Members
  • 2 posts

Posted 20 April 2015 - 05:08 PM

I would love to see this program handle big reactor turbines and auto control input output for max efficiency. I love direwolf20's program for this but it dose not support multiple turbine, major issue for my base.

#76 TheEisbaer

  • Members
  • 37 posts

Posted 29 July 2015 - 02:54 PM

Is Update 2.2. still happening?

#77 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 31 July 2015 - 05:58 AM

View PostTheEisbaer, on 29 July 2015 - 02:54 PM, said:

-snip-

The Security Suite is discontinued, although a new system/collection of programs is coming soon! This one will be better than SSP, using a new API and brand new programs.

Keep an eye out on my Github: https://github.com/h...ab=repositories

Edited by Hbomb_79, 31 July 2015 - 06:27 AM.


#78 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 30 August 2015 - 09:24 AM

Fixed a vital bug stopping the setup program from functioning, just had to fix this one before I release my new programs :D





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users