Google Paping

What are the obstacles now?

  1. Windows command prompt ping only can ping port 80
  2. Different command line between Windows and Linux. No cross-platform.
  3. Bad UI designs.

What is Paping?

Paping (pronounced pah ping) is a computer network administration utility used to test the reachability of a host on an Internet Protocol (TCP/IP) network and to measure the time it takes to connect to a specified port. The name is a play on the word ping, another computer network administration utility.

Why use Paping?

  1. Support cross-platform.
  2. Can test and ping certain port of a particular IP address
  3. User-friendly.

Putting Paping as part of the environment path

You can extract the Paping and keep it in program files, and then set the environment path so that you can use the paping command straight away from any path of the command prompt.

xiaoyi2

After that, you can straight away type “paping [IP address] -p [port number]”

 

Where to download?

https://code.google.com/archive/p/paping/

 

Installing Synology NAS on Virtual Machine

Always starts with virtual machine

Let’s us start with installing the Disk Station on virtual machine, before we install it on real hardware. A standard 4-bay Synology NAS could cost more than USD 450 alone, without any hard drive installed. So the idea here is to re-used some of the old PC hardware, and then install the Synology Disk Station on it.

But before we go for a real one, probably the best idea now is to install the Synology Disk Station on a virtual machine. Try it out first before you spend hundred dollars on new hardware.

Preparation

The first step is to select a simple and good virtual machine for the installation. So i decided to pick Virtual Box from Oracle. Simple, easy to configure and use less memory than other virtual machine.

Secondly, we must select the correct version of bootable XPEnology, a compatible Synology Disk Station version and download proper tools for installation.

Virtual Box Version: 5.0.14

XPEnology Bootable version: XPEnoboot_DS3615xs_5.1-5055.1.iso

Disk Station version: DSM_DS3615xs_5055.pat

Surveillance Station version: SurveillanceStation-bromolow-7.0-3762.spk

Installation

First step, install the virtual box 5.0.14 version, other version is acceptable too.

vm1.PNG

vm2.PNG

Second step, create a virtual machine for SynologyNAS

vm3

Choose Linux Operating System, Synology Disk Station basically developed under Linux Platform. and pick Linux 2.4 (64 bit) version. I noticed that the XPEnology bootable won’t work if you pick 32-bit linux version. Some PC might not support 64-bit, You can try to enable the virtualization support in BIOS see if it helps.

vm4

Select at least 2GB ram for Synology Disk Station installation on a virtual machine.

vm5

Create a virtual machine hard disk, allocate at least 20GB for it.

vm6vm7vm8

vm9

Here is the final result.

vm10

Configure the Synology Disk Station virtual machine

Go to settings, and configure the network adapter. Change the network adapter type to “Bridge” instead of NAT”, This step will make your Synology Disk Station connect directly to your router.

vm11

vm12

Choose a virtual optical disk file on the storage tab. pick the XPEnoboot_DS3615xs_5.1-5055.1.iso

vm13vm14

Start the virtual machine, XPEnoboot will load for a few minute, If you can see the login screen means all the steps are correct.

vm15.PNG

From your another PC, access http://find.synology.com, this page will help you to look for new DiskStation within your network.

vm16

Start setting up the Disk Station.

vm17

Choose a manual installation, and then pick the DiskStation file DSM_DS3615xs_5055.pat from your local PC that you downloaded earlier.

vm18.PNG

vm19.PNG

vm20

will need around 10-20 minutes for Synology DiskStation installation.

vm21

If you can’t see find your Synology DiskStation from the http://find.synology.com, then you can try to look for the IP address on your router DHCP device list.

You can manually access the Synology DiskStation with this URL on port 5000,
http://192.168.0.105:5000/

vm22.PNG

Setting up user account

After the installation completed, the next important step is to setup an admin user account.

vm23

vm24

Change the DSM Update Settings to “Download DSM updates but let me choose whether to install them”, don’t pick the automatically option. Because we are going to hack the Surveillance Station later, Synology update will override everything if we picked that.

vm25

After completed the user account, you can login to the DiskStation, you would see the desktop.

vm26

You can try to login using the account that you created earlier on the linux command prompt.

vm27

Done. That’s all.

vm28

 

Cross Table Update with MSSQL & MYSQL – SQL – Programming

At certain conditions, we have to update one table where its column value actually store in another table. A real scenario happened when you have latest product pricing at a table calledproduct_price_latest, and you want to update the latest pricing to your existing table named product_price_current. Both MSSQL & MYSQL able to solve this kind of problem, I will slowly describe how we got to do it one by one.

Databases/Tables

Table : product_price_current
product_id name price
1000 Bicycle 2000
1001 Car 21000
1002 Motorcycle 7000
1003 Boat 45000
Table: product_price_latest
product_id price
1000 2500
1001 18000
1002 12000
1003 74000

