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 | |
| # Backup the original server.sh file | |
| cp ~/.vscode-server/bin/*/server.sh ~/.vscode-server/bin/server.sh.bak | |
| # Add sudo to node runner in server.sh | |
| if sed -i "/node/s/^/sudo /" ~/.vscode-server/bin/*/server.sh; then | |
| echo "sudo added to node runner in server.sh" | |
| else | |
| echo "Failed to add sudo to node runner. Please check the sed command." |
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 | |
| export DEBIAN_FRONTEND=noninteractive | |
| ### Function to create a default user | |
| create_default_user() { | |
| local password password_confirm password_hash | |
| # Check if user exists |
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
| ################################################################### | |
| # This is not require anymore, use the official script from: # | |
| # https://gitlab.com/parrotsec/project/debian-conversion-script # | |
| ################################################################### | |
| #!/bin/bash -v | |
| # This prevents the installer from opening dialog boxes during the installation process. As a result, it stops the errors from displaying | |
| # export DEBIAN_FRONTEND=noninteractive |
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 | |
| # Put this at the top of your script | |
| # Detects if script are not running as root, if not will self invoke the script with sudo | |
| # $0 is the script itself (or the command used to call it)... | |
| # $* parameters... | |
| # In both cases using double quote to prevent globbing and word splitting. | |
| # Check if script is being run as root | |
| if [[ $UID -ne 0 ]]; then |
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 | |
| # Script to retrieve GCP IAM roles, users and serviceaccounts | |
| # Author - Alejandro Leal [email protected] (Originally from Rajathithan Rajasekar) | |
| echo 'project-id,roles/rolename,user:username-and-serviceaccounts' > iamlist.csv | |
| prjs=( $(gcloud projects list | awk '/PROJECT_ID/{print $2}') ) | |
| for i in "${prjs[@]}" | |
| do | |
| echo "------------------------------------------------------------" | |
| echo "Collecting IAM roles & users for Project: $i" |
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 python3 | |
| # Python script to reformat IAM json data | |
| # Author: Rajathithan Rajasekar - 03/03/2020 | |
| import json,ast,sys | |
| data = [] | |
| project = "" | |
| def hello(jdata, project): |
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 | |
| # Script to retrieve GCP IAM roles, users and serviceaccounts | |
| # and export it to yaml files that can be used to import back | |
| # with gcloud projects set-iam-policy <project> <policy.yaml> | |
| # | |
| # You can manually remove the etag and version lines in the resulting yaml file | |
| # but do so at your own risk. | |
| # | |
| # Author - Alejandro Leal [email protected] |
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 | |
| # Purpose - Script to add a user to Linux system including passsword | |
| # Original Author - Vivek Gite <www.cyberciti.biz> under GPL v2.0+ | |
| # Updated by - Alejandro Leal @bluPhy | |
| # ------------------------------------------------------------------ | |
| # Am i Root user? | |
| if [ $(id -u) -eq 0 ]; then | |
| read -p "Enter username : " username | |
| while true; do | |
| read -p "Provide the password for default username (kali):" -s -r password |
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 | |
| # Orginal script from pirafrank https://gist.github.com/pirafrank/9970c15fec0fa6e49be5363ef6ed1cf3 | |
| # Simple script to parse JPG photo filename and set exif datetime, | |
| # creation date and file modification date accordingly. | |
| # Timezone is taken by your PC. | |
| # exec this script by searching for .JPG and .jpg files in given folder | |
| # find . -type f -name "*.JPG" -o -name "*.jpg" -exec /path/to/exif_datetime_setter.sh {} \; | |
| # Force update of all files based on exif info -> exiftool '-FileModifyDate<Exif:CreateDate' -overwrite_original * |
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 | |
| # Google Cloud script | |
| # This script checks in an organization for all the projects and list them | |
| # | |
| # Usage examples: | |
| # list-all-projects-in-org.sh --organization 123456789 | |
| # | |
| # Notes: | |
| # To run this script, you need the required IAM permissions |