Jump to content

System and Hardware clock/time


secureonelabs

Recommended Posts

I may be overlooking something very obvious here. Anyone else having issues "permanently" setting the system or hardware clocks? because ntp only works when there is internet connection, I can't rely on it. I can set the time manually while logged on via serial or ssh, but as soon as the bashbunny is rebooted or recycled, it reverts back to 1969. I'm writing custom scripts and need to set the correct datetime in my log files. 

# This sets the timezone

# dpkg-reconfigure tzdata

 

# This sets the date

# date --set 2017-03-09

 

# This sets the time

# date --set 01:32:00

 

# This is supposed to sync the hardware clock to the system clock, which it does when you run it, but disappears when bashbunny is restarted

# hwclock --systohc

Any help would be greatly appreciated. 

Cheers

Link to comment
Share on other sites

Hi Secureonelabs,

The answer is simply that the system doesn't have a RTC. Even if it did, as the device doesn't have a battery on board, it cannot keep the clock running. I am rolling in a small hack we use on the Pineapple: On system start, take a look at files on the system and set the system's time to the last changed time of these files. While that's not a totally accurate time, it fixes a lot of issues.

If you need accurate log times inside your payloads, you'll need to find a way to relay the correct time back to the Bunny. 

Link to comment
Share on other sites

  • 11 months later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...