Descriptions
so the idea is to replace the current product table price lists with the latest product price list, which located in another table. So after updated, product_id = 1001 (Car)’s price will become 18000, product 1003 (Boat)’s price will become 74000 in product_price_current table.

Comparisons

Conditions MSSQL MYSQL
Updating latest price list for all the products UPDATE ppc
SET ppc.price = ppl.price
FROMproduct_price_current ppc
INNER JOIN
ON ppc.product_id = ppl.product_idproduct_price_latest ppl
UPDATEproduct_price_current ppc
INNER JOINproduct_price_latest ppl
ON ppc.product_id = ppl.product_id
SET ppc.price = ppl.price
Updating latest price list for ‘Car’ only UPDATE ppc
SET ppc.price = ppl.price
FROMproduct_price_current ppc
INNER JOIN
ON ppc.product_id = ppl.product_id
WHERE product_id = 1001product_price_latest ppl
UPDATEproduct_price_current ppc
INNER JOINproduct_price_latest ppl
ON ppc.product_id = ppl.product_id
SET ppc.price = ppl.price
WHERE product_id = 1001
Updating latest price list for all the product, and give 15% discount for all the latest price lists UPDATE ppc
SET ppc.price = ppl.price * 0.75
FROMproduct_price_current ppc
INNER JOIN
ON ppc.product_id = ppl.product_idproduct_price_latest ppl
UPDATEproduct_price_current ppc
INNER JOINproduct_price_latest ppl
ON ppc.product_id = ppl.product_id
SET ppc.price = ppl.price * 0.75
Updating latest price list for all the product, given 15% discount rate for all the items, & adding ‘s’ at last of every product name UPDATE ppc
SET ppc.price = ppl.price * 0.75,
ppc.name = ppc.name + ‘s’
FROMproduct_price_current ppc
INNER JOIN
ON ppc.product_id = ppl.product_idproduct_price_latest ppl
UPDATEproduct_price_current ppc
INNER JOINproduct_price_latest ppl
ON ppc.product_id = ppl.product_id
SET ppc.price = ppl.price * 0.75,
ppc.name = ppc.name + ‘s’

Tracert & Traceroute (WindowsXP + Unix/Linux) – Networking

According to wikipedia, traceroute is a computer network tool used to determine the route taken by packets across an IP network. An IPv6 variant, traceroute6, is also widely available. Mainly use to trace how a data packet goes from one location to another location.

Example : A worker inside a company accessing a web site through his browser. First, data packet will transfer from his PC’s network adapter to his company Internet Router, and from Internet Router to the web page web server. At the middle of it, the particular data packet may pass through several servers/ switches / routers at the middle of the ‘road’. A simple concept is like where we trace how to drive from a location to the other location. It might have shortest or longest way to reach the destination, or passing through extra traffic lights and junctions.

You can try to trace a locations, in order to check how data packet transfer within 2 points.
Windows XP
1. Start > run > type cmd
2. type tracert , eg: tracert http://www.yahoo.com

Unix/Linux Bash
1. Execute linux bash console
2. type traceroute , eg: traceroute http://www.google.com

References
General Knowledge : http://en.wikipedia.org/wiki/Traceroute
TraceRoute Knowlege : http://www.traceroute.org
Tracert for Expert :http://www.windowsnetworking.com/articles_tutorials/Using-Tracert.html

How to switch D’Link CCTV wireless SSID without using a LAN cable

Ok, here i got a more comprehensive solution to switch a D’Link CCTV wireless SSID or change the password without physically touching on the device or using a LAN cable which is tedious job.

This guide is very useful especially for those who would like to change to a new router / or change the wireless password at home/office and their CCTV located at top roof or area that difficult for them to take them off (cctv that use wireless to connected with).

Existing Router = A (192.168.0.1) New Router = B (192.168.2.1)

–Switching the router SSID–

  • Make sure you still can connect to the dlink cctv using existing router A.
  • Look for the IP address of the Dlink cctv at DHCP list (example : 192.168.0.101)
  • Access directly to http://192.168.0.101/, enter username/password.
  • Go to Setup > Wireless Setup.
  • Click on the “Site Survey” button.
  • Select the new router B.
  • Change the “Pre-Shared Key” passsword (Make sure the password is correct or else everything will be screwed up)
  • Restart the dlink cctv by powering it up physically (or restart it at admin page).
  • The dlink cctv should connect to the router B after it being restarted.

–Switching the password of the SSID–

  • Make sure you can dlink cctv wireless setting password first before you change ur router password.
  • Look for the IP address of the Dlink cctv at DHCP list (example : 192.168.0.101)
  • Access directly to http://192.168.0.101/, enter username/password.
  • Go to Setup > Wireless Setup.
  • Change the “Pre-Shared Key” passsword (Make sure the password is correct or else everything will be screwed up)
  • And now go to router A, and change the router A’s wireless password.
  • Restart your router A.
  • Restart the dlink cctv by powering it up physically (or restart it at admin page).
  • The dlink cctv should connect to the router A with new password after it being restarted.