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 | |
echo "checking for log4j vulnerability..."; | |
if [ "$(locate log4j|grep -v log4js)" ]; then | |
echo "### maybe vulnerable, those files contain the name:"; | |
locate log4j|grep -v log4js; | |
fi; | |
if [ "$(rpm -qa|grep log4j|grep -v log4js)" ]; then | |
echo "### maybe vulnerable, installed packages:"; | |
rpm -qa |grep log4j; | |
fi; |
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 | |
echo "checking for log4j vulnerability..."; | |
if [ "$(locate log4j|grep -v log4js)" ]; then | |
echo "### maybe vulnerable, those files contain the name:"; | |
locate log4j|grep -v log4js; | |
fi; | |
if [ "$(dpkg -l|grep log4j|grep -v log4js)" ]; then | |
echo "### maybe vulnerable, installed packages:"; | |
dpkg -l|grep log4j; | |
fi; |
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
root@master:/home/ozyrys# df --output=source,fstype,itotal,iused,iavail,ipcent,size,used,avail,pcent,file,target | |
Filesystem Type Inodes IUsed IFree IUse% 1K-blocks Used Avail Use% File Mounted on | |
udev devtmpfs 243103 463 242640 1% 972412 0 972412 0% - /dev | |
tmpfs tmpfs 254392 960 253432 1% 203516 1792 201724 1% - /run | |
/dev/mapper/ubuntu--vg-ubuntu--lv ext4 3899392 163629 3735763 5% 61149004 6748504 51264604 12% - / | |
tmpfs tmpfs 254392 4 254388 1% 1017568 0 1017568 0% - /dev/shm | |
tmpfs tmpfs 254392 3 254389 1% 5120 0 5120 0% - /run/lock | |
tmpfs tmpfs 254392 18 254374 1% 1017568 0 1017568 0% - /sys/fs/cgroup | |
/dev/loop2 squashfs 11732 11732 0 100% 63360 63360 |
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
root@master:/home/ozyrys# lsblk -O | |
NAME KNAME PATH MAJ:MIN FSAVAIL FSSIZE FSTYPE FSUSED FSUSE% MOUNTPOINT LABEL UUID PTUUID PTTYPE PARTTYPE PARTLABEL PARTUUID PARTFLAGS RA RO RM HOTPLUG MODEL SERIAL SIZE STATE OWNER GROUP MODE ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED RQ-SIZE TYPE DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO WSAME WWN RAND PKNAME HCTL TRAN SUBSYSTEMS REV VENDOR ZONED | |
loop0 loop0 /dev/loop0 7:0 0 42.3M squashfs 42.3M 100% /snap/snapd/14066 128 1 0 0 |
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
SELECT table_schema | |
,table_name | |
,column_name | |
,data_type | |
,character_maximum_length | |
,numeric_precision | |
,column_default | |
FROM information_schema.columns | |
WHERE table_name = 't1' | |
ORDER BY table_name |
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
SELECT table_catalog | |
,table_schema | |
,table_name | |
,table_type | |
FROM information_schema.tables; |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
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
Lp.,Command,MySQL,PostgreSQL | |
1,Connection,mysql -p -h host name -P port number -u username DB name,$ psql -h hostname -p port number -U username DB name | |
2,Database list,show databases;,\l | |
3,Database switching,"use DB name | |
\u DB name",\c DB name | |
4,Table list ,show tables;,"\d, \dt, \d+, \dt+" | |
5,Check table definition,desc table name;,\d table name | |
6,Table CREATE statement confirmation,show create table table name,pg_dump DB name -U user name -s -t table name | |
7,Index list,SHOW INDEX FROM tbl_name;,\d table_name | |
8,Switching line display,select * from t \G,"\x |
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
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" /f /v ProxyServer /t REG_SZ /d 172.10.1.100:9090 | |
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /f /v DefaultConnectionSettings /t REG_BINARY /d 4600000046000000030000001100000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000 | |
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /f /v SavedLegacySettings /t REG_BINARY /d 4600000046000000030000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 | |
netsh interface ip set address "Ethernet1" static 172.10.0.10 255.255.0.0 172.10.0.1 1 | |
netsh interface ip set dns "Ethernet1" static 172.10.0.200 | |
netsh interface set interface name="Ethernet" admin=DISABLED | |
netsh interface set interface name="Ethernet1" admin=ENABLED |
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
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" /f /v ProxyServer /t REG_SZ /d 10.21.21.100:8080 | |
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /f /v DefaultConnectionSettings /t REG_BINARY /d 4600000046000000030000001100000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000 | |
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /f /v SavedLegacySettings /t REG_BINARY /d 4600000046000000030000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 | |
netsh interface ip set address "Ethernet" static 10.21.21.10 255.255.0.0 10.21.21.1 1 | |
netsh interface ip set dns "Ethernet" static 10.21.21.200 | |
netsh interface set interface name="Ethernet1" admin=DISABLED | |
netsh interface set interface name="Ethernet" admin=ENABLED |
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
version: "3.9" | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: somewordpress |