This file contains 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 | |
# Ensure the script exits on error | |
set -e | |
# Function to check if a command exists | |
function command_exists() { | |
command -v "$1" &> /dev/null | |
} |
This file contains 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 | |
####################### | |
#### Author: Matt Curry | |
#### Date 07/08/24 | |
#### Adds Colors to mac shell, so you can see the difference between directories/files/etc... | |
####################### | |
# or for .profile | |
echo " " >> ~/.profile | |
echo "# Mac Color Fix" >> ~/.profile |
This file contains 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
$targetfolder='C:\Windows' | |
$dataColl = @() | |
gci -force $targetfolder -ErrorAction SilentlyContinue | ? { $_ -is [io.directoryinfo] } | % { | |
$len = 0 | |
gci -recurse -force $_.fullname -ErrorAction SilentlyContinue | % { $len += $_.length } | |
$filesCount = (gci -recurse -force $_.fullname -File -ErrorAction SilentlyContinue | Measure-Object).Count | |
$dataObject = New-Object PSObject -Property @{ | |
Folder = $_.fullname | |
SizeGb = ('{0:N3}' -f ($len / 1Gb)) -as [single] | |
filesCount=$filesCount |
This file contains 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
# Define the threshold size in MB | |
$thresholdSizeMB = Read-Host "Enter the minimum file size in MB to list" | |
# Convert the threshold size to bytes | |
$thresholdSizeBytes = $thresholdSizeMB * 1MB | |
# Define the drive to scan | |
$drive = Read-Host "Enter the drive letter to scan (e.g., C:)" | |
# Get a list of all files larger than the threshold size |
This file contains 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 | |
# install pwnagotchi on rpi4 | |
WIFI_DEV="wlan1" | |
AUTO_MODE=true | |
DEBUG=false | |
PWN_GRID=false | |
PWN_GRID_REPORT=false | |
HOME_NETWORK="YourHomeNetworkMaybe" |
This file contains 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 | |
# Description: Preps a system (debian/ubuntu/raspbian), with needed tensorflow libs. | |
# Author : Matt Curry | |
# GH : MattCurryCom | |
# | |
#### | |
USER= |
This file contains 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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace |
This file contains 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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
This file contains 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 | |
""" | |
Local privilege escalation via snapd, affecting Ubuntu and others. | |
Discovered by Chris Moberly. | |
Before running, you need to: | |
- Create an Ubuntu developer account (https://snapcraft.io/) | |
- Login to that account and ensure you have your public SSH key configured | |
in your profile. |
This file contains 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
PS1="\[\033[0;31m\]\[\033)0\016\]\[\]lq\[\017\033(B\](\[\033[1;37m\]\!\[\033[0;31m\])(\[\033[1;37m\]\u\[\033[0;31m\]@\[\033[1;37m\]\h\[\033[0;31m\])-(\[\e[1;37m\]Jobs: \j\[\033[0;31m\])-(\[\033[1;37m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files, \$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b\[\033[0;31m\])\n\[\033)0\016\]\[\]mq\[\017\033(B\](\[\033[1;37m\]\T\[\033[0;31m\])-(\[\033[1;37m\]\w\[\033[0;31m\])\[\033[0;31m\]->\[\033[0m\]" |
NewerOlder