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 | |
| # world_writable_checker.sh | |
| # Find world-writable files, safely avoiding problematic, synthetic, and network filesystems. | |
| # | |
| # Usage: | |
| # world_writable_checker.sh [options] [--] <path> [more paths...] | |
| # | |
| # Options: | |
| # --user, -u Non-root mode (only readable files) |
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 | |
| set -euo pipefail | |
| usage() { | |
| cat << EOF | |
| Usage: $0 [OPTIONS] [TARGET_PATHS...] | |
| Scan for world-writable files/directories (ls -l style output). | |
| OPTIONS: |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #define DEFAULT_UNIT 1024*1024 /* 1Mb */ | |
| size_t alloc_unit; | |
| char* format_size(unsigned long int); |
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
| exec 0>&- # close stdin | |
| # and execute command without STDIN control... |
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
| # Include SVN info in prompt, if possible | |
| PROMPT_COMMAND=svn_prompt_cmd | |
| svn_prompt_cmd() { | |
| # The various escape codes that we can use to color our prompt. | |
| RED="\e[0;31m" | |
| GREEN="\e[0;32m" | |
| BROWN="\e[0;33m" | |
| BLUE="\e[0;34m" |
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 | |
| # | |
| # Source: https://gist.github.com/bsdcon/7224196 | |
| # Original: https://gist.github.com/habibutsu/5420781 | |
| # Modified by Adrian Penisoara << ady+tailurl (at) bsdconsultants.com >> | |
| # | |
| # Last update: 8 Aug 2014 | |
| # |