Never* use git pull – YouTube

    Just a quick summary mostly for myself:

    How to use git pull --rebase to keep your team’s commit history clean.

    Command for creating the ‘git pr‘ alias (so you can copy-paste): git config --global alias.pr "pull --rebase"

    1. Always try git pull --rebase first. It if works, you’re done!
    2. If you get a merge conflix, you can undo everything with git rebase --abort
    3. Then just pull “normally” using git pull, or do an interactive rebase (advanced)

    40 tools for ethical hacking

    I know many of them, but not everyone! Shame on me!

    Here are 40 tools for ethical hacking!

    πŸ” Nmap: Network scanner used for network discovery and security auditing.

    πŸ•΅οΈ Wireshark: Network protocol analyzer for packet inspection and troubleshooting.

    πŸ›‘οΈMetasploit: Penetration testing framework for exploiting vulnerabilities.

    πŸ”‘ John the Ripper: Password cracking tool for dictionary and brute-force attacks.

    πŸ”“ Hydra: Password cracking tool for various protocols like SSH, FTP, and HTTP.

    πŸ” Burp Suite: Web application security testing toolkit for manual and automated testing.

    πŸ”§ Aircrack-ng: Wireless network security tool for cracking WEP and WPA/WPA2 keys.

    πŸ” Hashcat: Advanced password recovery tool for cracking hashed passwords.

    πŸ” OWASP ZAP: Open-source web application security scanner for finding vulnerabilities.

    πŸ”¨ SQLMap: Automatic SQL injection and database takeover tool.

    πŸ” Shodan: Search engine for finding internet-connected devices and services.

    πŸ“‘ Nikto: Web server scanner for finding known vulnerabilities and misconfigurations.

    πŸšͺ Hydra: Network logon cracker for brute-forcing various services.

    πŸ”‘ CeWL: Custom word list generator for password cracking.

    πŸ” Hash-Identifier: Hash type identification tool.

    πŸ” Censys: Internet-wide search engine for finding devices and websites.

    πŸ›‘οΈ Snort: Network intrusion detection system (NIDS) for real-time monitoring.

    πŸ”‘ RainbowCrack: Password cracking tool for rainbow tables.

    πŸ”¨ BeEF: Browser exploitation framework for testing web browsers.

    πŸ” SpiderFoot: Open-source intelligence (OSINT) automation tool.

    πŸ”’ Lynis: Security auditing and hardening tool for Unix/Linux systems.

    πŸ”§ DirBuster: Web application brute-forcing tool for directory and file discovery.

    πŸ” Nikto: Web server scanner for identifying vulnerabilities and misconfigurations.

    πŸ”¨ ExploitDB: Exploit database for finding and downloading exploits.

    πŸ” Netcat: Swiss Army knife for network troubleshooting and security testing.

    πŸ” Maltego: Data visualization and link analysis tool for OSINT.

    πŸ“Ά Reaver: WPS pin brute-forcing tool for Wi-Fi hacking.

    πŸ›‘οΈ Suricata: Open-source network intrusion detection and prevention system (NIDS/NIPS).

    πŸ” Osquery: Endpoint visibility and security monitoring tool.

    πŸ”§ Cuckoo Sandbox: Automated malware analysis tool.

    πŸ” theHarvester: Information gathering tool for email addresses, subdomains, and hosts.

    πŸ”¨ Yersinia: Network tool for exploiting vulnerabilities in Layer 2 protocols.

    πŸ”’ KeePass: Password manager for securely storing and managing passwords.

    πŸ” Metagoofil: Information gathering tool for extracting metadata from public documents.

    πŸ”§ Sleuth Kit: Forensic toolkit for analyzing disk images and file systems.

    πŸ” Droopescan: Web application scanner for detecting vulnerabilities in Drupal websites.

    πŸ”’ GnuPG: Encryption and digital signature tool for secure communication.

    πŸ” Wappalyzer: Browser extension for identifying technologies used on websites.

    From cybershield Facebook page

    The different extended pattern matching operators are listed below, where pattern-list is a list containing one or more filenames, separated using the | character:

    1. *(pattern-list) – matches zero or more occurrences of the specified patterns
    2. ?(pattern-list) – matches zero or one occurrence of the specified patterns
    3. +(pattern-list) – matches one or more occurrences of the specified patterns
    4. @(pattern-list) – matches one of the specified patterns
    5. !(pattern-list) – matches anything except one of the given patterns

    To use them, enable the extglob shell option as follows:

    # shopt -s extglob
    

    1. To delete all files in a directory except filename, type the command below:

    $ rm -v !("filename")
    
    Delete All Files Except One File in Linux

    2. To delete all files with the exception of filename1 and filename2:

    $ rm -v !("filename1"|"filename2") 
    
    Source: 3 Ways to Delete All Files in a Directory Except One or Few Files with Extensions

    In bash scripting, the replacement of string is important because it allows you to modify a variable and the text of a file. It also helps in file and text processing and to validate user input.

    To replace a string in bash, check the following methods:

    1. Using Parameter expansion: ${String/pattern/replacement}
    2. Using the sed command: sed 's/pattern/replacement/' filename
    3. Using the awk command: "input_str" | awk 'pattern { action }'
    4. Using the perl command: perl [options] -e 'action' filename
    5. Using the tr command: tr 'old_chars' 'new_chars' < "input_file"

    Dive into the article to learn these methods of how to replace a bash string in detail.

    Source: How to Replace String in Bash? [5 Methods] – LinuxSimply