New pages
- 00:26, 16 November 2024 ProxMox Advanced Course (hist | edit) [224 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "== Importing disks images from other virtualizers == qm importdisk <vm id> <disk image> <storage pool> (e.g.) qm importdisk 101 disk.vhd local") Tag: Visual edit
- 05:11, 14 November 2024 MarkDown (hist | edit) [403 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "markdown basic syntax : https://www.markdownguide.org/basic-syntax/ markdown extended syntax : https://www.markdownguide.org/extended-syntax/ here is the idea, make a markdown to html compiler.") Tag: Visual edit
- 03:15, 10 November 2024 Jinja2 (hist | edit) [458 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "== Check a pattern on a string == === Check by a pattern on the beginning of a string === {% if my_string.startswith('pattern') %}{% endif %} {% if my_string[:len('pattern')] == 'pattern' %}{% endif %} === Check by a pattern on the end of a string === === Check by a pattern into a string ===") Tag: Visual edit
- 02:48, 8 November 2024 Sha sum files with Python (hist | edit) [418 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with " import hashlib def calculate_sha256(file_path): sha256_hash = hashlib.sha256() with open(file_path, "rb") as f: # Read and update hash string value in chunks of 4K for byte_block in iter(lambda: f.read(4096), b""): sha256_hash.update(byte_block) return sha256_hash.hexdigest() # Usage file_path = "path/to/your/file" print("SHA-256:", calculate_sha256(file_path))") Tag: Visual edit
- 16:03, 7 November 2024 Linux Password Less Authentication (rsa key file) (hist | edit) [295 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "=== '''Generate the SSH key pair on your local machine''' (the one you want to connect from): === ssh-keygen -t rsa -b 4096 -f ~/.ssh/username * <code>-t rsa</code>: Specifies the RSA algorithm (you can also use <code>ed25519</code> for better security). * <code>-b 4096</code>: Sets the key size (4096 bits for RSA). * <code>-f ~/.ssh/username</code>: This option lets you set the filename and path for the key. Here, it will save the private key as <code>~/.ssh/username<...") Tag: Visual edit
- 17:24, 5 November 2024 Adding app on gnome menu (hist | edit) [1,147 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "create myapp.desktop file nano ~/.local/share/applications/myapp.desktop Write all the configurations [Desktop Entry] Version=1.0 Name=MyApp Comment=This is my custom app Exec=/path/to/your/binary Icon=/path/to/your/icon.png Terminal=false Type=Application Categories=Utility;Application; * <code>Version</code>: (Optional) Specifies the version of the desktop entry format. * <code>Name</code>: The name of your application that will appear in the GNOME menu....") Tag: Visual edit
- 18:13, 4 November 2024 Vim Cheat Sheet (hist | edit) [16,239 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with " == Global == * <kbd>:h[elp] keyword</kbd> - open help for keyword * <kbd>:sav[eas] file</kbd> - save file as * <kbd>:clo[se]</kbd> - close current pane * <kbd>:ter[minal]</kbd> - open a terminal window * <kbd>K</kbd> - open man page for word under the cursor '''Tip''' Run <kbd>vimtutor</kbd> in a terminal to learn the first Vim commands. == Cursor movement == * <kbd>h</kbd> - move cursor left * <kbd>j</kbd> - move cursor down * <kbd>k</kbd> - move cursor up * <kbd>l...") Tag: Visual edit
- 14:38, 30 October 2024 SSH Tunnel (hist | edit) [329 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "To expose a local port so that it is accessible remotely, use the following command: ssh -R [remote_port]:localhost:[local_port] [user]@[ssh_host] To listen locally for a remote port, use this command: ssh -L [local_port]:[remote_host]:[remote_port] [user]@[ssh_host] * -N no remote command to execute, will not show the shell") Tag: Visual edit
- 00:09, 22 October 2024 Just a place to store all my certifications (hist | edit) [3,800 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "*Introdução ao Pentest na PráticaIntrodução ao Pentest na Prática *C1 Avanced English LevelC1 Avanced English Level *Ultimate Rust Crash CourseUltimate Rust Crash Course *Docker Mastery: with Kubernetes +Swarm from a Docker CaptainDocker Mastery: with Kubernetes +Swarm from a Docker Captain *SharePointSharePoint *Lei Geral de Proteção de DadosLei Geral de Proteção de Dados *DevOps in the Cloud with Terraform, Ansible, and JenkinsDevOps in the Cloud with Terrafo...") Tag: Visual edit
- 21:47, 18 October 2024 Kubernetes (hist | edit) [918 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "K3s install curl -sfL <nowiki>https://get.k3s.io</nowiki> | K3S_KUBECONFIG_MODE="644" sh -s - Adding node to the cluster get the token from the master with cat /var/lib/rancher/k3s/server/node-token then to install run curl -sfL <nowiki>https://get.k3s.io</nowiki> | K3S_TOKEN="YOUR TOKEN" K3S_URL="<nowiki>https://yourserver:6443</nowiki>" K3S_NODE_NAME="servername" sh -s -") Tag: Visual edit
- 17:27, 15 October 2024 RedHat OpenShift (hist | edit) [1,499 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "== Users == === User types === * regular: regular users are normal users such as developers and people who manages the cluster (e.g. developer) * system: system users are users that are created on each node and have the prefix system: (e.g. system:admin, system:master) * service: service users are users that are created to allow the communication between services with the prefix system:serviceaccount (e.g. system:serviceaccount:user) === Oauth Server === ==== Modes...") Tag: Visual edit
- 19:57, 14 October 2024 The Generic Communication Protocol (hist | edit) [128 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "Just a generic protocol that transfers data pont to pont using just some things version: vX.X.X size: 0-2^24 data: top of 16M") Tag: Visual edit
- 18:24, 14 October 2024 QR Code (hist | edit) [1,583 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "The number of letters a QR code can store depends on the QR code version, the error correction level, and the encoding mode. The four encoding modes are: # '''Numeric Mode''': Only digits (0-9) # '''Alphanumeric Mode''': Letters (A-Z), digits (0-9), and nine special characters (<code>space</code>, <code>$</code>, <code>%</code>, <code>*</code>, <code>+</code>, <code>-</code>, <code>.</code>, <code>/</code>, <code>:</code>) # '''Binary Mode''': Any byte of data (e.g., AS...") Tag: Visual edit
- 23:11, 13 October 2024 My AI local config with docker compose Ollama with OpenWebUI (hist | edit) [820 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with " services: ollama: volumes: - /docker/ollama-openwebui/data/ollama:/root/.ollama container_name: ollama pull_policy: always tty: true restart: unless-stopped image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest} open-webui: build: context: . args: OLLAMA_BASE_URL: '/ollama' dockerfile: Dockerfile image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-main} container_name: open-webui...") Tag: Visual edit: Switched
- 23:10, 13 October 2024 AI - Artificial Inteligence (hist | edit) [80 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "== Stuffs == * My AI local config with docker compose Ollama with OpenWebUI") Tag: Visual edit
- 18:15, 13 October 2024 Pedro's Fedora Linux setup (hist | edit) [3,827 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with " # CYBER SEC STUFF sudo dnf update -y sudo dnf install hydra gobuster wafw00f whatweb golang git wfuzz snapd -y snap install seclists sqlmap hash-id cd /tmp git clone https://github.com/tomnomnom/hacks.git cd hacks/html-tool go build -o html-tool main.go sudo cp html-tool /usr/local/bin cd /tmp git clone https://github.com/003random/getJS.git cd getJS go build -o getJS main.go sudo cp getJS /usr/local/bin curl -L -o burp_community_2024.8.4_linux.sh "https:/...") Tag: Visual edit: Switched
- 18:51, 12 October 2024 Compiling Python code (hist | edit) [397 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with " pip install pyinstaller pyinstaller --onefile script.py") Tag: Visual edit
- 16:35, 12 October 2024 Hack The Box - Windows Fundamentals - course notes (hist | edit) [7,920 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "=== Windows Versions === {| class="wikitable" !Operating System Names !Version Number |- |Windows NT 4 |4.0 |- |Windows 2000 |5.0 |- |Windows XP |5.1 |- |Windows Server 2003, 2003 R2 |5.2 |- |Windows Vista, Server 2008 |6.0 |- |Windows 7, Server 2008 R2 |6.1 |- |Windows 8, Server 2012 |6.2 |- |Windows 8.1, Server 2012 R2 |6.3 |- |Windows 10, Server 2016, Server 2019 |10.0 |} === Command Get-WmiObject === We can use the Get-WmiObject to find information about the operati...") Tag: Visual edit
- 16:06, 12 October 2024 Windows (hist | edit) [70 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "== Stuffs == * Hack The Box - Windows Fundamentals - course notes") Tag: Visual edit
- 02:03, 12 October 2024 Base64 file encode and decode with Python (hist | edit) [676 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "Encode code import base64 input_file_path = input('Input file > ') output_file_path = input('Output file > ') with open(input_file_path, 'rb') as file: file_data = file.read() encoded_data = base64.b64encode(file_data) with open(output_file_path, 'wb') as output_file: output_file.write(encoded_data) Decode code import base64 input_file_path = input('Input file > ') output_file_path = input('Output file > ') with open(input_file_path, 'r...") Tag: Visual edit
- 17:48, 10 October 2024 Local OS monitoring client with Python (hist | edit) [1,787 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "This script monitores: * CPU usage (percent) * RAM usage (percent) * Swap usage (percent) * Root disk usage (percent) It's all saved on a CSV file named 'consume-metrics-YEAR-MONTH-DAY.csv' the csv structure is: year-month-day,hout:minute:second,cpu usage,ram usage,swap usage,root disk usage Here is the script import psutil import datetime import time while True: momment = datetime.datetime.now() year = momment.year month = momment.month day...") Tag: Visual edit
- 17:32, 10 October 2024 Linux system information gathering (hist | edit) [1,471 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "Save your linux configurations before making a change is important for at least 2 reasons: * If something goes wrong you can restore with the data collected * If something goes wrong but not related to what you did, you'll need prof of this (trust me this happens) My script: echo 'cat /etc/*release' cat /etc/*release echo echo echo 'df -h' df -h echo echo echo 'ip a' ip a echo echo echo 'ps -ef' ps -ef echo echo echo 'netstat -nr' net...") Tag: Visual edit
- 12:38, 10 October 2024 Linux FS Mount (hist | edit) [931 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "== /etc/fstab == The /etc/fstab is used to configure all mounting file system on Linux, with this file we can configure the mounting of SWAP, local blocks and nfs. === File architecture === origin destiny type options dump-option check-option === Mounting SWAP === /swapfile none swap sw 0 0 === Mounting local blocks === /dev/myvg/mylv /mnt ext4 defaults 0 0 === Mounting remote smb shares === //remote_host/sharename /mnt/cifs-share cifs username=user,password=pas...")
- 13:07, 8 October 2024 UDEMY - TOTAL: CompTIA Security+ Certification (SY0-601) - course notes (hist | edit) [7,350 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "== Defining risk == *Asset: An asset is any critical resource used to generate value, such as important data or key personnel within a team. *Likelihood: This refers to the probability of an event occurring over time, such as potential disruptions to your infrastructure. *Threat Actors: Entities or individuals that may cause harm to your infrastructure. Key types include: ** Hackers: Individuals who exploit vulnerabilities to gain unauthorized access. ** Hacktivists: Ha...") Tag: Visual edit: Switched
- 23:11, 7 October 2024 DESEC Security - Introduction to Pentest in Practice - course notes (hist | edit) [10,472 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "== Mapping host == === Mapping open ports on host === nmap -D RND:20 --open -sS --top-ports=100 domain.com -oN open-ports.file * nmap - the comand * -D RND:20 - will generate 20 random IPs to send the request, to try to mask the requests if there is a inteligent firewall on the other side. * --open - to get open ports * -sS - SYN scan the target responds with a '''SYN-ACK''' packet (acknowledging the connection) * --top-ports=100 - list the top 100 ports * domain.com...") originally created as "Introduction to Pentest in Practice course notes"
- 23:09, 7 October 2024 Building a RHEL like environment to cybersec (hist | edit) [676 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with " sudo dnf update -y sudo dnf install hydra gobuster wafw00f whatweb golang git seclists wfuzz sqlmap hash-identifier -y cd /tmp git clone https://github.com/tomnomnom/hacks.git cd hacks/html-tool go build -o html-tool main.go sudo cp html-tool /usr/local/bin cd /tmp git clone https://github.com/003random/getJS.git cd getJS go build -o getJS main.go sudo cp getJS /usr/local/bin wget https://files.pedromussato.com/programs/burpsuite_community_linux_v2024_8_2.sh...") Tag: Visual edit: Switched
- 23:16, 6 October 2024 CyberSec (hist | edit) [240 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with " == Building a RHEL like env == dnf update -y dnf install hydra gobuster wafw00f whatweb golang git -y git clone https://github.com/tomnomnom/hacks.git cd hacks/html-tool go build -o html-tool main.go cp html-tool /usr/local/bin wget https://files.pedromussato.com/programs/burpsuite_community_linux_v2024_8_2.sh chmod +x burpsuite_community_linux_v2024_8_2.sh ./burpsuite_community_linux_v2024_8_2.sh == Mapping host == === Mapping open ports on host === nmap -D...") Tag: Visual edit
- 22:35, 6 October 2024 Deploy Django on Apache2 (hist | edit) [1,378 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "=== Install needed packages === sudo apt-get install python3 python3-pip apache2 libapache2-mod-wsgi-py3 python3-virtualenv snapd -y === Create virtual environment === Go to /var/www/ and create the dir to your project virtualenv myprojectenv Then activate the environment source myprojectenv/bin/activate === Install pip packages and run all migrations === Install Django and all packages needed pip install django === Configure the Apache web server === <VirtualHos...")
- 22:35, 6 October 2024 Python (hist | edit) [183 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "* Deploy Django on Apache2")
- 22:35, 6 October 2024 C Lang simple stuff (hist | edit) [5,542 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "== All C keywords == {| class="wikitable" |auto |break |case |char |- |const |continue |default |do |- |double |else |enum |extern |- |float |for |goto |if |- |int |long |register |return |- |short |signed |sizeof |static |- |struct |switch |typedef |union |- |unsigned |void |volatile |while |} == C Lang basics == === Primitive types === * char: Typically 1 byte in size. It's used to store characters or small integers. * int: The most common integer type, typically at...")
- 22:34, 6 October 2024 Docker useful yaml files (hist | edit) [1,037 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "=== mysql.yaml === version: '3.9' services: mysql: image: mysql:8 restart: always ports: - 3306:3306 expose: - 3306 environment: MYSQL_ROOT_PASSWORD: mysql volumes: - ${PWD}/data/mysql:/var/lib/mysql === postgresql.yaml === version: '3.9' services: postgres: image: postgres restart: always ports: - 5432:5432...")
- 22:34, 6 October 2024 Docker (hist | edit) [44 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "== Stuffs == * Docker useful yaml files")
- 22:33, 6 October 2024 Databases (hist | edit) [3,226 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "== Stuffs == === Creating and deleting databases on MariaDB === CREATE DATABASE database_name; === Creating and deleting users on MariaDB === CREATE USER 'username'@'%' IDENTIFIED BY 'password'; DROP USER 'username'@'%'; === Granting privileges on databases to users on MariaDB === GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'%'; === FLUSH PRIVILEGES === At the end, always flush privileges. FLUSH PRIVILEGES; === How to make backups of MariaDB === Almo...")
- 22:32, 6 October 2024 Stream text processing (hist | edit) [3,858 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "=== cat === Reads a text file Some useful options: * -n show line numbers * -b show non blank line numbers * -s split multiple break lines into single break line * -A shows special chars ==== tac (the opposite of cat) ==== Reads a text file from the last line to the first === head === Reads the first 10 lines of the file (some distros uses 5 by default) Some useful options: * -n<number> shows this number of lines * -<number> shows this number of lines * -c<number>...") Tag: Visual edit: Switched
- 22:30, 6 October 2024 Linux LPI Studies (hist | edit) [69 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "=== Subjects === * Stream text processing (cat, head, tail, sort, less, wc) * Stream text processing (uniq, od, paste, split) * Stream text processing (tr, cut, sed)")
- 22:30, 6 October 2024 Configuring the right button of the touch pad as right click on Gnome (hist | edit) [88 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "Just run this: gsettings set org.gnome.desktop.peripherals.touchpad click-method areas")
- 22:29, 6 October 2024 Executing scripts on Linux boot (hist | edit) [514 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "To execute a command as soon as the Linux boot you can simply put it on the /etc/rc.local file. Usually this file doesn't exists by default so you can create the file and grant execution privileges to it like: ls -l /etc/rc.local || touch /etc/rc.local ; chmod +x /etc/rc.local First check if the file exists, if exists ok, nothing to do here, if not we're creating the file after all adding the execution permission. IMPORTANT Always remember to put the bang at the be...")
- 22:29, 6 October 2024 Linux time and clock configuration (hist | edit) [705 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "=== Changing timezone on Linux === To change the timezone on linux you can use the command : timedatectl set-timezone <your_time_zone> To see all timezones avaliable you can use the command: timedatectl list-timezones Africa/Abidjan Africa/Accra Africa/Addis_Ababa Africa/Algiers Africa/Asmara Africa/Asmera Africa/Bamako Africa/Bangui Africa/Banjul Africa/Bissau . . . (e.g.) timedatectl set-timezone America/Sao_Paulo === Manually configure clock on Linux...") Tag: Visual edit: Switched
- 22:27, 6 October 2024 Linux file backup (hist | edit) [2,137 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "== How to make daily file backups on Linux == Just configure the source the name and the output dir, schedule this script to run daily on crontab and it's done. Remember that retention policy is defined in days, so if you want more or less than what we have on the script, just change it to fit your priorities. #!/bin/bash SOURCE= NAME= OUTPUT_DIR= WEEKLY_BACKUP_RETENTION=30 #DAYS MONTHLY_BACKUP_RETENTION=365 #DAYS YEARLY_BACKUP_RETENTION=3650 #DAYS mkdir -p...")
- 22:26, 6 October 2024 Linux LVM (hist | edit) [8,062 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "=== Finding the volumes wanted === Use the command lsblk to find what devices you want to use (if it isn't partitioned yet). sdb 8:16 0 32G 0 disk sdc 8:32 0 32G 0 disk sdd 8:48 0 32G 0 disk sde 8:64 0 32G 0 disk sdf 8:80 0 32G 0 disk In my case I'll use sdb, sdc, sdd, sde and sdf. === Formating the partition === To forma...")
- 22:26, 6 October 2024 Run one script in multiple servers (hist | edit) [3,954 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "We will use 3 files to run a single script into multiple server at once. * script.sh * servers.list * run.sh The file servers.list is a list of all servers you will run the script on. The file script.sh is the script that will be runned on the servers. The file run.sh will get all servers into the file serves.list will copy the script.sh to /tmp of each server and execute from the server. === Files === ==== servers.list ==== server1 server2 server3 . . . =...")
- 22:26, 6 October 2024 Crontab (hist | edit) [203 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "Fist of all make your life more easy and use an automatic crontab generator [https://crontab-generator.org/ LINK] but if you really want to know how to configure manually a crontab just follow the rules.")
- 22:25, 6 October 2024 Configuring Linux static IP (hist | edit) [2,012 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "== How to configure static IP on Linux distros == I'll not cover gui network managers, only file stuff. === Debian === File : /etc/network/interfaces Configuration: auto NETWORK-INTERFACE iface NETWORK-INTERFACE inet static address xxx.xxx.xxx.xxx gatway xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx Let's suppose that you want to configure the interface ens18 with the ip 192.168.0.100 netmask 255.255.255.0 and gateway 192.168.0.1: auto ens18 iface ens18 in...")
- 22:25, 6 October 2024 Creating swap on Linux (hist | edit) [1,423 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "== This should work in any Linux distro == === Create a swapfile === To create the swapfile let's just use the /dev/zero and append on /swapfile we're using 16MB blocks and making 64 of those, in another words 1GB, you can make 0.5GB or 4GB doesn't really matters: dd if=/dev/zero of=/swapfile bs=16M count=64 # 1GB or: dd if=/dev/zero of=/swapfile bs=16M count=128 # 2GB or: dd if=/dev/zero of=/swapfile bs=16M count=256 # 4GB Select one and go for it. === Changing fil...")
- 22:24, 6 October 2024 Linux (hist | edit) [680 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "== Stuffs == * Creating swap on Linux * Configuring Linux static IP * Crontab * Run one script in multiple servers * Linux LVM * Linux file backup * Linux time and clock configuration * Executing scripts on Linux boot * Auto mounting drives on boot (/etc/fstab) * Configuring the right button of the touch pad as right click on Gnome (not works by default) * [https://itsfoss.com/ubuntu-split-screen/ Horizontal split screen in Linux]...")
- 22:24, 6 October 2024 BSD Unix (hist | edit) [480 bytes] 413vhcu1lq0463ob (talk | contribs) (Created page with "== FreeBSD == === Some usefull commands === * freebsd-version - returns the version of the os running (do not trust in /etc/*release this file is updated only on reboot) === Patch update === This will download what is needed freebsd-update fetch This will install what was downloaded freebsd-update install === Release update === This will download what is needed freebsd-update -r RELEASE-VERSION upgrade Reboot the OS And then install everything freebsd-update in...")