Skip to content

Instantly share code, notes, and snippets.

View readloud's full-sized avatar

読み上げ readloud

View GitHub Profile
@readloud
readloud / git-daemon. md
Created July 26, 2025 02:38
Introducing the git-daemon
Introducing the git-daemon
As stated in the official documentation, the Git daemon is a very simple daemon which by default listens on the TCP port 9418. The daemon provides no authentication nor encryption, since it is meant as a quick way of distributing source code tracked in git repositories in trusted environments, such as Local Area Networks (LAN). By default the service allows only clone and pull actions, and forbids anonymous push actions, but this behavior can be easily modified (dangerous!).
Installation
Installing the git-daemon is a fairly easy process, since in a way or another, it is included in the repositories of all the most used Linux distributions. On Debian and Archlinux, for example, all we have to do is to install the standard git package, since git-daemon is included in it (it gets installed as /usr/lib/git-core/git-daemon). To install the git package on Debian we run the following command:
$ sudo apt install git
To perform the installation on Arch, instead, we can use pacman:
@readloud
readloud / gickup. md
Created July 26, 2025 02:36
Mirror repositories from one platform to another
gickup
$ curl --location --remote-name-all https://github.com/cooperspencer/gickup/releases/download/v0.10.17/{gickup_0.10.17_linux_amd64.tar.gz,gickup_0.10.17_checksums.txt}
$ sha256sum -c gickup_0.10.17_checksums.txt
If the checksum of the tarball corresponds to the one written in the file, we should see a message similar to the one below:
gickup_0.10.17_linux_amd64.tar.gz: OK
@readloud
readloud / Cloudflare and Bash Script. md
Created July 26, 2025 02:33
Automate Dynamic IP Updates for Your Domain with Cloudflare and Bash Script
Automate Dynamic IP Updates for Your Domain with Cloudflare and Bash Script
Log in to Cloudflare: Visit the Cloudflare dashboard and log in with your account credentials.
Navigate to API Tokens: Go to My Profile and select API Tokens.
Create a New Token: Click on Create Token and choose the Edit zone DNS template.
Customize the Token: Specify the domain you want the token to manage and click Create Token.
Copy the Token: Copy the generated API token for use in your script.
Copy the generated token. This will be used in your script to authenticate with Cloudflare.
Find Your Zone ID and DNS Record ID: Next, you need the Zone ID of your domain and the ID of the DNS record you want to update.
@readloud
readloud / vsftpd. md
Created July 25, 2025 09:44
vsftpd (very secure FTP daemon)
Install vsftpd on Linux
vsftpd (very secure FTP daemon) is one of the best and most popular FTP servers for Linux. Others also exist, but vsftpd is what we recommend using. You can use the appropriate command below to install vsftpd with your system’s package manager.
To install vsftpd on Ubuntu, Debian, and Linux Mint:
$ sudo apt install vsftpd
To install vsftpd on Fedora, CentOS, AlmaLinux, and Red Hat:
@readloud
readloud / SSH on Linux. md
Created July 25, 2025 09:40
SSH on Linux
SSH on Linux
The first thing we need to do is install SSH. There are separate software packages available depending on if you want to install the client package, server package, or both.
The OpenSSH Client package will allow you to use SSH to log in or initiate connections to remote systems.
The OpenSSH Server package will allow you to setup the SSH service and accept incoming connections. It is not necessary (or recommended) to install this package if you only plan to use SSH as a client.
The SSH command is generally available by default on all Linux distributions, but if your system does not have it, you can use the appropriate command below to install the OpenSSH client package with your system’s package manager. The second command in each example below will install the Server package (skip if you do not need it).
@readloud
readloud / Metasploit Commands Cheatsheet. md
Created July 25, 2025 09:39
Metasploit Commands Cheatsheet
Metasploit Commands Cheatsheet
1. Advanced Metepreter Script Commands- Part 1
Core Commands
These are the basic Linux commands you can use:
? help menu
background moves the current session to the background
bgkill kills a background meterpreter script
bglist provides a list of all running background scripts
@readloud
readloud / OpenSSL. md
Created July 25, 2025 07:34
OpenSSL toolkit
OpenSSL toolkit
The OpenSSL toolkit is available in the official repositories of the most used Linux distributions. It contains a set of utilities and libraries which provide support for various types of protocols and algorithms. There are very high changes the toolkit is already installed on your system, as a dependency of its core packages; however, to install it explicitly, we can just use the package manager of our distribution of choice. On Fedora and other distribution which are part of the Red Hat family, we use dnf:
$ sudo dnf install openssl
On Debian, Ubuntu and their derivatives, instead, we can use the apt wrapper:
$ sudo apt install openssl
@readloud
readloud / Let’s Encrypt and Certbot.md
Created July 25, 2025 07:32
Let’s Encrypt and Certbot

Let’s Encrypt and Certbot The HTTP-01 challenge, is the one we will see in action in this tutorial. When this challenge is performed, Let’s Encrypt creates a token and passes it to a client; the client then proceeds to create a file on our website, under a specific path: http:///.well-known/acme-challenge/. Let’s Encrypt verifies the file exists and is valid; If the validation is successful, it issues the certificate. For this challenge to work, our website must be remotely accessible on port 80.

During a DNS-01 challenge, instead, Let’s Encrypt tries to verify we are in control of DNS entries. Once again, the process starts by the CA issuing a token to the client, which uses it as the content of a TXT record it specifically creates and puts at _acme-challenge.<OUR_DOMAIN>. Let’s Encrypt tries to query the DNS for that record; if it finds a match, it issues the certificate.

As we said before, in this case we will stick to the HTTP-01 challenge. Now, let’s see how to install and use Certbo

@readloud
readloud / Certificate Authority.md
Created July 25, 2025 07:29
Setting up Certificate Authority (CA)

Setting up a Certificate Authority on Ubuntu / Debian DID YOU KNOW? Without a certificate authority, it is easy for malicious servers to masquerade as the one we want, and obtain sensitive information upon our connection to them. It has become common process for businesses or other network infrastructures to create their own certificate authorities, since doing so is cheaper than paying for an official one, and much more flexible in its customization. A certificate authority can allow users to reliably connect to a VPN, a secure website (HTTPS), cryptographically sign emails, and lots more.

In the instructions below, we will go through the process of installing Easy-RSA in order to use a system as a Certificate Authority on Debian or Ubuntu Linux.

Get started by opening a command line terminal and installing the easy-rsa software package with apt:

$ sudo apt install easy-rsa
#!/bin/sh
case $1/$2 in
pre/*)
rmmod i8042
;;
post/*)
modprobe i8042 reset=1
;;
esac