I was build a Web system which is running on Windows and Linux too. It's running through Xampp. In this situation who using this System changing the time simply and add missed data into the system. So i want to track those. For that i was plan to get the real time using a time server. But if that PC doesn't have Internet that will gonna be a problem to get real time. So i need something execute behind of the System which doesn't interact with Windows Time. So i can get the real time. IS there anyway to do it using VB OR Any scripting language ?
If the system in question doesn't have an internet connection, I don't believe there's any way to get the "real" time, just the system time.
So... you want to get an accurate count of 'real time', not system time, without being connected to the internet?
The only thing I can think of is a radio frequency controlled device to correct the time - e.g. http://www.galsys.co.uk/time-receivers/
Normally, if it was connected to the internet, you could get it to read the time off of the internet - e.g. from here http://tycho.usno.navy.mil/timer.html - that could be done on a Linux system by using a bash script, curl or wget, and the date command.
Related
Are there any built-in methods in Electron / Node.js allowing to transfer a file over local network to another device?
I want to be able to send files locally from one computer to another (through an Electron app), but I also want it to be able to send files to smartphones.
How do I do it? Is it possible to just create a temp local server and download the file from another device by opening the URL (e.g. 192.168.0.x:x/file.txt)?
I tried using https://www.npmjs.com/package/quick-transfer which does exactly that, but for some reason opening the link on another device doesn't do anything.
As painful as it is for me to suggest... I'd recommend WebRTC for this, for these reasons:
It will make a local connection, when possible.
It will work over the internet as well, if required.
You can work around any firewall difficulties with TURN.
You will have compatibility with browsers.
You won't be opening up some server to a file that anyone on the network can get... transmission occurs over a secured connection. (This doesn't mean you can ignore other security aspects in your application however!)
Sample code: https://webrtc.github.io/samples/src/content/datachannel/filetransfer/
Commentary: It's amusing to me that in 2018, we still haven't solved the problem of sending a file from point A to point B. Network Neighborhood in Windows was the golden age, and now it's all screwed up with this newfangled cloud crap. :-) Obligatory: https://xkcd.com/949/
I know that there're lots of topics on how js's date() works but I miss one bit. I'm working on a small web app which has a server and clients. Each client may run on Windows or Linux (mac... etc.). The problem is that afaik, if you are a Windows user then, your PC's date will be fetched through a worldclock server, somewhere, it's pbly Microsoft's BUT if you're running Linux, then your date/time are being computed on your computer.
So, does js's date() fetch a date (or time) requesting to a server, just like windows does, or it just looks at a given pc's date, reads it and displays it?
To me this is of great importance as I've a dual-bootable computer and every switch from linux to windows causes time inaccuracy, meaning that I've to take into account clients' wrong date/time if JavaScript reads it from one's pc. Put in other words, does JS's date() fetch the date and time information requesting separate server by giving it location information for the user based on say, IP?
The Date function in the browser just uses the system clock. This is true regardless of operating system.
The system clock may be set manually, via an NTP server, via GPS or mobile phone signal. This is true regardless of operating system.
I've a dual-bootable computer and each switch from linux to windows causes time inaccuracy
This is likely caused by the time zone being incorrectly configured on one or both of your operating system configurations. There is no realistic way to account for that sort of misconfiguration when writing software.
We currently have a web browser application that runs only under Internet explorer that we are trying to make cross browser. The main reason for using IE is that we can access the hardware information from an ActiveX control. We would like to get away from this methodology for obvious reasons.
If we forget about the way things are currently being done and go back to the security requirements and look for other ways to accomplish the same thing. The user of the application must be on a known computer that must be in a secure location. I am at a loss on how to do this.
We currently use Protect/unprotect to encrypt the data we need and guarantee that the file can only be decrypted on the same machine. This keeps the user from finding the file and copying it to another machine and running. The file is put on the computer by a separate installation process that can only be run by authorized personnel.
So how do I get a machine specific key of some type that allows me to identify the computer with no chance of being replicated to another computer?
====================================
We are trying to do exactly what the web is trying to keep us from doing, so this may not be doable without specific browser extensions, such as a ActiveXControl.
The USB response is interesting but it does not guarantee location. We do use USB devices for terminals that require 2 factor authentication.
The other possibility is a user or machine certificate installed in the computer. The problem I see with that is the certificate can be exported. We had tried this years ago and the operational overhead was too high.
Is there a way to detect a wake from hibernation? I am developing an extension that displays information when the user turns on the computer and logs in to the system. I can do that easily by setting the extension to run when the system starts and execute the codes instantly.
background.js
function displayInfo(){ /*...*/ }
displayInfo();
However, some users might not turn off their computer, rather, they would hibernate for faster wake time. Hibernate should still be considered that the user is "turning on" the computer, but currently I have no way of detecting that.
Is there anyway I can achieve that?
No "perfect/foolproof" method, but some an idea:
Record the system time every 5 minutes or so. If the current time is much larger than the expected time, assume it slept/hibernated.
I am building a Time clock application for my employer to use with his employees. One of the requirements is to have it take a photo from a webcam every time a user clocks in and out of the system.
Thankfully this is possible using HTML5 and JavaScript and no longer requires Flash or Silverlight.
The problem however, is in this image below....
Since this application will be used on 1 PC and accessed by a large number of users everyday, this is a real problem for my application.
I hope there is a way to permanently authorize permission to use the camera for certain pages maybe or another alternative?
If your app is running from SSL (https://), this permission will be
persistent. That is, users won't have to grant/deny access every time.
http://www.html5rocks.com/en/tutorials/getusermedia/intro/#toc-security
Note, this only applies in Chrome. Each browser may implement the security prompts differently.