Monday, July 24, 2017

How to cut a field from csv file using bash

How to cut a field from csv file using bash 

Example :
cat mycsv.csv | cut -d ',' -f3


cat mycsv.csv | cut -d "," -f3 | sort | uniq -c | sort -rn | head

 


Monday, May 15, 2017

How to Disable Ports 445, 139 and 3389 , Protect your system from wannacy attack

How to Disable Ports 445, 139 and 3389 , Protect your system from wannacy attack


 Run the following  command in cmd (run as administrator).


netsh advfirewall firewall add rule dir=in action=block protocol=TCP localport=135 name="Block_TCP-135"
 
netsh advfirewall firewall add rule dir=in action=block protocol=TCP localport=445 name="Block_TCP-445" 


netsh advfirewall firewall add rule dir=in action=block protocol=TCP localport=3389 name="Block_TCP-3389"
 
 
 

How to Disable SMB Service in Windows and Protect your system from wannacry virus

How to Disable  SMB Service in Windows and Protect your system from wannacry virus


How to Disable SMBv1 support

The wannacry vulnerability can  be closed by completely disabling SMBv1 support. Run the following  command in cmd (run as administrator).

dism /online /norestart /disable-feature /featurename:SMB1Protocol

This will permanently disable SMBv1


For enabling just change the disable-future to enable-future

Tuesday, March 14, 2017

How to Install GUI in Ubuntu Server

How to install GUI in Ubuntu Server

You can install the default Ubuntu desktop by executing the following:

sudo apt-get install ubuntu-desktop

There are many desktop alternatives which you may install and use, like:

    Gnome 3 installation: sudo apt-get install gnome-shell
    XFCE installation: sudo apt-get install xfce4
    LXDE installation: sudo apt-get install lxde

    KDE see Kubuntu installation: sudo apt-get install kubuntu-desktop
    Openbox installation: sudo apt-get install openbox
 
    Another good GUI : sudo apt-get install gnome-session-fallback