- On Installing Yo http://stackoverflow.com/questions/37296792/error-while-installing-yeoman
- “npm upgrade” on upgrading components
- On adding Cordova https://forum.ionicframework.com/t/unable-to-add-plugins-perhaps-your-version-of-cordova-is-too-old/3807
- Always do “bower install”
- Javascript Books Suggested
Month: May 2016
Packet Analysis with Wireshark on TightVNC
On a previous post, I did tcpdump to do a packet analysis. But tcpdump, albeit powerful, could be hard to handle if you aren’t verse with the commands. So in this blog, I would guide you on how to open your Ubuntu Server in a VNC and install wireshark to do packet analysis there. Wireshark is an advance GUI-based packet analysis tool that would help you analyze packets easier.
1. Do these Commands
sudo apt-get update sudo apt-get install xfce4 xfce4-goodies tightvncserver // insert password vncserver // kill vnc instance vncserver -kill :1 // create a new file nano ~/.vnc/xstartup
2. Insert this text into ~/.vnc/xstartup
#!/bin/bash xrdb $HOME/.Xresources startxfce4 &
3. Create a VNC service file
sudo nano /etc/init.d/vncserver
4. Insert the following snippets
#!/bin/bash
PATH="$PATH:/usr/bin/"
export USER="user"
DISPLAY="1"
DEPTH="16"
GEOMETRY="1024x768"
OPTIONS="-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY} -localhost"
. /lib/lsb/init-functions
This is for starting the service
case "$1" in
start)
log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver ${OPTIONS}"
;;
This is for stopping the service
stop)
log_action_begin_msg "Stopping vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"
;;
This is for restarting the service
restart)
$0 stop
$0 start
;;
esac
exit 0
5. Change the permission and start a new VNC instance
sudo chmod +x /etc/init.d/vncserver
sudo service vncserver start
6. Create an SSH connection on your local computer
ssh -L 5901:127.0.0.1:5901 -N -f -l user server_ip_address
7. Install the TightVNC Software from here and download the Java Viewer.
8. Open tightvnc-jviewer.jar and if you have Java installed, you will have this interface. Connect to localhost with port 5901
9. In the remote desktop, install wireshark
sudo apt-get install wireshark sudo dpkg-reconfigure wireshark-common sudo wireshark