0

I am trying to make a parental control program that will prevent using the computer after 11:00 PM, but to make sure it won't get bypassed I would either have to use an external time monitoring source than the local time (on the computer)... So I was wondering if it was possible to request the timedate from my router, I did some research but I couldn't find anything (My router is a D-Link one).

So I jumped to the conclusion that I would have to disable time changing. Is there any way(s) to do this? Such as revoking "SeSetSystemTime" permission?

tshepang
  • 12,111
  • 21
  • 91
  • 136
peelz
  • 2,820
  • 2
  • 17
  • 16

4 Answers4

0

Why would you want to get it of your router?

Just get it from a timeserver :) The protocol is NTP.

Check this question for a good start: How to Query an NTP Server using C#?

Community
  • 1
  • 1
Gerald Versluis
  • 30,492
  • 6
  • 73
  • 100
  • The internet access is blocked after 11PM using a firewall rule on the router, no communication to any IP will be allowed after that time. Because of that, I can't really query a timeserver when the firewall rule activates. – peelz Aug 07 '12 at 14:31
0

If your router sets cookies while interacting through the HTTP protocol, then you could use that info. Otherwise, there is no other way (if you are without internet).

But, for a case, think of taking timestamp each minute and if the time was changed, save the changes into the list of time changes to keep the orginal time being reached through the addition and subtraction time changes.

AgentFire
  • 8,944
  • 8
  • 43
  • 90
  • The timestamp idea looks interresting. I might try it if there isn't any better solution. – peelz Aug 07 '12 at 14:38
0

You could use an Internet Time Server, code for querying these servers could be easily found.

For example look at this

http://www.codeproject.com/Articles/5972/Daytime-Internet-Time-Service-Class

Steve
  • 213,761
  • 22
  • 232
  • 286
  • As I said in a comment to Gerald Versluis's post, the internet access is blocked after 11pm. – peelz Aug 07 '12 at 14:37
0

As a side note: A "guardian" software, no matter how sophisticated cannot replace parenting :)

On the issue: If you are targeting Win7 you can prevent users from changing the system time and I think is should be possible for all windows versions down to at least XP

Dominik
  • 3,342
  • 1
  • 17
  • 24
  • Is there any way to do this via a code? Can I just edit the permissions to prevent modifying the system time and make every account as "Limited" so they can't revert it? – peelz Aug 07 '12 at 14:33
  • Checkout http://stackoverflow.com/questions/981010/how-do-i-configure-group-policy-using-c user accounts of the ones you´re trying to monitor shouldn´t have elevated priveleges at all, otherwise your efforts are pointless. – Dominik Aug 07 '12 at 15:02