Jul 162015
 

I recently had a thought…I wonder if Zabbix can graph the fuel prices near me.
This thought was triggered by a news article I read about how the petrol station cycles have changed so that the cheapest fuel is on a Monday rather than a Wednesday like it used to be.
Continue reading »

Share
Jul 092015
 

So after poking around with the bootloader, I decided to go look for the stock firmware to see if I could upload that with some modifications so I could play around with the stock system.

After a night of Googling, I couldn’t find any links to the original firmware. I tried to discover if I could download the firmware from the NAS, but that didn’t get me anywhere either. All the Googling did point me in the direction of SnakeOS however, which is replacement firmware for some NASes. However, it hadn’t been maintained in quite a few years so I was initially a bit hesitant.
Continue reading »

Share
Jul 062015
 

I received my USB to TTL adapter today, so decided to have a look at the NAS and see if I could get root access to it.

The Serial console is actually under where the drive is, so I’ve gotten access to it from the bottom as there’s some plastic between where the drive goes and the port itself.

NAS Connected via Serial

NAS Connected via Serial

As you can see from the picture, I’ve stuck some jumper cords into the serial console port. The Yellow wire is actually the white wire on my USB->TTL converter, the green is still green, and black is still black. With the jumper leads plugged in, I turned the NAS On with screen listening on /dev/ttyUSB0 with a baud rate of 38400.
Continue reading »

Share
Jul 022015
 

I’ve just started working with Powershell recently and wanted to create a CSV file from scratch.
I thought it’d be as simple as piping a string to Export-CSV, however Export-CSV only takes objects.
This meant that I had to create my own objects to then dump into Export-CSV.
This wasn’t immediately obvious to me initially, as I’ve little experience with Powershell, but since I’ve worked out how to do it, I’m going to document it here for reference.


$csvContents = @() # Create the empty array that will eventually be the CSV file

$row = New-Object System.Object # Create an object to append to the array
$row | Add-Member -MemberType NoteProperty -Name "User" -Value "John Doe" # create a property called User. This will be the User column
$row | Add-Member -MemberType NoteProperty -Name "UserID" -Value "JD01" # create a property called UserID. This will be the UserID column
$row | Add-Member -MemberType NoteProperty -Name "PC" -Value "PC01" # create a property called PC. This will be the PC column

$csvContents += $row # append the new data to the array

$csvContents | Export-CSV -Path C:\tmp\user.csv

The code above will result in the following output

#TYPE System.Object
"UserName","UserID","PC"
"John Doe","JD01","PC01"

Share