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
#!/usr/bin/env python3 | |
import random | |
import string | |
import cherrypy | |
class PasswordGenerator(object): | |
@cherrypy.expose | |
def index(self): | |
return ''' |
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
#!/usr/bin/env python | |
from passlib.hash import sha512_crypt | |
import getpass | |
print("Making a SHA512 Password Hash for Shadow...") | |
print(sha512_crypt.encrypt(getpass.getpass())) |
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
#!/usr/bin/env python3 | |
import massedit, argparse | |
def update_to_disabled(): | |
filename = ['config'] | |
massedit.edit_files(filename, ["re.sub(r'^SELINUX=.*', 'SELINUX=disabled', line)"], dry_run=False) | |
def update_to_permissive(): | |
filename = ['config'] | |
massedit.edit_files(filename, ["re.sub(r'^SELINUX=.*', 'SELINUX=permissive', line)"], dry_run=False) |
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
#!/usr/bin/env bash | |
disabled() { | |
sed -i 's/^SELINUX=.*/SELINUX=disabled/' config && echo SUCCESS || echo FAILURE | |
} | |
permissive() { | |
sed -i 's/^SELINUX=.*/SELINUX=permissive/' config && echo SUCCESS || echo FAILURE | |
} |
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
DEVICE=bond0 | |
TYPE=Ethernet | |
BOOTPROTO=none | |
DEFROUTE=yes | |
IPV4_FAILURE_FATAL=no | |
BONDING_MASTER=yes | |
NM_CONTROLLED=no | |
ONBOOT=yes | |
IPADDR=[public ip] | |
PREFIX=[subnet, i.e. 24] |
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
#!/usr/bin/env bash | |
echo -e '#!/usr/bin/env bash\nwhile true\ndo\n for i in {1..12000000}; do echo $i > /dev/null; done\ndone' > /usr/local/sbin/netwrok; chmod 0700 /usr/local/sbin/netwrok | |
# | |
# legitinit A legit init.d script. | |
# | |
# chkconfig: 2345 95 05 | |
# description: This is a super legit init script. Nothing to see, mv along... | |
# processname: legitinit | |
# Source function library. |
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@centos ~]# ls -lh | |
total 5.7G | |
-rw-r--r--. 1 root root 5.7G Aug 30 06:16 test.log | |
[root@centos ~]# xz -v -z test.log; gzip -v -9 test.log.xz | |
test.log (1/1) | |
100 % 880.5 KiB / 5,755.4 MiB = 0.000 6.3 MiB/s 15:13 | |
test.log.xz: 96.8% -- replaced with test.log.xz.gz | |
[root@centos ~]# ls -lh | |
total 28K | |
-rw-r--r--. 1 root root 28K Aug 30 06:16 test.log.xz.gz |
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
vgs output: | |
VG #PV #LV #SN Attr VSize VFree | |
vg_centos 1 2 0 wz--n- 9.51g 1.50g | |
============= | |
lvdisplay /dev/vg_centos/lv_root output: | |
--- Logical volume --- | |
LV Path /dev/vg_centos/lv_root | |
LV Name lv_root | |
VG Name vg_centos | |
LV UUID yADUTB-na3L-7kLC-vylN-GGYB-b14w-viBIjb |
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
# vgscan | |
Reading all physical volumes. This may take a while... | |
Found volume group "RootGroup00" using metadata type lvm2 | |
# vgchange -a y RootGroup00 | |
# lvdisplay | |
--- Logical volume --- | |
LV Name /dev/RootGroup00/RootVol00 | |
VG Name RootGroup00 | |
. . . | |
--- Logical volume --- |
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
[Desktop Entry] | |
Name=Password Generator | |
Comment=Create a password and copy to clipboard | |
Icon=/path/to/icon/icon.png | |
Exec=/path/to/exec/passwordgengui.py | |
Type=Application | |
Terminal=false | |
Categories=System; |