#!/usr/bin/python3
# -*- coding: utf-8 -*-
from flask import Flask, request
app = Flask(__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
#!/bin/bash | |
if [ "$1" == "on" ] | |
then | |
synclient TouchpadOff=0 | |
echo "$(date '+%F %T') - INFO: Touchpad is enabled." | |
elif [ "$1" == "off" ] | |
then | |
echo "$(date '+%F %T') - INFO: Touchpad is disabled." | |
synclient TouchpadOff=1 |
When run apt update
,
root@hadoop123:~# apt-get update
Get:5 https://repo.saltproject.io/py3/ubuntu/20.04/amd64/archive/3005 focal InRelease [2125 B]
Err:5 https://repo.saltproject.io/py3/ubuntu/20.04/amd64/archive/3005 focal InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E08A149DE57BFBE
Reading package lists... Done
W: GPG error: https://repo.saltproject.io/py3/ubuntu/20.04/amd64/archive/3005 focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E08A149DE57BFBE
E: The repository 'https://repo.saltproject.io/py3/ubuntu/20.04/amd64/archive/3005 focal InRelease' is not signed.
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 | |
fallocate -l 1G /swapfile; | |
chmod 600 /swapfile; mkswap /swapfile; | |
cp /etc/fstab /etc/fstab.bk; | |
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab; | |
swapon -a; | |
sysctl vm.swappiness=15; | |
sysctl vm.vfs_cache_pressure=50 |
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
echo "vm.zone_reclaim_mode=0 | |
vm.swappiness=1 | |
vm.max_map_count=102400" >> /etc/sysctl.conf | |
sysctl -p /etc/sysctl.conf | |
apt-get install gnupg curl -y | |
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb -P /tmp | |
dpkg -i /tmp/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb && rm /tmp/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb | |
curl -fsSL https://pgp.mongodb.com/server-6.0.asc | gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg --dearmor | |
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list |
CVE: https://ubuntu.com/security/CVE-2023-38408
#!/bin/bash
WORK_DIR=/opt
mkdir -p /var/lib/sshd/
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bk