Tag: linux

Linux, Security

Get a list of Open Ports in Linux

netstat – Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. Get a list of open tcp/udp ports sudo netstat -plntusudo netstat -plntu -p = display PID/Program name for sockets -l = display listening server sockets -n = don’t resolve names -t = tcp ports -u = udp ports https://en.wikipedia.org/wiki/Netstat https://linux.die.net/man/8/netstat

Debian

Install owncloud client on Debian

The following guide works for Debian 8.x. Become root sudo su -sudo su – Add owncloud repository echo ‘deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_8.0/ /’ > /etc/apt/sources.list.d/owncloud-client.listecho ‘deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_8.0/ /’ > /etc/apt/sources.list.d/owncloud-client.list Add owncloud repository key wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/Debian_8.0/Release.keywget http://download.opensuse.org/repositories/isv:ownCloud:desktop/Debian_8.0/Release.key apt-key add – > Release.keyapt-key add – > Release.key Update system repositories apt-get updateapt-get update Install owncloud client apt-get install …

Debian

Configure HP All-in-One device on Debian

Install hplip sudo apt-get install hplipsudo apt-get install hplip Run the hp-setup wizard sudo hp-setupsudo hp-setup For Connection Type choose “Network/Ethernet..” If the device is not detected, click “Show advanced options”, tick “Manual discovery” and supply the scanner’s IP address. Detect the scanner scanimage -Lscanimage -L Detect printer Open System Settings->Printers->Add new printer Scan Open …

Debian

Recursively download a directory using smbclient

smbclient — ftp-like client to access SMB/CIFS resources on servers. Download folder smbclient ‘\\server\share’ -U usernamesmbclient ‘\\server\share’ -U username mask "" recurse ON prompt OFF cd ‘/path/to/remote/directory’ lcd ‘/path/to/download/’ mget *mask "" recurse ON prompt OFF cd ‘/path/to/remote/directory’ lcd ‘/path/to/download/’ mget * Options Usage: smbclient service -R, –name-resolve=NAME-RESOLVE-ORDER Use these name resolution services only -M, …

Debian

Open source Video editor for Linux

OpenShot Video Editor is a free, open-source video editor for Linux. OpenShot can take your videos, photos, and music files and help you create the film you have always dreamed of. Easily add sub-titles, transitions, and effects, and then export your film to DVD, YouTube, Vimeo, Xbox 360, and many other common formats. – http://www.openshot.org/ …

Debian

Concatenate two .ogv video files

oggCat concatenates two or more ogg files. The parameters of the resulting ogg file is defined by the first file in the concatenation list. Installation on Debian sudo apt-get install oggvideotoolssudo apt-get install oggvideotools Concatenate two ogv video files oggCat final.ogv 1.ogv 2.ogvoggCat final.ogv 1.ogv 2.ogv Usage usage: oggCat [Options] <outputFile> <inputFile1> <inputFile2> [ <inputFile3> …

Debian, VirtualBox

How to resize a virtualbox VDI disk

Backup VDI file cp "/home/john/VirtualBox VMs/Kali-Linux-2016.2/Kali-Linux-2016.2.vdi" "/home/john/VirtualBox VMs/Kali-Linux-2016.2/Kali-Linux-2016.2.vdi.bak"cp "/home/john/VirtualBox VMs/Kali-Linux-2016.2/Kali-Linux-2016.2.vdi" "/home/john/VirtualBox VMs/Kali-Linux-2016.2/Kali-Linux-2016.2.vdi.bak" Resize the VDI file VBoxManage modifyhd –resizeVBoxManage modifyhd –resize e.g. VBoxManage modifyhd "/home/john/VirtualBox VMs/Kali-Linux-2016.2/Kali-Linux-2016.2.vdi" –resize 51200VBoxManage modifyhd "/home/john/VirtualBox VMs/Kali-Linux-2016.2/Kali-Linux-2016.2.vdi" –resize 51200 Resize the System Partition * Download GParted * Create a new virtual machine, call it “GParted” with type: “Linux” and Version “Linux …

Debian

Record screen in Debian

Install recordmydesktop sudo apt-get install recordmydesktopsudo apt-get install recordmydesktop Record specific application window with no sound recordmydesktop –no-sound –windowid `xwininfo -display :0 | grep ‘id: 0x’ | grep -Eo ‘0x[a-z0-9]+’`recordmydesktop –no-sound –windowid `xwininfo -display :0 | grep ‘id: 0x’ | grep -Eo ‘0x[a-z0-9]+’` .OGV to .MP4 conversion sudo apt-get install libav-toolssudo apt-get install libav-tools avconv …

Debian

Mount encrypted LUKS usb disk at boot

Find USB Disk UUID sudo blkidsudo blkid or e.g. sudo blkid /dev/sdg1 | awk -F ‘"’ ‘{print $4}’sudo blkid /dev/sdg1 | awk -F ‘"’ ‘{print $4}’ Edit crypttab file sudo nano /etc/crypttabsudo nano /etc/crypttab and add a new line entry such as: UUID=<name> UUID=<disk_uuid> <mount_point> <type>UUID=<name> UUID=<disk_uuid> <mount_point> <type> Example: sdg5_crypt UUID=123456789-1234-1234-1234-1234567890ab none lukssdg5_crypt UUID=123456789-1234-1234-1234-1234567890ab …