Skip to content

Instantly share code, notes, and snippets.

View msoranno's full-sized avatar

Miguel Soranno msoranno

  • Madrid
View GitHub Profile
@msoranno
msoranno / gnome
Created August 4, 2018 15:57
gnome dash favorite
# Launch command line gnome preferences
gnome-shell-extension-prefs
@msoranno
msoranno / comments
Last active July 13, 2018 10:35
no comments grep
# no comments and no empty lines
cat config.yaml | egrep -v "^\s*(#|$)"
@msoranno
msoranno / aws
Created July 6, 2018 09:53
aws cli
pip install awscli --upgrade --user
export PATH=~/.local/bin:$PATH
source ~/.bash_profile
vi .bashrc
export PATH=~/.local/bin:$PATH
@msoranno
msoranno / updatedockerversion
Last active May 1, 2019 20:49
update docker version
sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine
rm /var/lib/docker
rm /etc/docker
sudo yum search docker
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce
sudo systemctl start docker
docker version
@msoranno
msoranno / python3Redhat
Created June 18, 2018 15:55
python 3 on red hat 7
yum install gcc openssl-devel bzip2-devel
cd /usr/src
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
tar xzf Python-3.6.5.tgz
cd Python-3.6.5/
./configure --enable-optimizations
make altinstall
rm /usr/src/Python-3.6.5.tgz
restart session
@msoranno
msoranno / docker_compose
Created June 18, 2018 10:16
docker compose
# docker-compose installation
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
@msoranno
msoranno / yum_plugin
Created June 16, 2018 08:24
yum plugin
info:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-yum_plugins
- All information about plugins is here
/etc/yum/pluginconf.d
- to show plugins
yum info yum
@msoranno
msoranno / dumpMysql_docker.sh
Created May 23, 2018 18:08
mysql docker dump
#!/bin/bash
NOW=`date '+%Y%m%d%H%M%S'`
dumpFile="Vector_$NOW.sql"
echo
echo "Se actualiza el repositorio"
echo
git pull
echo
echo "Creación del dump"
# install
apt install openssh-server
# service cheking
sudo systemctl status ssh
#port open check
netstat -tupln
# ajustamos el fichero /etc/ssh/sshd_config
#check your own ports
sudo netstat -tupln
How To Scan Ports with Nmap
Nmap can reveal a lot of information about a host. It can also make system administrators of the target system think that someone has malicious intent. For this reason, only test it on servers that you own or in situations where you've notified the owners.
The nmap creators actually provide a test server located at:
scanme.nmap.org
This, or your own VPS instances are good targets for practicing nmap.