Tag: linux

Encryption, LUKS

Create an encrypted file container in Linux

Installations sudo apt-get install cryptsetupsudo apt-get install cryptsetup Create an empty file with the size of your container (e.g. 100MB) fallocate -l 100M mycontainer.imgfallocate -l 100M mycontainer.img or dd if=/dev/urandom of=mycontainer.img bs=1M count=100dd if=/dev/urandom of=mycontainer.img bs=1M count=100 Using a keyfile dd if=/dev/urandom of=mykey.key bs=1024 count=1dd if=/dev/urandom of=mykey.key bs=1024 count=1 Encrypting disk image file sudo cryptsetup …

Debian, Django, Python

Apache2 and Django installation on Debian

Install Apache2 sudo apt-get install apache2 -y sudo rm -f /var/www/html/index.html && sudo touch /var/www/html/index.html sudo a2enmod ssl sudo a2ensite default-ssl sudo service apache2 restartsudo apt-get install apache2 -y sudo rm -f /var/www/html/index.html && sudo touch /var/www/html/index.html sudo a2enmod ssl sudo a2ensite default-ssl sudo service apache2 restart Install Python 3 sudo apt-get install python3 -y …

Debian, Linux

Sublime editor on Debian

Installation https://www.sublimetext.com/3 sudo dpkg -i sublime-text_build-xxxx_amd64.debsudo dpkg -i sublime-text_build-xxxx_amd64.deb Dracula Theme https://draculatheme.com/sublime/ Preferences -> Color Scheme -> Dracula Color Scheme -> Dracula CamingoCode Font https://www.fontsquirrel.com/fonts/camingocode sudo cp -r /home/username/Downloads/camingocode /usr/local/share/ sudo fc-cache -fvsudo cp -r /home/username/Downloads/camingocode /usr/local/share/ sudo fc-cache -fv Restart sublime if it is already open. Preferences -> Settings -> { "color_scheme": "Packages/Dracula Color …

Debian, Linux, SmokingLinuxEveryDay

p7zip – file archiver

p7zip is the Unix command-line port of 7-Zip, a file archiver that handles the 7z format which features very high compression ratios. p7zip provides: – /usr/bin/7zr – a standalone minimal version of the 7-zip tool that only handles 7z, LZMA and XZ archives. 7z compression is 30-50% better than ZIP compression. – /usr/bin/p7zip – a …

Linux, Security

Change admin passwords

System sudo passwd rootsudo passwd root MySQL mysqladmin -u root -p passwordmysqladmin -u root -p password PostgreSQL sudo -u postgres psql -U postgres -h 127.0.0.1 -d postgres -c "ALTER USER postgres WITH PASSWORD ‘newpassword’;"sudo -u postgres psql -U postgres -h 127.0.0.1 -d postgres -c "ALTER USER postgres WITH PASSWORD ‘newpassword’;" Gitlab GLPI Project mysql -u …

Malware

VirusTotal Uploader for Debian

VirusTotal API Dependencies sudo apt-get install automake autoconf libtool libjansson-dev libcurl4-openssl-devsudo apt-get install automake autoconf libtool libjansson-dev libcurl4-openssl-dev Download git clone https://github.com/VirusTotal/c-vtapi.gitgit clone https://github.com/VirusTotal/c-vtapi.git cd c-vtapicd c-vtapi Compile autoreconf -fiautoreconf -fi ./configure./configure makemake sudo make installsudo make install Configure sudo sh -c ‘echo "/usr/local/lib" > /etc/ld.so.conf.d/usr-local-lib.conf’sudo sh -c ‘echo "/usr/local/lib" > /etc/ld.so.conf.d/usr-local-lib.conf’ sudo ldconfigsudo ldconfig …

Linux

Debian – Awesome Zsh

Install zsh sudo apt-get install zshsudo apt-get install zsh Download prezto git clone –recursive https://github.com/sorin-ionescu/prezto.git ~/.zpreztogit clone –recursive https://github.com/sorin-ionescu/prezto.git ~/.zprezto Create symlinks setopt EXTENDED_GLOB; for rcfile in /home/<username>/.zprezto/runcoms/^README.md(.N); do ln -s "$rcfile" "/home/<username>/.${rcfile:t}"; donesetopt EXTENDED_GLOB; for rcfile in /home/<username>/.zprezto/runcoms/^README.md(.N); do ln -s "$rcfile" "/home/<username>/.${rcfile:t}"; done or ln -s /home/<username>/.zprezto/runcoms/zlogin /home/<username>/.zlogin ; ln -s /home/<username>/.zprezto/runcoms/zlogout /home/<username>/.zlogout …