Compare commits
1
Commits
main
..
6a2a10df79
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a2a10df79 |
No files matched your search
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"haveibeenpwned-downloader": {
|
||||
"version": "0.5.25",
|
||||
"commands": [
|
||||
"haveibeenpwned-downloader"
|
||||
],
|
||||
"rollForward": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
* text eol=lf
|
||||
*.txt text eol=lf
|
||||
*.sh text eol=lf
|
||||
*.ini text eol=lf
|
||||
*.yml text eol=lf
|
||||
*.md text eol=lf
|
||||
.env text eol=lf
|
||||
*.ps1 text eol=crlf
|
||||
*.bat text eol=
|
||||
*.pdf binary
|
||||
*.doc binary
|
||||
@@ -1,5 +0,0 @@
|
||||
*/webhook.txt
|
||||
*/tag.txt
|
||||
*.tmp
|
||||
*.csv
|
||||
*.sha256
|
||||
@@ -1,218 +0,0 @@
|
||||
---
|
||||
- name: 'Configure Remote Servers'
|
||||
hosts: remoteservers
|
||||
vars_files:
|
||||
- './variables.yml'
|
||||
tasks:
|
||||
# packages
|
||||
- name: 'Updating apt cache'
|
||||
apt:
|
||||
force_apt_get: True
|
||||
update_cache: True
|
||||
- name: 'Upgrading all apt packages'
|
||||
apt:
|
||||
force_apt_get: True
|
||||
upgrade: full
|
||||
become: yes
|
||||
- name: 'Selected packages to install:'
|
||||
debug:
|
||||
msg: "{{ item }}"
|
||||
loop: "{{ list_of_packages }}"
|
||||
- name: "Installing packages"
|
||||
apt:
|
||||
force_apt_get: True
|
||||
name: "{{ list_of_packages }}"
|
||||
state: present
|
||||
- name: 'Remove useless packages from the cache'
|
||||
apt:
|
||||
force_apt_get: True
|
||||
autoclean: yes
|
||||
- name: 'Run the equivalent of apt-get clean'
|
||||
apt:
|
||||
force_apt_get: True
|
||||
clean: yes
|
||||
# add and configure the user
|
||||
- name: "Add the user {{ new_username }}"
|
||||
user:
|
||||
name: "{{ new_username }}"
|
||||
shell: "{{ login_shell }}"
|
||||
# password: "{{ user_password }}"
|
||||
groups: 'sudo,www-data'
|
||||
append: yes
|
||||
- name: "Set authorized key for {{ new_username }}"
|
||||
ansible.posix.authorized_key:
|
||||
user: "{{ new_username }}"
|
||||
key: "{{ ssh_key_auth }}"
|
||||
state: present
|
||||
# zsh
|
||||
- name: 'Setting up zsh'
|
||||
blockinfile:
|
||||
path: "/home/{{ new_username }}/.zshrc"
|
||||
block: |
|
||||
# Set up the prompt
|
||||
autoload -Uz promptinit
|
||||
promptinit
|
||||
prompt adam1
|
||||
setopt histignorealldups sharehistory
|
||||
# Use emacs keybindings even if our EDITOR is set to vi
|
||||
bindkey -e
|
||||
# Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
|
||||
HISTSIZE=1000
|
||||
SAVEHIST=1000
|
||||
HISTFILE=~/.zsh_history
|
||||
# Use modern completion system
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
zstyle ':completion:*' auto-description 'specify: %d'
|
||||
zstyle ':completion:*' completer _expand _complete _correct _approximate
|
||||
zstyle ':completion:*' format 'Completing %d'
|
||||
zstyle ':completion:*' group-name ''
|
||||
zstyle ':completion:*' menu select=2
|
||||
eval "$(dircolors -b)"
|
||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle ':completion:*' list-colors ''
|
||||
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
||||
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
|
||||
zstyle ':completion:*' menu select=long
|
||||
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
||||
zstyle ':completion:*' use-compctl false
|
||||
zstyle ':completion:*' verbose true
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
||||
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
||||
eval $(thefuck --alias fuck)
|
||||
PATH=~/.local/bin/:$PATH
|
||||
mode: '0744'
|
||||
owner: "{{ new_username }}"
|
||||
group: "{{ new_username }}"
|
||||
state: present
|
||||
create: True
|
||||
# ufw
|
||||
- name: 'UFW default allow everything outgoing'
|
||||
community.general.ufw:
|
||||
default: allow
|
||||
direction: 'outgoing'
|
||||
- name: 'UFW default deny everything incoming'
|
||||
community.general.ufw:
|
||||
default: deny # reject to throw error instead of drop quietly
|
||||
direction: 'incoming'
|
||||
- name: 'UFW enable logging'
|
||||
community.general.ufw:
|
||||
logging: 'on'
|
||||
- name: 'UFW selected rules:'
|
||||
debug:
|
||||
msg: "{{item.name}}/{{item.proto}}"
|
||||
loop: "{{ open_services }}"
|
||||
- name: 'UFW setting rules'
|
||||
community.general.ufw:
|
||||
rule: allow
|
||||
port: "{{ item.name }}"
|
||||
proto: "{{ item.proto }}"
|
||||
loop: "{{ open_services }}"
|
||||
- name: 'UFW enable'
|
||||
community.general.ufw:
|
||||
state: enabled
|
||||
become: yes
|
||||
# unattended upgrades
|
||||
- name: 'Unattended upgrades initial dpkg reconfigure'
|
||||
command:
|
||||
cmd: 'dpkg-reconfigure -f noninteractive unattended-upgrades'
|
||||
become: yes
|
||||
- name: 'Unattended upgrades configure 20auto-upgrades'
|
||||
blockinfile:
|
||||
dest: '/etc/apt/apt.conf.d/20auto-upgrades'
|
||||
block: |
|
||||
APT::Periodic::Update-Package-Lists "1";
|
||||
APT::Periodic::Unattended-Upgrade "1";
|
||||
mode: '0644'
|
||||
owner: 'root'
|
||||
group: 'root'
|
||||
state: present
|
||||
insertafter: EOF
|
||||
become: yes
|
||||
- name: 'Unattended upgrades configure 50unattended-upgrades'
|
||||
blockinfile:
|
||||
dest: '/etc/apt/apt.conf.d/50unattended-upgrades'
|
||||
block: |
|
||||
Unattended-Upgrade::Automatic-Reboot "true";
|
||||
Unattended-Upgrade::Automatic-Reboot-Time "{{ reboot_time }}";
|
||||
create: True
|
||||
insertafter: EOF
|
||||
mode: '0644'
|
||||
owner: 'root'
|
||||
group: 'root'
|
||||
become: yes
|
||||
- name: 'Unattended upgrades configure daily timer'
|
||||
lineinfile:
|
||||
path: '/lib/systemd/system/apt-daily-upgrade.timer'
|
||||
regexp: '^OnCalendar'
|
||||
line: "OnCalendar=*-*-* {{ install_time }}"
|
||||
state: present
|
||||
become: yes
|
||||
- name: 'Unattended upgrades configure reboot offset'
|
||||
lineinfile:
|
||||
path: '/lib/systemd/system/apt-daily-upgrade.timer'
|
||||
regexp: '^RandomizedDelaySec'
|
||||
line: "RandomizedDelaySec={{ reboot_offset }}"
|
||||
state: present
|
||||
become: yes
|
||||
- name: 'Unattended upgrades last dpkg reconfigure'
|
||||
command:
|
||||
cmd: 'dpkg-reconfigure -f noninteractive unattended-upgrades'
|
||||
become: yes
|
||||
# customscripts
|
||||
- name: 'Customscripts download'
|
||||
git:
|
||||
repo: "{{ custom_scripts_repo }}"
|
||||
dest: '/tmp/cscripts'
|
||||
- name: "Create directory {{ custom_scripts_dir }}"
|
||||
file:
|
||||
path: "{{ custom_scripts_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
owner: 'root'
|
||||
group: 'root'
|
||||
become: yes
|
||||
- name: 'Customscripts installing'
|
||||
command:
|
||||
cmd: "cp /tmp/cscripts/customscripts/{{ item }} {{ custom_scripts_dir }}"
|
||||
loop: "{{ custom_scripts }}"
|
||||
become: yes
|
||||
- name: 'Customscripts activating'
|
||||
command:
|
||||
cmd: "chmod 755 {{ custom_scripts_dir }}/{{ item }}"
|
||||
loop: "{{ custom_scripts }}"
|
||||
become: yes
|
||||
# crontabs
|
||||
- name: 'Crontab chkrootkit'
|
||||
cron:
|
||||
name: 'chkrootkit'
|
||||
minute: '0'
|
||||
hour: '8'
|
||||
user: 'root'
|
||||
job: 'chkrootkit -q'
|
||||
state: present
|
||||
become: yes
|
||||
- name: 'Crontab lynis'
|
||||
cron:
|
||||
name: 'lynis'
|
||||
minute: '0'
|
||||
hour: '11'
|
||||
user: 'root'
|
||||
job: 'lynis -q'
|
||||
state: present
|
||||
become: yes
|
||||
# enable services
|
||||
- name: 'enable/restart nginx'
|
||||
service:
|
||||
name: 'nginx'
|
||||
enabled: True
|
||||
state: 'restarted'
|
||||
become: yes
|
||||
- name: 'enable/restart ssh'
|
||||
service:
|
||||
name: 'ssh'
|
||||
enabled: True
|
||||
state: 'restarted'
|
||||
become: yes
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
[remoteservers]
|
||||
someserver ansible_user=root ansible_host=1.1.1.1
|
||||
@@ -1,10 +0,0 @@
|
||||
cd ~ && mkdir ansible-playbook && cd ansible-playbook
|
||||
ansible-playbook ansible-playbook.yml -i inventory.ini
|
||||
ansible remoteservers -m ping
|
||||
|
||||
# errata
|
||||
ssh root@ip
|
||||
passwd princesspi
|
||||
sudo nano /etc/ssh/sshd_config
|
||||
sudo ufw allow 8888
|
||||
sudo bash /usr/share/customscripts/crowdsec.sh
|
||||
@@ -1,230 +0,0 @@
|
||||
- name: "Install python3"
|
||||
apt:
|
||||
name: python3
|
||||
state: present
|
||||
- name: "Install python3-pip"
|
||||
apt:
|
||||
name: python3-pip
|
||||
state: present
|
||||
- name: "Install python3-virtualenv"
|
||||
apt:
|
||||
name: python3-virtualenv
|
||||
state: present
|
||||
- name: "Install thefuck"
|
||||
apt:
|
||||
name: thefuck
|
||||
state: present
|
||||
- name: "Install python3-setuptools"
|
||||
apt:
|
||||
name: python3-setuptools
|
||||
state: present
|
||||
- name: "Install nginx"
|
||||
apt:
|
||||
name: nginx
|
||||
state: present
|
||||
- name: "Install wget"
|
||||
apt:
|
||||
name: wget
|
||||
state: present
|
||||
- name: "Install htop"
|
||||
apt:
|
||||
name: htop
|
||||
state: present
|
||||
- name: "Install btop"
|
||||
apt:
|
||||
name: btop
|
||||
state: present
|
||||
- name: "Install lynx"
|
||||
apt:
|
||||
name: lynx
|
||||
state: present
|
||||
- name: "Install neovim"
|
||||
apt:
|
||||
name: neovim
|
||||
state: present
|
||||
- name: "Install docker.io"
|
||||
apt:
|
||||
name: docker.io
|
||||
state: present
|
||||
- name: "Install docker-compose"
|
||||
apt:
|
||||
name: docker-compose
|
||||
state: present
|
||||
- name: "Install screen"
|
||||
apt:
|
||||
name: screen
|
||||
state: present
|
||||
- name: "Install byobu"
|
||||
apt:
|
||||
name: byobu
|
||||
state: present
|
||||
- name: "Install zsh"
|
||||
apt:
|
||||
name: zsh
|
||||
state: present
|
||||
- name: "Install nmap"
|
||||
apt:
|
||||
name: nmap
|
||||
state: present
|
||||
- name: "Install iptraf"
|
||||
apt:
|
||||
name: iptraf
|
||||
state: present
|
||||
- name: "Install iotop"
|
||||
apt:
|
||||
name: iotop
|
||||
state: present
|
||||
- name: "Install zip"
|
||||
apt:
|
||||
name: zip
|
||||
state: present
|
||||
- name: "Install unzip"
|
||||
apt:
|
||||
name: unzip
|
||||
state: present
|
||||
- name: "Install net-tools"
|
||||
apt:
|
||||
name: net-tools
|
||||
state: present
|
||||
- name: "Install git"
|
||||
apt:
|
||||
name: git
|
||||
state: present
|
||||
- name: "Install chkrootkit"
|
||||
apt:
|
||||
name: chkrootkit
|
||||
state: present
|
||||
- name: "Install fail2ban"
|
||||
apt:
|
||||
name: fail2ban
|
||||
state: present
|
||||
- name: "Install lynis"
|
||||
apt:
|
||||
name: lynis
|
||||
state: present
|
||||
|
||||
|
||||
# thefuck
|
||||
- name: "thefuck append to .zshrc"
|
||||
lineinfile:
|
||||
path: "/home/{{ username }}/.zshrc"
|
||||
line: 'eval $(thefuck --alias fuck)'
|
||||
insertafter: EOF
|
||||
mode: '0744'
|
||||
owner: "{{ username }}"
|
||||
group: "{{ username }}"
|
||||
state: present
|
||||
create: True
|
||||
|
||||
# PATH
|
||||
- name: ".zshrc PATH adding ~/.local/bin"
|
||||
lineinfile:
|
||||
path: "/home/{{ username }}/.zshrc"
|
||||
line: 'PATH=~/.local/bin/:$PATH'
|
||||
state: present
|
||||
insertafter: EOF
|
||||
mode: "0744"
|
||||
owner: "{{ username }}"
|
||||
group: "{{ username }}"
|
||||
create: True
|
||||
become: True
|
||||
become_method: su
|
||||
become_user: "{{ username }}"
|
||||
|
||||
|
||||
# ssh
|
||||
- name: "SSH allow {{ username }} only"
|
||||
lineinfile:
|
||||
path: '/etc/ssh/sshd_config'
|
||||
line: "AllowUsers {{ username }}"
|
||||
state: present
|
||||
insertafter: EOF
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
- name: 'SSH disable password auth'
|
||||
lineinfile:
|
||||
path: '/etc/ssh/sshd_config'
|
||||
regexp: '^PermitRootLogin'
|
||||
line: 'PermitRootLogin no'
|
||||
state: present
|
||||
insertafter: EOF
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
|
||||
- name: "UFW allow ssh"
|
||||
community.general.ufw:
|
||||
rule: allow
|
||||
port: ssh
|
||||
proto: tcp
|
||||
delete: true
|
||||
- name: "UFW allow http"
|
||||
community.general.ufw:
|
||||
rule: allow
|
||||
port: http
|
||||
proto: any
|
||||
delete: true
|
||||
- name: "UFW allow https"
|
||||
community.general.ufw:
|
||||
rule: allow
|
||||
port: https
|
||||
proto: any
|
||||
delete: true
|
||||
|
||||
|
||||
- name: 'Customscripts download'
|
||||
command:
|
||||
cmd: 'git clone https://gitlab.com/princesspi/general-scripts-and-system-ssssssetup.git /tmp/cscripts'
|
||||
become: yes
|
||||
|
||||
|
||||
|
||||
- name: "Create directory {{ custom_scripts_dir }}"
|
||||
file:
|
||||
path: "{{ custom_scripts_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
owner: 'root'
|
||||
group: 'root'
|
||||
become: yes
|
||||
- name: 'Customscripts copy add_user_ssh.sh'
|
||||
copy:
|
||||
remote_src: False
|
||||
src: '/tmp/cscripts/customscripts/add_user_ssh.sh'
|
||||
dest: "{{ custom_scripts_dir }}/add_user_ssh.sh"
|
||||
mode: '0744'
|
||||
owner: 'root'
|
||||
group: 'root'
|
||||
become: yes
|
||||
- name: "Customscripts copy crowdsec.sh"
|
||||
copy:
|
||||
remote_src: False
|
||||
src: '/tmp/cscripts/customscripts/crowdsec.sh'
|
||||
dest: "{{ custom_scripts_dir }}/crowdsec.sh"
|
||||
mode: '0744'
|
||||
owner: 'root'
|
||||
group: 'root'
|
||||
become: yes
|
||||
- name: "Customscripts copy fix_permissions.sh"
|
||||
copy:
|
||||
remote_src: False
|
||||
src: '/tmp/cscripts/customscripts/fix_permissions.sh'
|
||||
dest: "{{ custom_scripts_dir }}/fix_permissions.sh"
|
||||
mode: '0744'
|
||||
owner: 'root'
|
||||
group: 'root'
|
||||
become: yes
|
||||
|
||||
# crowdsec
|
||||
- name: 'Crowdsec'
|
||||
command:
|
||||
cmd: "bash {{ custom_scripts_dir }}/crowdsec.sh"
|
||||
become: yes
|
||||
|
||||
- name: 'enable/restart crowdsec'
|
||||
service:
|
||||
name: 'crowdsec'
|
||||
enabled: True
|
||||
state: 'restarted'
|
||||
@@ -1,48 +0,0 @@
|
||||
new_username: 'princesspi'
|
||||
install_time: '02:00'
|
||||
reboot_time: '03:00'
|
||||
reboot_offset: '20m'
|
||||
login_shell: '/usr/bin/zsh' # which zsh
|
||||
custom_scripts_dir: '/usr/share/customscripts'
|
||||
custom_scripts_repo: 'https://github.com/PrincessPi3/general-scripts-and-system-ssssssetup.git'
|
||||
# password is precalculated hash
|
||||
# mkpasswd --method=sha-512
|
||||
# defaultpassword###
|
||||
# user_password: '$6$n3ybB6uVX.BwKiR4$vjENClERci2hmAkn9d9a8EUFAfnUlsH.R6/8EIXx1bu.k.bC7l/aE//s9ONw/PcbSQ2.hRdUgjxFrJ54/NhBm0'
|
||||
ssh_key_auth: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP2D+9oYQlTnu1zeVi2gHfTKE7+DDWiu1EibXNwB9g72'
|
||||
list_of_packages:
|
||||
- 'unattended-upgrades'
|
||||
- 'python3'
|
||||
- 'python3-pip'
|
||||
- 'python3-virtualenv'
|
||||
- 'python3-setuptools'
|
||||
- 'thefuck'
|
||||
- 'nginx'
|
||||
- 'wget'
|
||||
- 'htop'
|
||||
- 'btop'
|
||||
- 'lynx'
|
||||
- 'neovim'
|
||||
- 'docker.io'
|
||||
- 'docker-compose'
|
||||
- 'screen'
|
||||
- 'byobu'
|
||||
- 'zsh'
|
||||
- 'nmap'
|
||||
- 'iptraf'
|
||||
- 'iotop'
|
||||
- 'zip'
|
||||
- 'unzip'
|
||||
- 'net-tools'
|
||||
- 'git'
|
||||
- 'chkrootkit'
|
||||
- 'fail2ban'
|
||||
- 'lynis'
|
||||
open_services:
|
||||
- { name: 'ssh', proto: 'tcp' }
|
||||
- { name: 'http', proto: 'tcp' }
|
||||
- { name: 'https', proto: 'tcp' }
|
||||
custom_scripts:
|
||||
- 'crowdsec.sh'
|
||||
- 'add_user_ssh.sh'
|
||||
- 'fix_permissions.sh'
|
||||
@@ -1,87 +0,0 @@
|
||||
0) Anything inside < and > for example <service name> is a bit of text you provide so if I say "<password>" you would replace with something like "password123"
|
||||
1) acquire btc
|
||||
spot app
|
||||
coinmama
|
||||
2) tumble btc deep web
|
||||
3) put btc in deep web wallet
|
||||
4) launch host on bithost
|
||||
https://bithost.io
|
||||
// Ubuntu 20.04 LTS with minimum 1gb RAM
|
||||
5) lock down bitohst jump box to VPN IP
|
||||
6) generate keys on bithost
|
||||
5) get key from sporehost and launch server
|
||||
http://spore64i5sofqlfz5gq2ju4msgzojjwifls7rok2cti624zyq3fcelad.onion/
|
||||
6) log in from bithost on VPN
|
||||
sudo -i
|
||||
apt update
|
||||
apt upgrade
|
||||
ufw allow ssh
|
||||
ufw enable
|
||||
apt install apache2 tor mysql-server php libapache2-mod-php php-mysql php-curl php-gd screen iotop zip unzip lynx htop chkrootkit lynis certbot fail2ban python3 python3-pip curl nmap
|
||||
a2enmod ssl
|
||||
systemctl restart apache2
|
||||
mysql_secure_installation
|
||||
password validation: 2
|
||||
// update phpmyadmin repo/install from git pull
|
||||
// this is a workaround for an old phpmyadmin repo on the 20.04 LTS
|
||||
// mysql -h localhost -u root -p
|
||||
// UNINSTALL COMPONENT 'file://component_validate_password';
|
||||
// CREATE USER 'rootuser'@'localhost' IDENTIFIED BY '<Secure Password>'; // REMEMBER THIS PASSWORD
|
||||
// GRANT ALL PRIVILEGES ON *.* TO 'rootuser'@'localhost';
|
||||
// FLUSH PRIVILEGES;
|
||||
// quit;
|
||||
apt install phpmyadmin //change to git pull OR updated manual repo
|
||||
[x] apache2
|
||||
[x] YES
|
||||
[Secure Password] // REMEMBER THIS PASSWORD
|
||||
cd /var/www/html
|
||||
ln -s /usr/share/phpmyadmin
|
||||
mv phpmyadmin pma
|
||||
//to access phpmyadmin, go to http://<ip address>/pma //log in with user rootuser and your password from before
|
||||
systemctl enable tor
|
||||
systemctl start tor
|
||||
mkdir /var/www/<servicename>
|
||||
nano /etc/tor/torrc
|
||||
Ctrl+W "hidden"
|
||||
>uncomment hidden service 127.0.0.1:80
|
||||
>uncomment hidden service dir, name /var/lib/tor/<servicename>
|
||||
Ctrl+X
|
||||
Y
|
||||
systemctl restart tor
|
||||
comment out logging
|
||||
nano /etc/apache2/sites-available/<service name>.conf
|
||||
|
||||
<VirtualHost localhost:80>
|
||||
DocumentRoot /var/www/<servicename>
|
||||
</VirtualHost>
|
||||
Ctrl+X
|
||||
Y
|
||||
a2ensite <service name>
|
||||
systemctl restart apache2
|
||||
cat /var/lib/tor/<service name>/hostname
|
||||
save onion address, its your hostname!
|
||||
// scallion
|
||||
|
||||
|
||||
mkdir /usr/share/scripts
|
||||
nano /usr/share/scripts/perms.sh
|
||||
```
|
||||
#!/bin/bash
|
||||
chown -R www-data:www-data /var/www/*
|
||||
find /var/www/* -type d -exec chmod g=rwx "{}" \;
|
||||
find /var/www/* -type f -exec chmod g=rw "{}" \;
|
||||
```
|
||||
Ctrl+X
|
||||
Y
|
||||
chmod +x /usr/share/scripts/perms.sh
|
||||
sh /usr/share/scripts/perms.sh
|
||||
crontab -e
|
||||
1
|
||||
at bottom add
|
||||
```
|
||||
0 8 * * * chkrootkit -q
|
||||
0 11 * * 0 lynis -q
|
||||
0 */6 * * * apt update; apt -y upgrade;
|
||||
```
|
||||
Ctrl+X
|
||||
Y
|
||||
@@ -1,84 +0,0 @@
|
||||
1) acquire btc
|
||||
spot app
|
||||
coinmama
|
||||
2) tumble btc deep web
|
||||
3) put btc in deep web wallet
|
||||
4) launch host on bithost
|
||||
https://bithost.io
|
||||
// Ubuntu 20.04 LTS with minimum 1gb RAM
|
||||
5) lock down bitohst jump box to VPN IP
|
||||
6) generate keys on bithost
|
||||
5) get key from sporehost and launch server
|
||||
http://spore64i5sofqlfz5gq2ju4msgzojjwifls7rok2cti624zyq3fcelad.onion/
|
||||
6) log in from bithost on VPN
|
||||
sudo -i
|
||||
apt update
|
||||
apt upgrade
|
||||
ufw allow ssh
|
||||
ufw enable
|
||||
apt install apache2 tor mysql-server php libapache2-mod-php php-mysql php-curl php-gd screen iotop zip unzip lynx htop chkrootkit lynis certbot fail2ban python3 python3-pip curl nmap
|
||||
a2enmod sslsystemctl restart apache2
|
||||
mysql_secure_installation
|
||||
password validation: 2
|
||||
// this is a workaround for an old phpmyadmin repo on the 20.04 LTS
|
||||
// mysql -h localhost -u root -p
|
||||
// UNINSTALL COMPONENT 'file://component_validate_password';
|
||||
// CREATE USER 'rootuser'@'localhost' IDENTIFIED BY '<Secure Password>'; // REMEMBER THIS PASSWORD
|
||||
// GRANT ALL PRIVILEGES ON *.* TO 'rootuser'@'localhost';
|
||||
// FLUSH PRIVILEGES;
|
||||
// quit;
|
||||
apt install phpmyadmin //change to git pull OR updated manual repo
|
||||
[x] apache2
|
||||
[x] YES
|
||||
[Secure Password] // REMEMBER THIS PASSWORD
|
||||
cd /var/www/html
|
||||
ln -s /usr/share/phpmyadmin
|
||||
mv phpmyadmin pma
|
||||
//to access phpmyadmin, go to http://<ip address>/pma //log in with user rootuser and your password from before
|
||||
systemctl enable tor
|
||||
systemctl start tor
|
||||
mkdir /var/www/<servicename>
|
||||
nano /etc/tor/torrc
|
||||
Ctrl+W "hidden"
|
||||
>uncomment hidden service 127.0.0.1:80
|
||||
>uncomment hidden service dir, name /var/lib/tor/<servicename>
|
||||
Ctrl+X
|
||||
Y
|
||||
systemctl restart tor
|
||||
comment out logging
|
||||
nano /etc/apache2/sites-available/<service name>.conf
|
||||
|
||||
<VirtualHost localhost:80>
|
||||
DocumentRoot /var/www/<servicename>
|
||||
</VirtualHost>
|
||||
Ctrl+X
|
||||
Y
|
||||
a2ensite <service name>
|
||||
systemctl restart apache2
|
||||
cat /var/lib/tor/<service name>/hostname
|
||||
save onion address, its your hostname!
|
||||
// scallion
|
||||
|
||||
|
||||
mkdir /usr/share/scripts
|
||||
nano /usr/share/scripts/perms.sh
|
||||
```
|
||||
#!/bin/bash
|
||||
chown -R www-data:www-data /var/www/*
|
||||
find /var/www/* -type d -exec chmod g=rwx "{}" \;
|
||||
find /var/www/* -type f -exec chmod g=rw "{}" \;
|
||||
```
|
||||
Ctrl+X
|
||||
Y
|
||||
chmod +x /usr/share/scripts/perms.sh
|
||||
sh /usr/share/scripts/perms.sh
|
||||
crontab -e
|
||||
1
|
||||
at bottom add
|
||||
```
|
||||
0 8 * * * chkrootkit -q
|
||||
0 11 * * 0 lynis -q
|
||||
0 */6 * * * apt update; apt -y upgrade;
|
||||
```
|
||||
Ctrl+X
|
||||
Y
|
||||
@@ -0,0 +1,121 @@
|
||||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
||||
@@ -1,123 +0,0 @@
|
||||
#IPTABLES RULES
|
||||
iptables -A INPUT -p tcp -m tcp --tcp-flags RST RST -m limit --limit 2/second --limit-burst 2 -j ACCEPT
|
||||
iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP
|
||||
iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP
|
||||
iptables -t mangle -A PREROUTING -p tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j DROP
|
||||
iptables -t mangle -A PREROUTING -p tcp --tcp-flags FIN,SYN FIN,SYN -j DROP
|
||||
iptables -t mangle -A PREROUTING -p tcp --tcp-flags SYN,RST SYN,RST -j DROP
|
||||
iptables -t mangle -A PREROUTING -p tcp --tcp-flags FIN,RST FIN,RST -j DROP
|
||||
iptables -t mangle -A PREROUTING -p tcp --tcp-flags FIN,ACK FIN -j DROP
|
||||
iptables -t mangle -A PREROUTING -p tcp --tcp-flags ACK,URG URG -j DROP
|
||||
iptables -t mangle -A PREROUTING -p tcp --tcp-flags ACK,FIN FIN -j DROP
|
||||
iptables -t mangle -A PREROUTING -p tcp --tcp-flags ACK,PSH PSH -j DROP
|
||||
iptables -t mangle -A PREROUTING -p tcp --tcp-flags ALL ALL -j DROP
|
||||
iptables -t mangle -A PREROUTING -p tcp --tcp-flags ALL NONE -j DROP
|
||||
iptables -t mangle -A PREROUTING -p tcp --tcp-flags ALL FIN,PSH,URG -j DROP
|
||||
iptables -t mangle -A PREROUTING -p tcp --tcp-flags ALL SYN,FIN,PSH,URG -j DROP
|
||||
iptables -t mangle -A PREROUTING -p tcp --tcp-flags ALL SYN,RST,ACK,FIN,URG -j DROP
|
||||
iptables -t mangle -A PREROUTING -s 224.0.0.0/3 -j DROP
|
||||
iptables -t mangle -A PREROUTING -s 169.254.0.0/16 -j DROP
|
||||
iptables -t mangle -A PREROUTING -s 172.16.0.0/12 -j DROP
|
||||
iptables -t mangle -A PREROUTING -s 192.0.2.0/24 -j DROP
|
||||
iptables -t mangle -A PREROUTING -s 192.168.0.0/16 -j DROP
|
||||
iptables -t mangle -A PREROUTING -s 10.0.0.0/8 -j DROP
|
||||
iptables -t mangle -A PREROUTING -s 0.0.0.0/8 -j DROP
|
||||
iptables -t mangle -A PREROUTING -s 240.0.0.0/5 -j DROP
|
||||
iptables -t mangle -A PREROUTING -s 127.0.0.0/8 ! -i lo -j DROP
|
||||
iptables -t mangle -A PREROUTING -p icmp -j DROP
|
||||
iptables -A INPUT -p tcp -m connlimit --connlimit-above 80 -j REJECT --reject-with tcp-reset
|
||||
iptables -A INPUT -p tcp -m conntrack --ctstate NEW -m limit --limit 60/s --limit-burst 20 -j ACCEPT
|
||||
iptables -A INPUT -p tcp -m conntrack --ctstate NEW -j DROP
|
||||
iptables -t mangle -A PREROUTING -f -j DROP
|
||||
iptables -A INPUT -p tcp --tcp-flags RST RST -m limit --limit 2/s --limit-burst 2 -j ACCEPT
|
||||
iptables -A INPUT -p tcp --tcp-flags RST RST -j DROP
|
||||
iptables -t raw -A PREROUTING -p tcp -m tcp --syn -j CT --notrack
|
||||
iptables -A INPUT -p tcp -m tcp -m conntrack --ctstate INVALID,UNTRACKED -j SYNPROXY --sack-perm --timestamp --wscale 7 --mss 1460
|
||||
iptables -A INPUT -m conntrack --ctstate INVALID -j DROP
|
||||
iptables -A INPUT -p tcp --dport ssh -m conntrack --ctstate NEW -m recent --set
|
||||
iptables -A INPUT -p tcp --dport ssh -m conntrack --ctstate NEW -m recent --update --seconds 60 --hitcount 10 -j DROP
|
||||
iptables -N port-scanning
|
||||
iptables -A port-scanning -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s --limit-burst 2 -j RETURN
|
||||
iptables -A port-scanning -j DROP
|
||||
iptables -A INPUT -p tcp -m tcp --dport 139 -m recent --name portscan --set -j LOG --log-prefix "portscan:"
|
||||
iptables -A INPUT -p tcp -m tcp --dport 139 -m recent --name portscan --set -j DROP
|
||||
iptables -A FORWARD -p tcp -m tcp --dport 139 -m recent --name portscan --set -j LOG --log-prefix "portscan:"
|
||||
iptables -A FORWARD -p tcp -m tcp --dport 139 -m recent --name portscan --set -j DROP
|
||||
iptables -A INPUT -m recent --name portscan --remove
|
||||
iptables -A FORWARD -m recent --name portscan --remove
|
||||
iptables -A INPUT -m recent --name portscan --rcheck --seconds 86400 -j DROP
|
||||
iptables -A FORWARD -m recent --name portscan --rcheck --seconds 86400 -j DROP
|
||||
|
||||
#KERNEL RULES
|
||||
kernel.printk = 4 4 1 7
|
||||
kernel.panic = 10
|
||||
kernel.sysrq = 0
|
||||
kernel.shmmax = 4294967296
|
||||
kernel.shmall = 4194304
|
||||
kernel.core_uses_pid = 1
|
||||
kernel.msgmnb = 65536
|
||||
kernel.msgmax = 65536
|
||||
vm.swappiness = 20
|
||||
vm.dirty_ratio = 80
|
||||
vm.dirty_background_ratio = 5
|
||||
fs.file-max = 2097152
|
||||
net.core.netdev_max_backlog = 262144
|
||||
net.core.rmem_default = 31457280
|
||||
net.core.rmem_max = 67108864
|
||||
net.core.wmem_default = 31457280
|
||||
net.core.wmem_max = 67108864
|
||||
net.core.somaxconn = 65535
|
||||
net.core.optmem_max = 25165824
|
||||
net.ipv4.neigh.default.gc_thresh1 = 4096
|
||||
net.ipv4.neigh.default.gc_thresh2 = 8192
|
||||
net.ipv4.neigh.default.gc_thresh3 = 16384
|
||||
net.ipv4.neigh.default.gc_interval = 5
|
||||
net.ipv4.neigh.default.gc_stale_time = 120
|
||||
net.netfilter.nf_conntrack_max = 10000000
|
||||
net.netfilter.nf_conntrack_tcp_loose = 0
|
||||
net.netfilter.nf_conntrack_tcp_timeout_established = 1800
|
||||
net.netfilter.nf_conntrack_tcp_timeout_close = 10
|
||||
net.netfilter.nf_conntrack_tcp_timeout_close_wait = 10
|
||||
net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 20
|
||||
net.netfilter.nf_conntrack_tcp_timeout_last_ack = 20
|
||||
net.netfilter.nf_conntrack_tcp_timeout_syn_recv = 20
|
||||
net.netfilter.nf_conntrack_tcp_timeout_syn_sent = 20
|
||||
net.netfilter.nf_conntrack_tcp_timeout_time_wait = 10
|
||||
net.ipv4.tcp_slow_start_after_idle = 0
|
||||
net.ipv4.ip_local_port_range = 1024 65000
|
||||
net.ipv4.ip_no_pmtu_disc = 1
|
||||
net.ipv4.route.flush = 1
|
||||
net.ipv4.route.max_size = 8048576
|
||||
net.ipv4.icmp_echo_ignore_broadcasts = 1
|
||||
net.ipv4.icmp_ignore_bogus_error_responses = 1
|
||||
net.ipv4.tcp_congestion_control = htcp
|
||||
net.ipv4.tcp_mem = 65536 131072 262144
|
||||
net.ipv4.udp_mem = 65536 131072 262144
|
||||
net.ipv4.tcp_rmem = 4096 87380 33554432
|
||||
net.ipv4.udp_rmem_min = 16384
|
||||
net.ipv4.tcp_wmem = 4096 87380 33554432
|
||||
net.ipv4.udp_wmem_min = 16384
|
||||
net.ipv4.tcp_max_tw_buckets = 1440000
|
||||
net.ipv4.tcp_tw_recycle = 0
|
||||
net.ipv4.tcp_tw_reuse = 1
|
||||
net.ipv4.tcp_max_orphans = 400000
|
||||
net.ipv4.tcp_window_scaling = 1
|
||||
net.ipv4.tcp_rfc1337 = 1
|
||||
net.ipv4.tcp_syncookies = 1
|
||||
net.ipv4.tcp_synack_retries = 1
|
||||
net.ipv4.tcp_syn_retries = 2
|
||||
net.ipv4.tcp_max_syn_backlog = 16384
|
||||
net.ipv4.tcp_timestamps = 1
|
||||
net.ipv4.tcp_sack = 1
|
||||
net.ipv4.tcp_fack = 1
|
||||
net.ipv4.tcp_ecn = 2
|
||||
net.ipv4.tcp_fin_timeout = 10
|
||||
net.ipv4.tcp_keepalive_time = 600
|
||||
net.ipv4.tcp_keepalive_intvl = 60
|
||||
net.ipv4.tcp_keepalive_probes = 10
|
||||
net.ipv4.tcp_no_metrics_save = 1
|
||||
net.ipv4.ip_forward = 1
|
||||
net.ipv4.conf.all.accept_redirects = 0
|
||||
net.ipv4.conf.all.send_redirects = 0
|
||||
net.ipv4.conf.all.accept_source_route = 0
|
||||
net.ipv4.conf.all.rp_filter = 1
|
||||
@@ -1,16 +0,0 @@
|
||||
<VirtualHost $IP:443>
|
||||
DocumentRoot /var/www/$DOMAIN
|
||||
ServerName $DOMAIN
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/letsencrypt/live/$DOMAIN/fullchain.pem
|
||||
SSLCertificateKeyFile /etc/letsencrypt/live/$DOMAIN/privkey.pem
|
||||
SSLProtocol all -SSLv2 -SSLv3
|
||||
SSLHonorCipherOrder on
|
||||
SSLCipherSuite "HIGH:!aNULL:!MD5:!3DES:!CAMELLIA:!AES128"
|
||||
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost $IP:80>
|
||||
ServerName $DOMAIN
|
||||
Redirect permanent / https://$DOMAIN/
|
||||
</VirtualHost>
|
||||
@@ -1,3 +0,0 @@
|
||||
0 8 * * * chkrootkit -q
|
||||
0 11 * * 0 lynis -q
|
||||
0 0 * * * apt update; apt upgrade -y
|
||||
@@ -1,148 +0,0 @@
|
||||
Ubuntu 24.04.3LTS
|
||||
PHP-default
|
||||
Apache2
|
||||
MySQL+phpmyadmin
|
||||
|
||||
# Step 1
|
||||
sudo -i
|
||||
apt update
|
||||
apt -y upgrade
|
||||
reboot
|
||||
|
||||
# Step 2
|
||||
nano /etc/ssh/sshd_config
|
||||
Change `#PasswordAuthentication yes` to `PasswordAuthentication no`
|
||||
Add line
|
||||
`AllowUsers <username>`
|
||||
|
||||
# Step 3
|
||||
ON WINDOWS:
|
||||
Via PowerShell
|
||||
enable OpenSSH in PowerShell: https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
|
||||
ssh-keygen -t ed25519 -C "<your email address>"
|
||||
use a STRONG PASSPHRASE
|
||||
Hit [Enter] to save keys at DEFAULT location
|
||||
to get your rsa PUBLIC key, do:
|
||||
Press [Windows Logo Key/Start]+R
|
||||
Put in `notepad %USERPROFILE%/.ssh/id_ed25519.pub`
|
||||
hit Enter
|
||||
copy all the text in that file
|
||||
# Technical details: it saves private key at %USERPROFILE%/.ssh/id_ed25519
|
||||
# private key example: C:\Users\potatouser\.ssh\id_ed25519
|
||||
# public key example: C:\Users\potatouser\.ssh\id_ed25519.pub
|
||||
|
||||
|
||||
ON UBUNTU
|
||||
mkdir ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
nano ~/.ssh/authorized_keys
|
||||
<paste rsa PUBLIC key>
|
||||
chmod 600 ~/.ssh/authorized_keys
|
||||
sudo systemctl reload sshd
|
||||
|
||||
TO CONNECT
|
||||
SSH with Windows PowerShell
|
||||
Powershell is installed by default on Windows 10/11
|
||||
ssh <username>@<ipaddress>
|
||||
|
||||
Manage Files with WinSCP:
|
||||
install winscp https://winscp.net/eng/download.php
|
||||
install puttygen https://www.puttygen.com/download.php?val=4
|
||||
run puttygen
|
||||
Click Load
|
||||
Select private key at %USERPROFILE%/.ssh/id_ed25519
|
||||
copy and paste the string of text beginning in ssh-ed25519 and paste
|
||||
save public and private key to %USERPROFILE%/.ssh/ under a %USERPROFILE%/.ssh/id_ed25519.ppk (private)
|
||||
and %USERPROFILE%/.ssh/id_ed25519.ppk.pub (public)
|
||||
run winscp
|
||||
click new site
|
||||
protocol: SFTP
|
||||
host name: <server/ip>
|
||||
username: <username>
|
||||
port number: 22
|
||||
click Advanced
|
||||
on left panel under SSH click Authentication
|
||||
Browse for private key at %USERPROFILE%/.ssh/id_ed25519.ppk
|
||||
ok
|
||||
save
|
||||
|
||||
# Step 4
|
||||
sudo apt install -y git
|
||||
# download and install scripts and tools
|
||||
cd ~
|
||||
git clone https://github.com/PrincessPi3/general-scripts-and-system-ssssssetup.git
|
||||
sudo -i
|
||||
apt install -y apache2 snapd mysql-server byobu nmap screen iotop zip unzip lynx htop php php-cli php-fpm php-json php-common php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath unattended-upgrades net-tools python3 python3-pip unison
|
||||
snap install btop
|
||||
# secure mysql
|
||||
mysql_secure_installation
|
||||
# follow directions, defaults are fine just remember what you set as the root password
|
||||
# install and config phpmyadmin
|
||||
apt install -y phpmyadmin
|
||||
ln -s /usr/share/phpmyadmin /var/www/html/pma
|
||||
# phpmyadmin will be accessable from the public internet at http://<your server ip>/pma
|
||||
# ensure your passwords are up to snuff
|
||||
// TODO: prolly should do some other security shit to protect phpmyadmin
|
||||
systemctl restart apache2
|
||||
systemctl restart mysql
|
||||
# add user to web server group
|
||||
usermod -a -G www-data <username>
|
||||
# unattended upgrades
|
||||
dpkg-reconfigure unattended-upgrades
|
||||
nano /etc/apt/apt.conf.d/50unattended-upgrades
|
||||
change `//Unattended-Upgrade::Automatic-Reboot "false";` to `Unattended-Upgrade::Automatic-Reboot "true";`
|
||||
change `//Unattended-Upgrade::Remove-Unused-Dependencies "false";` to `Unattended-Upgrade::Remove-Unused-Dependencies "true";`
|
||||
change `//Unattended-Upgrade::Mail "root@localhost";` to Unattended-Upgrade::Mail "<your admin email>";`
|
||||
systemctl start unattended-upgrades && systemctl enable unattended-upgrades
|
||||
unattended-upgrade -d -v //test unattended upgrades
|
||||
# uncomplicated firewall setup
|
||||
ufw allow http
|
||||
ufw allow https
|
||||
ufw allow ssh
|
||||
ufw enable
|
||||
reboot
|
||||
|
||||
|
||||
// TODO: backups setup needs more work, not working at current
|
||||
// make unison script pls
|
||||
// SKIP backups section for now
|
||||
# backups
|
||||
sudo -i
|
||||
mkdir -p /backups/log
|
||||
mkdir /backups/backups
|
||||
ln -s /var/backups /backups/system
|
||||
cp -r /home/<user>/general-scripts-and-system-ssssssetup/customscripts /usr/share
|
||||
chmod +x /usr/share/customscripts/*sh
|
||||
nano /usr/share/customscripts/backup.sh //edit to add dirs to back up
|
||||
sh /usr/share/customscripts/crowdsec.sh
|
||||
screen -R backups
|
||||
sh /usr/share/customscripts/backup.sh
|
||||
Ctrl+A+D
|
||||
sh /usr/share/customscripts/fix_permissions.sh
|
||||
|
||||
# Step 5
|
||||
# install some cool securiy tools
|
||||
apt install -y chkrootkit lynis certbot fail2ban
|
||||
crontab -e //instal crons from /home/<user>/general-scripts-and-system-ssssssetup/crontab.txt
|
||||
apt install -y tripwire
|
||||
Follow directions and utilize secure passphrase DO NOT LOSE PASSPHRASE
|
||||
# as primary user (NOT root or sudo, run `exit` if in doubt)
|
||||
pip3 install thefuck
|
||||
echo "# user addons" >> ~/.bashrc
|
||||
echo "PATH=~/.local/bin/:$PATH" >> ~/.bashrc
|
||||
echo 'eval "$(thefuck --alias)"' >> ~/.bashrc
|
||||
echo 'HISTTIMEFORMAT="%Y-%m-%d %T "' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
|
||||
Step 6: # optional
|
||||
IF you want to use sudo without password check:
|
||||
sudo visudo
|
||||
for ONE user:
|
||||
select editor of your choice
|
||||
add `<username> ALL=(ALL) NOPASSWD: ALL`
|
||||
|
||||
OR for all users in the sudo group
|
||||
comment out the line beginning with %sudo soi it looks like #%sudo
|
||||
add `%sudo ALL=(ALL) NOPASSWD: ALL` on any new line
|
||||
save and exit
|
||||
sudo reboot
|
||||
@@ -0,0 +1,3 @@
|
||||
# general-scripts-and-system-ssssssetup
|
||||
|
||||
general scripts and shit
|
||||
@@ -1,115 +0,0 @@
|
||||
# Quick and Dirty Methods (Bash)
|
||||
|
||||
colors
|
||||
```bash
|
||||
# Define color variables
|
||||
PINK='\e[35m'
|
||||
BRIGHT_PINK='\e[95m'
|
||||
RED='\033[0;31m'
|
||||
YELLOW='\033[1;33m'
|
||||
GREEN='\033[0;32m'
|
||||
RESET='\033[0m' # No Color (RESET)
|
||||
# usage echo -e "$PINKpinktext here$RESET"
|
||||
```
|
||||
|
||||
standard peak safety with error handling for shell scripts
|
||||
shell script header to exit on error, failed piping, or unset variable while allowing err trap and custom trapping for error
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# set safety optinonz
|
||||
set -o errexit # fail on error
|
||||
set -o errtrace # run trace on error
|
||||
set -o pipefail # fail on pipe fail
|
||||
set -o nounset # fail on unset var
|
||||
|
||||
# save here to use in error_handle function
|
||||
num_of_args="$#"
|
||||
all_args="$@"
|
||||
|
||||
# Define the cleanup function
|
||||
error_handle() {
|
||||
# CRITICAL: Capture the exit status code before ANY other command runs
|
||||
local exit_code=$?
|
||||
local script_path="$(realpath $0)"
|
||||
local hr='===================================================='
|
||||
echo
|
||||
echo $hr
|
||||
echo -e "🚨 \033[0;31m FATAL ERROR DETECTED \033[0m"
|
||||
echo $hr
|
||||
echo "-> Script : $0"
|
||||
echo "-> Num Script Args : $num_of_args"
|
||||
echo "-> Script Args : $all_args"
|
||||
echo "-> Shell : $SHELL"
|
||||
echo "-> Script Path : $script_path"
|
||||
echo "-> Script (full) : $SHELL $script_path $all_args"
|
||||
echo "-> User : $USER"
|
||||
echo "-> Working Directory : $PWD"
|
||||
echo "-> Failed Command : $BASH_COMMAND"
|
||||
echo "-> Line Number : $LINENO"
|
||||
echo "-> Exit Status : $exit_code"
|
||||
echo "-> Seconds Elapsed : $SECONDS"
|
||||
echo "-> Date Failed : $(date)"
|
||||
# Generate a professional, clean stack traceback
|
||||
echo "-> Stack Trace"
|
||||
printf "\t" # to intent da stack trace
|
||||
local frame=0
|
||||
# Loop backwards through the function execution stack array
|
||||
while caller $frame; do
|
||||
printf "\t" # to indenet da stack trace
|
||||
frame=$((frame + 1))
|
||||
done
|
||||
|
||||
# closing niceties
|
||||
echo
|
||||
echo $hr
|
||||
echo
|
||||
|
||||
# exit with last failcode
|
||||
exit "$exit_code"
|
||||
}
|
||||
|
||||
trap error_handle ERR
|
||||
```
|
||||
|
||||
show every set variale and its value (one liner)
|
||||
```bash
|
||||
for v in $(compgen -v); do echo "$v:$$v"; done
|
||||
```
|
||||
|
||||
run command and display error or success
|
||||
```bash
|
||||
<command>; ret=$? && if [ $ret -ne 0 ]; then echo -e "\n\033[0;31mERRROR! Code: $ret\033[0m"; else echo -e "\033[0;32mOK!\033[0m"; fi
|
||||
```
|
||||
|
||||
# Function to Display succ/err based on error code
|
||||
```bash
|
||||
checkcode () {
|
||||
if [ -z "$1" ]; then
|
||||
echo -e "\n\e[31mERROR!\033[0m chkcode missing return code paramater\n"
|
||||
exit 1
|
||||
else
|
||||
retcode=$1
|
||||
fi
|
||||
|
||||
if [ $retcode -ne 0 ]; then
|
||||
echo -e "\t\e[31mERROR!\033[0m Response Code: $retcode"
|
||||
else
|
||||
echo -e "\t\e[1;32mOK!\e[0m"
|
||||
fi
|
||||
}
|
||||
```
|
||||
|
||||
Test a list of commands if they are present
|
||||
```bash
|
||||
cmds_to_check=(sha256sum sha1sum md5sum openssl scrypt)
|
||||
for cmd in ${cmds_to_check[@]}; do
|
||||
if command -v $cmd &>/dev/null; then
|
||||
# echo -e "\033[0;32mOK!\033[0m $cmd is present"
|
||||
continue
|
||||
else
|
||||
echo -e "\n\n\033[0;31mERROR!\033[0m $cmd not found! please intall! Exiting!\n\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
echo -e "\033[0;32mOK!\033[0m All Needed Commands Available!"
|
||||
```
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 104 KiB |
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
default_files_name="`printf '%s\n' \"${PWD##*/}\"`_checksums_`date +%Y-%m-%d-%H%M-%Z`.sha256" # add da timedate stamp to it
|
||||
|
||||
echo $default_files_name
|
||||
|
||||
exit 0
|
||||
find $PWD -type f -exec sha256sum {} | tee -a files.sha256
|
||||
@@ -1,178 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>File to Base64 Converter</title>
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
body {
|
||||
background-color: #f4f6f8;
|
||||
color: #333;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
padding: 20px;
|
||||
}
|
||||
.container {
|
||||
background: #ffffff;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
||||
padding: 30px;
|
||||
width: 100%;
|
||||
max-width: 650px;
|
||||
}
|
||||
h2 {
|
||||
margin-bottom: 20px;
|
||||
font-size: 1.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
.drop-zone {
|
||||
border: 2px dashed #0066ff;
|
||||
border-radius: 8px;
|
||||
padding: 30px;
|
||||
text-align: center;
|
||||
background-color: #f0f7ff;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s ease, border-color 0.2s ease;
|
||||
}
|
||||
.drop-zone:hover, .drop-zone.dragover {
|
||||
background-color: #e1effe;
|
||||
border-color: #0052cc;
|
||||
}
|
||||
.drop-zone p {
|
||||
color: #555;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
.drop-zone input[type="file"] {
|
||||
display: none;
|
||||
}
|
||||
.output-group {
|
||||
margin-top: 25px;
|
||||
display: none;
|
||||
}
|
||||
.output-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
label {
|
||||
font-weight: 600;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
button {
|
||||
background-color: #0066ff;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 6px 12px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: 0.85rem;
|
||||
transition: background 0.2s ease;
|
||||
}
|
||||
button:hover {
|
||||
background-color: #0052cc;
|
||||
}
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 180px;
|
||||
padding: 12px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 6px;
|
||||
font-family: monospace;
|
||||
font-size: 0.85rem;
|
||||
resize: vertical;
|
||||
background-color: #fafafa;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<h2>File to Base64 Converter</h2>
|
||||
|
||||
<div class="drop-zone" id="dropZone">
|
||||
<p><strong>Click to browse</strong> or drag & drop a file here</p>
|
||||
<input type="file" id="fileInput">
|
||||
</div>
|
||||
|
||||
<div class="output-group" id="outputGroup">
|
||||
<div class="output-header">
|
||||
<label for="base64Output">Base64 Data URL String:</label>
|
||||
<button id="copyBtn">Copy String</button>
|
||||
</div>
|
||||
<textarea id="base64Output" readonly></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const dropZone = document.getElementById('dropZone');
|
||||
const fileInput = document.getElementById('fileInput');
|
||||
const outputGroup = document.getElementById('outputGroup');
|
||||
const base64Output = document.getElementById('base64Output');
|
||||
const copyBtn = document.getElementById('copyBtn');
|
||||
|
||||
// Trigger file dialog on click
|
||||
dropZone.addEventListener('click', () => fileInput.click());
|
||||
|
||||
// File input change handler
|
||||
fileInput.addEventListener('change', (e) => {
|
||||
if (e.target.files.length > 0) {
|
||||
processFile(e.target.files[0]);
|
||||
}
|
||||
});
|
||||
|
||||
// Drag & Drop event handlers
|
||||
dropZone.addEventListener('dragover', (e) => {
|
||||
e.preventDefault();
|
||||
dropZone.classList.add('dragover');
|
||||
});
|
||||
|
||||
['dragleave', 'dragend'].forEach(type => {
|
||||
dropZone.addEventListener(type, () => dropZone.classList.remove('dragover'));
|
||||
});
|
||||
|
||||
dropZone.addEventListener('drop', (e) => {
|
||||
e.preventDefault();
|
||||
dropZone.classList.remove('dragover');
|
||||
if (e.dataTransfer.files.length > 0) {
|
||||
processFile(e.dataTransfer.files[0]);
|
||||
}
|
||||
});
|
||||
|
||||
// Read file as Data URL
|
||||
function processFile(file) {
|
||||
const reader = new FileReader();
|
||||
reader.onload = () => {
|
||||
base64Output.value = reader.result;
|
||||
outputGroup.style.display = 'block';
|
||||
};
|
||||
reader.onerror = (error) => {
|
||||
alert('Error reading file: ' + error);
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
|
||||
// Copy to clipboard
|
||||
copyBtn.addEventListener('click', () => {
|
||||
base64Output.select();
|
||||
navigator.clipboard.writeText(base64Output.value)
|
||||
.then(() => {
|
||||
const originalText = copyBtn.innerText;
|
||||
copyBtn.innerText = 'Copied!';
|
||||
setTimeout(() => copyBtn.innerText = originalText, 2000);
|
||||
})
|
||||
.catch(err => alert('Failed to copy text: ' + err));
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,261 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta value="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>FT4232H PINOUT SOLVER</title>
|
||||
<style>
|
||||
td, th {
|
||||
border: 1px dotted black;
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
div.outmember {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FT4232H Pinout Solver</h1>
|
||||
<p><label for="proto">Select Protocol</label></p>
|
||||
<select id="proto">
|
||||
<option value="null" selected>Select Protocol</option>
|
||||
<option value="uart">UART / Serial / RS232/422/485</option>
|
||||
<option value="spi">SPI</option>
|
||||
<option value="i2c">I2C</option>
|
||||
<option value="jtag">JTAG</option>
|
||||
<option value="bitbang">Bit-Bang</option>
|
||||
<option value="commonpins">Common Pins</option>
|
||||
<option value="config">Config Options / More Info</option>
|
||||
</select>
|
||||
<div id="out">
|
||||
<div id="uart" class="outmember">
|
||||
<h1>UART / Serial / RS232/422/485</h1>
|
||||
For Channels Available: <b>A</b>, <b>B</b>, <b>C</b>, and <b>D</b><br>
|
||||
Max Supported Baud: <b>12 mbaud</b> / <b>12,000,000 baud</b><br><br>
|
||||
<b>UART</b> Channel <b>A</b>:
|
||||
<table>
|
||||
<tr><th>Channel</th> <th>Pin Name</th> <th>Pin No</th> <th>Use</th></tr>
|
||||
<tr><td>A</td> <td>ADBUS 0</td> <td>16</td> <td>TXD / TX / Transmit</td></tr>
|
||||
<tr><td>A</td> <td>ADBUS 1</td> <td>17</td> <td>RXD / RX / Receive</td></tr>
|
||||
<tr><td>A</td> <td>ADBUS 2</td> <td>18</td> <td>RTS# / RTS / Request To Send</td></tr>
|
||||
<tr><td>A</td> <td>ADBUS 3</td> <td>19</td> <td>CTS# / CTS / Clear To Send</td></tr>
|
||||
<tr><td>A</td> <td>ADBUS 4</td> <td>21</td> <td>DTR# / DTR / Data Terminal Ready</td></tr>
|
||||
<tr><td>A</td> <td>ADBUS 5</td> <td>22</td> <td>DTR# / DTR / Data Set Ready</td></tr>
|
||||
<tr><td>A</td> <td>ADBUS 6</td> <td>23</td> <td>DCD# / DCD / Data Carrier Detect</td></tr>
|
||||
<tr><td>A</td> <td>ADBUS 7</td> <td>24</td> <td>RI# / Ring Indicator / TXDEN</td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<b>UART</b> Channel <b>B</b>:
|
||||
<table>
|
||||
<tr><th>Channel</th> <th>Pin Name</th> <th>Pin No</th> <th>Use</th></tr>
|
||||
<tr><td>B</td> <td>BDBUS 0</td> <td>26</td> <td>TXD / TX / Transmit</td></tr>
|
||||
<tr><td>B</td> <td>BDBUS 1</td> <td>27</td> <td>RXD / RX / Receive</td></tr>
|
||||
<tr><td>B</td> <td>BDBUS 2</td> <td>28</td> <td>RTS# / RTS / Request To Send</td></tr>
|
||||
<tr><td>B</td> <td>BDBUS 3</td> <td>29</td> <td>CTS# / CTS / Clear To Send</td></tr>
|
||||
<tr><td>B</td> <td>BDBUS 4</td> <td>30</td> <td>DTR# / DTR / Data Terminal Ready</td></tr>
|
||||
<tr><td>B</td> <td>BDBUS 5</td> <td>32</td> <td>DTR# / DTR / Data Set Ready</td></tr>
|
||||
<tr><td>B</td> <td>BDBUS 6</td> <td>33</td> <td>DCD# / DCD / Data Carrier Detect</td></tr>
|
||||
<tr><td>B</td> <td>BDBUS 7</td> <td>34</td> <td>RI# / Ring Indicator / TXDEN</td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<b>UART</b> Channel <b>C</b>:
|
||||
<table>
|
||||
<tr><th>Channel</th> <th>Pin Name</th> <th>Pin No</th> <th>Use</th></tr>
|
||||
<tr><td>C</td> <td>CDBUS 0</td> <td>38</td> <td>TXD / TX / Transmit</td></tr>
|
||||
<tr><td>C</td> <td>CDBUS 1</td> <td>39</td> <td>RXD / RX / Receive</td></tr>
|
||||
<tr><td>C</td> <td>CDBUS 2</td> <td>40</td> <td>RTS# / RTS / Request To Send</td></tr>
|
||||
<tr><td>C</td> <td>CDBUS 3</td> <td>41</td> <td>CTS# / CTS / Clear To Send</td></tr>
|
||||
<tr><td>C</td> <td>CDBUS 4</td> <td>43</td> <td>DTR# / DTR / Data Terminal Ready</td></tr>
|
||||
<tr><td>C</td> <td>CDBUS 5</td> <td>44</td> <td>DTR# / DTR / Data Set Ready</td></tr>
|
||||
<tr><td>C</td> <td>CDBUS 6</td> <td>45</td> <td>DCD# / DCD / Data Carrier Detect</td></tr>
|
||||
<tr><td>C</td> <td>CDBUS 7</td> <td>46</td> <td>RI# / Ring Indicator / TXDEN</td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<b>UART</b> Channel <b>D</b>:
|
||||
<table>
|
||||
<tr><th>Channel</th> <th>Pin Name</th> <th>Pin No</th> <th>Use</th></tr>
|
||||
<tr><td>D</td> <td>DDBUS 0</td> <td>48</td> <td>TXD / TX / Transmit</td></tr>
|
||||
<tr><td>D</td> <td>DDBUS 1</td> <td>52</td> <td>RXD / RX / Receive</td></tr>
|
||||
<tr><td>D</td> <td>DDBUS 2</td> <td>53</td> <td>RTS# / RTS / Request To Send</td></tr>
|
||||
<tr><td>D</td> <td>DDBUS 3</td> <td>54</td> <td>CTS# / CTS / Clear To Send</td></tr>
|
||||
<tr><td>D</td> <td>DDBUS 4</td> <td>55</td> <td>DTR# / DTR / Data Terminal Ready</td></tr>
|
||||
<tr><td>D</td> <td>DDBUS 5</td> <td>57</td> <td>DTR# / DTR / Data Set Ready</td></tr>
|
||||
<tr><td>D</td> <td>DDBUS 6</td> <td>58</td> <td>DCD# / DCD / Data Carrier Detect</td></tr>
|
||||
<tr><td>D</td> <td>DDBUS 7</td> <td>56</td> <td>RI# / Ring Indicator / TXDEN</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="spi" class="outmember">
|
||||
<h1>SPI / Serial Peripheral Interface</h1>
|
||||
Two Channels Available: <b>A</b> and <b>B</b><br><br>
|
||||
|
||||
<b>SPI</b> Channel <b>A</b>:
|
||||
<table>
|
||||
<tr><th>Channel</th> <th>Pin Name</th> <th>Pin No</th> <th>Use</th></tr>
|
||||
<tr><td>A</td> <td>ADBUS 0</td> <td>12</td> <td>SK / SCLK / TCK / CLK / Serial Clock<td></tr>
|
||||
<tr><td>A</td> <td>ADBUS 1</td> <td>13</td> <td>DO / MISO / Serial Data Output</td></tr>
|
||||
<tr><td>A</td> <td>ADBUS 2</td> <td>14</td> <td>DI / MOSI / Serial Data Input</td></tr>
|
||||
<tr><td>A</td> <td>ADBUS 3</td> <td>15</td> <td>CS / SS / TMS / Chip Select</td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<b>SPI</b> Channel <b>B</b>:
|
||||
<table>
|
||||
<tr><th>Channel</th> <th>Pin Name</th> <th>Pin No</th> <th>Use</th></tr>
|
||||
<tr><td>B</td> <td>BDBUS 0</td> <td>22</td> <td>SK / SCLK / TCK / CLK / Serial Clock</td></tr>
|
||||
<tr><td>B</td> <td>BDBUS 1</td> <td>23</td> <td>DO / MISO / Serial Data Output</td></tr>
|
||||
<tr><td>B</td> <td>BDBUS 2</td> <td>24</td> <td>DI / MOSI / Serial Data Input</td></tr>
|
||||
<tr><td>B</td> <td>BDBUS 3</td> <td>25</td> <td>CS / SS / TMS / Chip Select</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="i2c" class="outmember">
|
||||
<h1>I2C</h1>
|
||||
Two Channels Available: <b>A</b> and <b>B</b><br><br>
|
||||
|
||||
<b>I2C</b> Channel <b>A</b>:
|
||||
<table>
|
||||
<tr><th>Channel</th> <th>Pin Name</th> <th>Pin No</th> <th>Use</th></tr>
|
||||
<tr><td>A</td> <td>ADBUS 0</td> <td>12</td></td> <td>SK / SCLK / TCK / CLK / Serial Clock</td></tr>
|
||||
<tr><td>A</td> <td>ADBUS 1</td> <td>13</td> <td>DO / MISO / Serial Data Output</td></tr>
|
||||
<tr><td>A</td> <td>ADBUS 2</td> <td>14</td> <td>DI / MOSI / Serial Data Input</td></tr>
|
||||
<tr><td>A</td> <td>ADBUS 3</td> <td>15</td> <td>CS / SS / TMS / Chip Select</td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<b>I2C</b> Channel <b>B</b>:
|
||||
<table>
|
||||
<tr><th>Channel</th> <th>Pin Name</th> <th>Pin No</th> <th>Use</th></tr>
|
||||
<tr><td>B</td> <td>BDBUS 0</td> <td>22</td> <td>SK / SCLK / TCK / CLK / Serial Clock</td></tr>
|
||||
<tr><td>B</td> <td>BDBUS 1</td> <td>23</td> <td>DO / MISO / Serial Data Output</td></tr>
|
||||
<tr><td>B</td> <td>BDBUS 2</td> <td>24</td> <td>DI / MOSI / Serial Data Input</td></tr>
|
||||
<tr><td>B</td> <td>BDBUS 3</td> <td>25</td> <td>CS / SS / TMS / Chip Select</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="jtag" class="outmember">
|
||||
<h1>JTAG</h1>
|
||||
Two Channels Available: <b>A</b> and <b>B</b><br><br>
|
||||
|
||||
<b>JTAG</b> Channel <b>A</b>:
|
||||
<table>
|
||||
<tr><th>Channel</th> <th>Pin Name</th> <th>Pin No</th> <th>Use</th></tr>
|
||||
<tr><td>A</td> <td>ADBUS 0</td> <td>12</td> <td>TCK / CLK / Test Interface Clock</td></tr>
|
||||
<tr><td>A</td> <td>ADBUS 1</td> <td>13</td> <td>TDI / DO / Test Data Input</td></tr>
|
||||
<tr><td>A</td> <td>ADBUS 2</td> <td>14</td> <td>TDO / DI / Test Data Output</td></tr>
|
||||
<tr><td>A</td> <td>ADBUS 3</td> <td>15</td> <td>TMS / CS / Test Mode Select</td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<b>JTAG</b> Channel <b>B</b>:
|
||||
<table>
|
||||
<tr><th>Channel</th> <th>Pin Name</th> <th>Pin No</th> <th>Use</th></tr>
|
||||
<tr><td>B</td> <td>BDBUS 0</td> <td>22</td> <td>TCK / CLK / Test Interface Clock</td></tr>
|
||||
<tr><td>B</td> <td>BDBUS 1</td> <td>23</td> <td>TDI / DO / Test Data Input</td></tr>
|
||||
<tr><td>B</td> <td>BDBUS 2</td> <td>24</td> <td>TDO / DI / Test Data Output</td></tr>
|
||||
<tr><td>B</td> <td>BDBUS 3</td> <td>25</td> <td>TMS / CS / Test Mode Select</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="bitbang" class="outmember">
|
||||
<h1>Bit-Bang Interface</h1>
|
||||
Two Channels Available: <b>C</b> and <b>D</b><br><br>
|
||||
|
||||
<b>Big-Bang</b> Channel <b>C</b>:
|
||||
<table>
|
||||
<tr><th>Channel</th> <th>Pin Name</th> <th>Pin No</th> <th>Use</th></tr>
|
||||
<tr><td>C</td> <td>CDBUS 0</td> <td>38</td> <td>D0</td></tr>
|
||||
<tr><td>C</td> <td>CDBUS 1</td> <td>39</td> <td>D1</td></tr>
|
||||
<tr><td>C</td> <td>CDBUS 2</td> <td>40</td> <td>D2</td></tr>
|
||||
<tr><td>C</td> <td>CDBUS 3</td> <td>41</td> <td>D3</td></tr>
|
||||
<tr><td>C</td> <td>CDBUS 4</td> <td>43</td> <td>D4</td></tr>
|
||||
<tr><td>C</td> <td>CDBUS 5</td> <td>44</td> <td>D5</td></tr>
|
||||
<tr><td>C</td> <td>CDBUS 6</td> <td>45</td> <td>D6</td></tr>
|
||||
<tr><td>C</td> <td>CDBUS 7</td> <td>47</td> <td>D7</td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<b>Big-Bang</b> Channel <b>D</b>:
|
||||
<table>
|
||||
<tr><th>Channel</th> <th>Pin Name</th> <th>Pin No</th> <th>Use</th></tr>
|
||||
<tr><td>D</td> <td>DDBUS 0</td> <td>48</td> <td>D0</td></tr>
|
||||
<tr><td>D</td> <td>DDBUS 1</td> <td>52</td> <td>D1</td></tr>
|
||||
<tr><td>D</td> <td>DDBUS 2</td> <td>53</td> <td>D2</td></tr>
|
||||
<tr><td>D</td> <td>DDBUS 3</td> <td>54</td> <td>D3</td></tr>
|
||||
<tr><td>D</td> <td>DDBUS 4</td> <td>55</td> <td>D4</td></tr>
|
||||
<tr><td>D</td> <td>DDBUS 5</td> <td>57</td> <td>D5</td></tr>
|
||||
<tr><td>D</td> <td>DDBUS 6</td> <td>58</td> <td>D6</td></tr>
|
||||
<tr><td>D</td> <td>DDBUS 7</td> <td>59</td> <td>D7</td></tr>
|
||||
</table>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
<div id="commonpins" class="outmember">
|
||||
<h1>Common Pins</h1>
|
||||
<table>
|
||||
<tr><th>Pin Name</th> <th>Pin No</th> <th>Use</th></tr>
|
||||
<tr><td>GND </td> <td>1,5,11,15,25,35,47,51</td> <td>GND / Ground</td></tr>
|
||||
<tr><td>OSCI</td> <td>2</td> <td>Oscillator Input</td></tr>
|
||||
<tr><td>OSCO</td> <td>3</td> <td>Oscillator Output</td></tr>
|
||||
<tr><td>REF</td> <td>6</td> <td>Current Reference Input - connect via 12Ko resistor @1% to GND</td></tr>
|
||||
<tr><td>RESET#</td> <td>14</td> <td>Reset Input (Active Low)</td></tr>
|
||||
</table>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
<div id="config" class="outmember">
|
||||
<h1>Config Options / More Info</h1>
|
||||
|
||||
<b>Links:</b>
|
||||
<ul>
|
||||
<li><a href="data:application/pdf;base64,JVBERi0xLjcNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvTGFuZyhlbikgL1N0cnVjdFRyZWVSb290IDQzMyAwIFIvT3V0bGluZXMgMzcyIDAgUi9NYXJrSW5mbzw8L01hcmtlZCB0cnVlPj4vTWV0YWRhdGEgNjEzNCAwIFIvVmlld2VyUHJlZmV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n2JRO+IQ3gv+X+XCFzozmrWVL15O5PaVp2/AgusKr9wcq7YBWUnOUGKyyhVek3MEAqgVJINUVdaZKR+vZn7QRYmTZt83f0e7j8w6ji6FfO0IxAcpT5jlKhpec8qk1WKAon5qy5k9Tl6S4aXjP8mlyR9MzX2BkhD4CyisKC3zCbHOYI+QJgyHKlyVXXdqEAjwq56KTH2wPrgEVXj7foijqp6x0XHfOFFQOsOidcg6JlLLyGqInNDdQzzeyVLw7Ia61FGii3eiXib1pTayXZlbyQ5KkFJgh+Kd5IOSChaRb7vPmo7e3Da/yabW5iG7AFZe+vpBV7N+58Aa49fVAVGzihe3ZVpgmvfV29WSpHoTUnIzAkWOupQ5FaURbG+WWLC51HsXW1vv5CrHMRrdZLw+rXs2tkv9cdCYCMTVLZH4aVya8Y/8rcMev7zmWO2oNnjEMWpy/SE4CTZVWS7qo+sADhGh8nc8I1Du25uzIMqMwcHnJodHvIy+xbHnK42/aQT0XjUGLine truncated
|
||||
<li><a href="https://ftdichip.com/products/ft4232hl/">FT4232H Product Page (online)</a></li>
|
||||
<li><a href="data:message/rfc822;base64,RnJvbTogPFNhdmVkIGJ5IEJsaW5rPg0KU25hcHNob3QtQ29udGVudC1Mb2NhdGlvbjogaHR0cHM6Ly9mdGRpY2hpcC5jb20vcHJvZHVjdHMvZnQ0MjMyaGwvDQpTdWJqZWN0OiBGVDQyMzJITCAtIEZUREkNCkRhdGU6IEZyaSwgMTcgSnVsIDIwMjYgMTc6NDE6MDMgLTA2MDANCk1JTUUtVmVyc2lvbjogMS4wDQpDb250ZW50LVR5cGU6IG11bHRpcGFydC9yZWxhdGVkOw0KCXR5cGU9InRleHQvaHRtbCI7DQoJYm91bmRhcnk9Ii0tLS1NdWx0aXBhcnRCb3VuZGFyeS0tTndheHdSb1J2aFl5aEloZ2llWTJEOTF4c0cyZ1hqaWNDOWxPeGkyMjJtLS0tLSINCg0KDQotLS0tLS1NdWx0aXBhcnRCb3VuZGFyeS0tTndheHdSb1J2aFl5a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N7EKFWdByLYl9jhca4OidHzswMul7L2YvW3e97bvoUP1oReZ+hQwONukDQcRrnL8xb1+/x0p8s1mG1iCPZhnzI0qaibJd/eslQsxCU9GV2LKmu2f3FpuvMRo2/LLaoILX4v/TNOogDQplbmRzdHJlYW0NCmVuZG9iag0KNSAwIG9iag0KPDwvVHlwZS9Gb250L1N1YnR5cGUvVHlwZTAvQmFzZUZvbnQvQUJDREVFK1ZlcmRhbmEvRW5jb2RpbmcvSWRlbnRpdHktSC9EZXNjZW5kYW50Rm9udHMgNiAwIFIvVG9Vbmljb2RlIDIzNTIgMCBSPj4NCmVuZG9iag0KNiAwIG9iag0KWyA3IDAgUl0gDQplbmRvYmoNCjcgMCBvYmoNCjw8L0Jhc2VGb250L0FCQ0RFRStWZXJkYW5hL1N1YnR5cGUvQ0lERm9udFR5cGUyL1R5cGUvRm9udC9DSURUb0dJRE1hcC9JZGVudGl0eS9EVyAxMDAwL0NJRFN5c3RlbUluZm8gOCAwIFIvRm9udELine truncated
|
||||
<li><a href="data:application/x-zip-compressed;base64,UEsDBBQAAAAIAHV0e1muz9Nbe0UBAEiYAgARAAAAYW1kNjQvZnRidXN1aS5kbGzsvXt8FFXSMNxzI0PIpCfAQAAjIwSMRjAS0MQBnSYT6JEJBkXB5RZFEBfUmMwACmriJJKhd5RdcVd3dZdn3YurruJlheAtIZoL4X4NsCAurvYwgAEkJID0V1Wnu2cy4LP7fd/v/e/lR7rPOVXnVqdOnao65/QU/WwVZ+I4zgx/isJx6zn2z83953/t8Jc6eEMq92HPLdesN/i2XDN1wcPlztKyxx4qu/8R59z7H330Mb/zgXnOssCjzocfdXruvNv5yGMPzhtpsyVnqmWELV1bWx78zWva3wtjFr+2g95LXnuL3uJr9fDu+7uZr9URzq9f+yu8l59f/NoWek96rRneX9zso3fLgxy9l5/30vuuh+cuwHK1NhcXctyDz/Xgtn2c9VCsH0OcvYwpHLfUwHGXWNqrY+Bhp2CFgVPDRo7roebR3lydkYi3eqEJwE6Dlkl7c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uu/xS5rK7jjhQc9ldW/pfuOxSwfwPRo3+uyujqQb0ov0RR6c1UMCv21t57BiMlf8BZVNgdBjlGnDszcDMmpVPPqezj5BEz1OaA6ZgL7vmX/r2R+xevLine truncated
|
||||
<li><a href="data:application/x-zip-compressed;base64,UEsDBBQAAAAIAKh2Y1p+5WnVXvQjAADOJAAUAAAAQ0RNMjEyMzYyMF9TZXR1cC5leGXsvQt8k0XWPz5p0jbQQqK2WrVIwKjFFqy0aDGgKb2CBVLTJkXKpdBCGktb2icUXMBiEm14rMu76i7u+rq66C67uq6uiHjDliK3dZU7KF7Qdd2UgIAiFLnkf87MPLmnFPD9/97/5/+b3ek8c+bMzHfOzJxzZp4nOPH+FUROCFFA9HoJWUdY0JMLh2MQBw5+eyBZ0++fQ9bJSv45pMxS26xpbGqY21Q1TzO7qr6+QdDMqtE02eo1tfWa/MlGzbyG6poRAwb01/I2NDcmT6oe94tBUnzrvTcGzaHpS4NqaPrqoFpa9uCgWEh3fPZbSt/x2e8GWSCtVT9H89XjDnP6izS9r3a2BdsLxWwoIKREFktePFk6U6IdJDGyBFkiIdMho5Ax4lyIaoiNmNGz5xhCYgkrl1KyQkaFt+3lm6BY76SMyOtLfQkNLy8l5DF8OEbIFpef3vqClrQOwwcZUcSRiw+NhKyURS8eIdQsFCC9u5IwQHSswTwaQmaOaKquEqoIqbuGsLGnQJwVzKeH/49gbGR1BfxZAfFKiA+G8XWMaGpumk34WI9BXE64AIL49COaauoagJGOHWRAlJBeHTwg4BtH/m/4WYNRrNQmmkRBm2hWvXm+8zu184BNmdWh7/4BCsvFOm2q84jK8QVk3joO6uHtV5MJ0R1SjduTfsj+k1r12EooEbd1dise6Dwm365aK5f3qNbmyeSnaBrDUzlPFTyN5WkcT+N5quRpP57252kCTxN5OoCnA3mqkp+yd6nlPfJT41XOFq/XS8E6dwpq1doE+ek8+akJth8pLWunuPnUcXGT+FPWTki/h9E5b4EKnd+qE06Jm6bNmD61SyzTKp07bfKsji6xRKswoniSTu14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cc8gPam6QU9uHqwnL0JcotGTNtD0+yF+yTS+ErpUeBvTvAYwR13l4mGxIMWaCtYQSRpxO5rSncL1yycqxYIk+1DSNkG9fGJi24QrxIlq14Qk17gUccM0aozAjGbjDVK2SUxAd8yWLZaj6UkUJ+Lkqc3iEg242/3SPxoP1BRPP7EgI30Td8cz+M6gqx5cUX9Wa/8pqTkdGldD20mqtXJx266DExN67BuUeVDUdMSF+6dOO8aFLJVaPdWbYElu3Nye2KlaK4POMlVrx8t2HU3fAXZ9JJRlLgdtBhja4goplu5lMqYdduDaZl0j242b5bkKzzpQLV+DWknfDmcjun0/hkoZyAD9ZcinKGATH4XuM7B7+0+q5gzAg1iSqJoAvPdSvAVQ1nQYGJOQ0VVHhzSGagFw927c7ElBDL+OgCF8JIBpJ6o6WAG67c23RpQPLo883famQ0EiYmOAwVRC4x/L71VQMLihUXllDMMJ2bTrqDgxLb0Te8T9o+tsGiR+lI47SdYWtzxXZu+MaSuU2TfF2Ou0GTEevPLITN8k7xQnZqSjdcyEU0fGgquH4czuxzqFuffaTtHpmZgGUDLSP1quuB3IE4GKQuBbcNlp9D+a+tl7+qvsMXhmuVcBDS7RiBs63XI4Mo3bQi1wZ+dBOQwBasBxq5xuPfRvO6l/m9XhSpjhsmXzvbpaI/SH440enQVPHjQoboCRJNH2oGXrOdZokr/RFKnRJH+jFZ6/YCPnvBRTcBM+VHIk8kbU0IQLOLekJLine truncated
|
||||
<li><a href="https://www.aliexpress.us/item/3256811407141285.html">Buy FT4232H USB-C Breakout on AliExpress (Remote)</a></li>
|
||||
<li><a href="https://www.aliexpress.us/item/3256811407141285.html">Buy FT4232 USB-A Breakout on AliExpress (Remote)</a></li>
|
||||
<li><a href="https://www.aliexpress.us/item/2251832658870493.html">Buy Nicer USB-A Breakout on AliExpress (Plugs, 3.3v/5v switchable, better screen printing) (*REQUIRES Printer Cable) (Remote)</a></li> </a></li>
|
||||
<ul>
|
||||
<li><a href="https://www.aliexpress.us/item/3256809425054781.html">Buy USB-A Printer Cable on AliExpress (Remote)</a></li>
|
||||
<li><a href="https://www.aliexpress.us/item/3256805681779092.html">Buy USB-C Printer Cable on AliExpress (Remote)</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
<b>Multi-Channel Options:</b><br>
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnAAAAH1CAIAAAD55FQCAAAQAElEQVR4nOydbWgT2ff4xz9dSEFhAgoJuNAJCk5QcILCJqwvmqLQBIUmrGBChd1UQdNd0MTC2nx94aYuaKKw2yhosz+wJAUlEZSksNL0hdIISqZgyQhKp7BCAhYysIUObMH/vZPnNG3SdFq73fNhMd3J5M59Ovfce865d9o+f/5MAAAAAACwPv4fAQAAAADAugGFCgAAAAAyAAoVAAAAAGQAFCoAAAAAyAAoVAAAAACQAVCoAAAAACADoFABAAAAQAZAoQIAAACADIBCBQAAAAAZAIUKAAAAADIAChUAAAAAZAAUKgAAAADIAChUAAAAAJABUKgAAAAAIAOgUAEAAABABkChAgAAAIAMgEIFAAAAABkAhQoAAAAAMgAKFQAAAABkABQqAAAAAMgAKFQAAAAAkAFQqAAAAAAgA6BQAQAAAEAGQKECAAAAgAyAQgUAAAAAGQCFupmEzTsQ5jCxmXyRhwLVfAjaGXX7Domv2g2/csS/ie3WhbgBDSqPZuDf1QqbznzYvAvVU7vuV5YAmmNbK1SRCw+YtXsK4xjuGkql9lj/0DNWWKq8j3NTO0DANqgeGgxeo9JYbVo2Vi9lk3fsOkpZbrxdSg1jdT9I8GKd9Gv5ql1Jm91jnEhsAeaGdPv7wtPZQmaWxGyOALYNYZM03Rit/22D/v+qX10Ym6zRpdVSqKZdSemsv8SzlT+ZcdeThDqslNUqlli33h5fIKgrU6mfmfL1vMDW5GaP1nAxuIqwZV/67YymLMxfSfkfCCbmqn8j8okHbvsxrXJXuaBakzs8UydpYTo+dNGg3VNOFd1bPxsCG/+lv6syA7s0urP+5EdCdratQhWe92t3ae234tx8uYJFQeBeBj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MDx+XhHkm6r9s76LVyq8K5vShZ03sapsP2y8iR7PCdDdgamt08xIfH/V5x5qY5b9xm29JUVcPVoi6ahW5FeoTh2O8ppbE+HlHdGP8batAHh9O4/Azl+04QxWEpBCrbfhaaWhuq7JSVTsoGQ5L9V8uTiIqdWvnVROxZoRInMW+ip8dtSLRacT2/enU1Oq/fxbDwtfd72w8I1PWGkyO6CQXQjOOCaK9rXZsJnvt+iZy2CL7nBO5xdmEz9mjp3cXhmYpNN9jPtSukewBNdRE+eKoYLSO7MDzbU+nPd5q98s+S+BxosflqKnh3Y7BXhLr7Ket7dmNx/AijHFcrh22mGsuXLGTTU106rNT3ZQqldiILiTOJYIDdusxrXKPMu9M7Xte776m5GsNTxeexLA49Q7WNlab0YiruY5GL0KpsXLmA9/3h98Im7F3eS4YmsbBOvaT5Wumc3bUpfjRQN1sVtpglPu73E+y2KjwZ6qpeIK1wL3Dk2T60KpeyPFySED7Hp39HrK1qCx/pCPfLVPubZTzz9wiP+G7YNEfIAvCvJDfvqhtX33bz3yiL78X9lws1LvitMEWL9gU0si2t8CGf9Dofl1Vp34IdHWi6azC+NuE7wghLzIr1MR4ok53FBPxF8QXoI1EE+3Qn6lZyYyDY7Xvu0wdBB5lr5r6W11bVJPN4A5B61rp1hkpAFUIGncsIx/J0kDbZf7CXb/5uaSckEol/hA3bPRRUJ2u4ehU+hM2HmIj5FOv7aAU6j5qbWwMb0NGAkfkfQQ7phbCgTGiNXJSiIV6b51ZrJqUKqBFVS1Iw3aLine truncated
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const selectBox = document.getElementById("proto");
|
||||
const outClass = document.querySelectorAll('.outmember');
|
||||
|
||||
selectBox.addEventListener('change', (event) => {
|
||||
// get the selection value, this is the sa3me as the ids of class outmember
|
||||
const selectedValue = event.target.value;
|
||||
|
||||
// just return true if the selection menu option is selected
|
||||
if(selectedValue === 'null') {
|
||||
return true;
|
||||
}
|
||||
|
||||
// loop through display divs (.outmember) and hides them all
|
||||
outClass.forEach(outClassItem => {
|
||||
outClassItem .style.display = 'none';
|
||||
});
|
||||
|
||||
// set correct one to display:block by id
|
||||
document.getElementById(selectedValue).style.display = 'block'
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,205 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Passgen 0.2.9</title>
|
||||
<script>
|
||||
var alphau = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
var alphal = "abcdefghijklmnopqrstuvwxyz";
|
||||
var numbers = "0123456789";
|
||||
var symbols = "`~!@#$%^&*()-=_+[]\{}|;':\",./<>?\\";
|
||||
var space = " ";
|
||||
var baseYear = 120000000000000000000000;
|
||||
|
||||
|
||||
function $id(id) {
|
||||
return document.getElementById(id);
|
||||
}
|
||||
|
||||
|
||||
async function copyInputToClipboard(inputId, buttonElement) {
|
||||
const inputElement = document.getElementById(inputId);
|
||||
if (!inputElement) return;
|
||||
|
||||
try {
|
||||
await navigator.clipboard.writeText(inputElement.value);
|
||||
} catch (err) {
|
||||
inputElement.select();
|
||||
document.execCommand('copy');
|
||||
}
|
||||
|
||||
// Temporary button label change
|
||||
if (buttonElement) {
|
||||
const originalText = buttonElement.innerText;
|
||||
buttonElement.innerText = 'Copied!';
|
||||
setTimeout(() => {
|
||||
buttonElement.innerText = originalText;
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
function secureRand(min,max,len) {
|
||||
var str = "";
|
||||
var rand = [];
|
||||
var pos = 0;
|
||||
|
||||
while(rand.length<len) {
|
||||
var buf = new Uint8Array(512);
|
||||
window.crypto.getRandomValues(buf);
|
||||
for(i=0;i<buf.length;i++) {
|
||||
if(buf[i] >= min && buf[i] <= max) {
|
||||
rand[pos] = buf[i];
|
||||
pos++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rand.slice(0,len);
|
||||
}
|
||||
|
||||
|
||||
function generatepass(len,keys){
|
||||
rlist='';
|
||||
var srand = secureRand(0,keys.length,len);
|
||||
for (i=0;i<len;i++) {
|
||||
rlist+=keys.charAt(srand[i]);
|
||||
}
|
||||
|
||||
return rlist;
|
||||
}
|
||||
|
||||
|
||||
function entropy(chars,len) {
|
||||
return Math.round((Math.log(Math.pow(chars,len))/Math.log(2))*100)/100;
|
||||
}
|
||||
|
||||
|
||||
// chars = length of charset
|
||||
// len = length of password
|
||||
// base = total md5 tries per year
|
||||
// TODO: Assumes power doubles every 18 months (Moore's law)
|
||||
function yearsToCrack(chars,len,base) {
|
||||
possible = Math.pow(chars,len);
|
||||
return Math.round(possible/baseYear);
|
||||
}
|
||||
|
||||
|
||||
function generate() {
|
||||
var len = $id('length').value;
|
||||
var keylist = "";
|
||||
if($id('alphal').checked) { keylist += alphal; }
|
||||
if($id('alphau').checked) { keylist += alphau; }
|
||||
if($id('symbols').checked) { keylist += symbols; }
|
||||
if($id('numbers').checked) { keylist += numbers; }
|
||||
if($id('space').checked) { keylist += space; }
|
||||
|
||||
$id('out').value = generatepass(len,keylist);
|
||||
$id('entropy').innerHTML = entropy(keylist.length,len);
|
||||
$id('years').innerHTML = yearsToCrack(keylist.length,len,baseYear);
|
||||
}
|
||||
window.onload = function(){generate();}
|
||||
</script>
|
||||
<style>
|
||||
* {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
/* Base link styling */
|
||||
.has-tooltip {
|
||||
position: relative; /* Crucial for positioning the tooltip relative to the link */
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Tooltip container (text box) */
|
||||
.has-tooltip::before {
|
||||
content: attr(data-tooltip); /* Pulls text from the data-tooltip attribute */
|
||||
position: absolute;
|
||||
bottom: 100%; /* Positions the box above the top of the link */
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateY(-8px); /* Centers horizontally & lifts up slightly */
|
||||
|
||||
/* Visual styling */
|
||||
background-color: #1e293b;
|
||||
color: #ffffff;
|
||||
padding: 6px 12px;
|
||||
border-radius: 6px;
|
||||
font-size: 0.85rem;
|
||||
white-space: nowrap; /* Prevents text from wrapping */
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
|
||||
/* Hide by default */
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.2s ease, transform 0.2s ease;
|
||||
pointer-events: none; /* Prevents cursor interference */
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
/* Tooltip arrow pointer */
|
||||
.has-tooltip::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateY(0);
|
||||
|
||||
/* Creates a small downward arrow using border tricks */
|
||||
border-width: 6px 6px 0 6px;
|
||||
border-style: solid;
|
||||
border-color: #1e293b transparent transparent transparent;
|
||||
|
||||
/* Hide by default */
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.2s ease, transform 0.2s ease;
|
||||
pointer-events: none;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
/* Hover State - Reveal Tooltip & Arrow */
|
||||
.has-tooltip:hover::before,
|
||||
.has-tooltip:hover::after {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* Subtle upward slide animation on hover */
|
||||
.has-tooltip:hover::before {
|
||||
transform: translateX(-20%) translateY(-12px);
|
||||
}
|
||||
|
||||
.has-tooltip:hover::after {
|
||||
transform: translateX(-20%) translateY(-6px);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Passgen<sup><a href="javascript:alert('Passgen 0.2.9\nCryptographically secure password generator\n\nHere is how passgen protects you:\n* Uses a cryptographically secure random number generator to\ngenerate a properly random secure password\n* Nothing is ever sent to anyone! It all runs through your browser\n* Even visiting a website and loading pages from it is not needed\npassgen can run through a bookmarklet without even being online\n* Nothing is ever, ever stored or logged\n* The web page you got this from keeps no logs including IP logs or even a hit counter\n* The website you got this from is secured with TLS to ensure this bookmarklet was not tampered with in transit\n* This bookmarklet code is singed with PGP to guarantee it has not been tampered with by a hacker\n\nPrincess Pi - https://git.thecoven.info/PrincessPi');">?</a></sup></h1>
|
||||
<input type="checkbox" id="alphal" onchange="generate()" checked> <label for="alphal">Lowercase Letters</label><a href="#" class="has-tooltip" data-tooltip="abcdefghijklmnopqrstuvwxyz">?</a><br>
|
||||
<input type="checkbox" id="alphau" onchange="generate()" checked> <label for="alphau">Uppercase Letters</label><a href="#" class="has-tooltip" data-tooltip="ABCDEFGHIJKLMNOPQRSTUVWXYZ">?</a><br>
|
||||
<input type="checkbox" id="numbers" onchange="generate()" checked> <label for="numbers">Numbers</label><a href="#" class="has-tooltip" data-tooltip="0123456789">?</a><br>
|
||||
<input type="checkbox" id="symbols" onchange="generate()" checked> <label for="symbols">Symbols</label><a href="#" class="has-tooltip" data-tooltip="`~!@#$%^&*()-=_+[]\{}|;':",.<>?\">?</a><br>
|
||||
<input type="checkbox" id="space" onchange="generate()" checked> <label for="space">Space</label><a href="#" class="has-tooltip" data-tooltip="Space AKA 0x20, \\s, %20, and &nbsp;">?</a><br>
|
||||
<label for="length">Length</label> <input type="text" id="length" size="4" value="23" onchange="generate()"><br><br>
|
||||
<button value="Generate" onclick="generate()">Generate New</button> <!--<input type="button" value="Close" onclick="window.close()">-->
|
||||
<p><b>Password</b> <input type="text" id="out" size="40" readonly> <button onclick="copyInputToClipboard('out', this)">Copy</button></p>
|
||||
<p><b>Strength<sup><a href="#" class="has-tooltip" data-tooltip="Bits of entropy. log2(characters^length)">?</a></sup></b> <span id="entropy"></span> bits</p>
|
||||
<p><b>Years to Crack<sup><a href="#" class="has-tooltip" data-tooltip="WORK IN PROGRESS

Assumes all computing power on Earth being used collaboratively, doubling in power every 18 months.

Also assumes a weak hash, MD5. (EXCLUDES collisions in MD5)">?</a></sup></b> <span id="years"></span></p>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,380 +0,0 @@
|
||||
<!-- Base file structure and logic utilized from Random-Words.html -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Princess Pi's Magic Random Words Generator</title>
|
||||
<style>
|
||||
:root {
|
||||
--bg-color: #fce4ec;
|
||||
--card-bg: #f3e5f5;
|
||||
--text-color: #4a148c;
|
||||
--text-muted: #7b1fa2;
|
||||
--accent-color: #90caf9;
|
||||
--accent-hover: #64b5f6;
|
||||
--border-color: #ce93d8;
|
||||
--success-color: #ec407a;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Marker Felt", cursive, sans-serif;
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ASCII Art Background */
|
||||
#ascii-bg {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
margin: 0;
|
||||
z-index: -1;
|
||||
font-family: monospace;
|
||||
white-space: pre;
|
||||
font-size: 10px;
|
||||
line-height: 10px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Replaced .container with #content and set 70% opacity */
|
||||
#content {
|
||||
background-color: var(--card-bg);
|
||||
border: 2px solid var(--border-color);
|
||||
border-radius: 16px;
|
||||
padding: 30px;
|
||||
width: 100%;
|
||||
max-width: 800px;
|
||||
box-shadow: 0 10px 25px -5px rgba(74, 20, 140, 0.15);
|
||||
opacity: 0.65; /* Makes #content and all children visually 70% opaque */
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-top: 0;
|
||||
font-size: 1.6rem;
|
||||
text-align: center;
|
||||
/* Flex layout to keep characters inline if they wrap */
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 1px;
|
||||
}
|
||||
|
||||
h1 span {
|
||||
transition: color 0.1s ease;
|
||||
}
|
||||
|
||||
.privacy-badge {
|
||||
background-color: rgba(236, 64, 122, 0.1);
|
||||
color: var(--success-color);
|
||||
border: 1px dashed var(--success-color);
|
||||
padding: 8px 12px;
|
||||
border-radius: 8px;
|
||||
font-size: 0.85rem;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
font-size: 0.95rem;
|
||||
color: var(--text-muted);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
input[type="number"],
|
||||
input[type="text"] {
|
||||
width: 100%;
|
||||
padding: 10px 12px;
|
||||
background-color: #ffffff;
|
||||
border: 2px solid var(--border-color);
|
||||
color: var(--text-color);
|
||||
border-radius: 8px;
|
||||
font-size: 1rem;
|
||||
box-sizing: border-box;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent-hover);
|
||||
}
|
||||
|
||||
.controls-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
background-color: var(--accent-color);
|
||||
color: #1a237e;
|
||||
border: 2px solid #64b5f6;
|
||||
padding: 12px;
|
||||
font-size: 1.1rem;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
margin-top: 10px;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: var(--accent-hover);
|
||||
transform: scale(1.02);
|
||||
}
|
||||
|
||||
.output-container {
|
||||
margin-top: 25px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
background-color: #ffffff;
|
||||
border: 2px solid var(--border-color);
|
||||
color: var(--text-color);
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
font-family: monospace;
|
||||
font-size: 1.1rem;
|
||||
resize: vertical;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent-hover);
|
||||
}
|
||||
|
||||
.copy-btn {
|
||||
background-color: #e1bee7;
|
||||
border-color: #ce93d8;
|
||||
color: var(--text-color);
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.copy-btn:hover {
|
||||
background-color: #ce93d8;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Preformatted text ASCII Art Background -->
|
||||
<pre id="ascii-bg">
|
||||
.. .....
|
||||
....------..
|
||||
..:--------.. .......
|
||||
..----------.. ....---..
|
||||
...---------=------::....:----:..
|
||||
..-----=+**************=-----:...
|
||||
.----+****************=-----...
|
||||
.--=****************=-----=**+:::--:....
|
||||
.-=#*********##**++=---====++**+-----:.
|
||||
..:==********#=.+@%-==++===++===++*=----...
|
||||
.:=::******%%+-::=++====+==++====+**=--...
|
||||
.:+..+*****--@===-:-%--====-=+====+*#=:..
|
||||
.-=.-****#=.#+===--=+===----======+*+..
|
||||
.:=:+****#@#+=====-**-----*+====++**:.
|
||||
.. .=****=--======-..%-----%+==++***+-..
|
||||
..=++***+-.----======..*-----#+==+***#%#+..
|
||||
.. .:-..---=====--------=-+==+**-@*. ............::::::....
|
||||
..=:..--===+-:-------*%+==*+#%**=. .....:-------------------------:.
|
||||
..............-:..--===+-..:-------+==+==.:... ...:----------------------------::.
|
||||
......:----------::=:...--==+--:.:-------+==+=:.... ....--------------------------:.....
|
||||
..:::----------------=-::.:--===---:.:------=--:.... ...:---------------------------...
|
||||
..:------------------=--:..:--=+=--------::.:+-..... ...------------------------------..
|
||||
...:-----------------:....----==-------:...=%*.......:::--------------------------------:..
|
||||
...--------------:+......---------------:+%%#.----------------------------:.......-----:..
|
||||
.:----===-------:-.. .:--------------*%%%%=--------------========------:.......-------:...
|
||||
..-:.:------------....-.=---------=#%%%%##%------------=-----------------------------------..
|
||||
.:--:....:--------:##*=:.-------=#%%%%%%#%+-----------=-------------------------------------:
|
||||
..:-----------------::*%%#-------=###%%%%##=--------------------------------------:............
|
||||
..:-------------------:.-#%%##+==+%%%%%%#%+------------------------...:::--------------::::::..
|
||||
...:----------------------..-#%#%%%%%%%%*+#%=-------------------------=-:....:----------------:...
|
||||
--------------------------:.-#%%%%%%%%+#@%%%--------------------------=++=-::---------------:...
|
||||
---------------------------...+%%%%%]%%%%#---------------------------------------------:....
|
||||
............------.....----:....-#%%%%%%%*=------------------------------::+=---------.......
|
||||
..:-... ....-----.. ....-=-------------------------------------.=*+=.......
|
||||
..---:....:-----:.......:--------------------------:-------------==+=-......
|
||||
.:-------------..........:---------------------------..:-------------==..........
|
||||
..-------------:... ...--------:...----------------....:-----------==-...........
|
||||
..:----==------:..-.... ..--------:...:---------------.....:----------=+-.....
|
||||
..------==+=++==-..+--:. .:--------.....-----------=*%=.. ..----------=+=......
|
||||
....------------........:... ..:--------.....-------+#%%#@%.. ...----------=+=......
|
||||
....---------===:............... .:----=+*#=. ..--+#**+%@@@#%+. ..:-:..=----=*=:.....
|
||||
:............:=::+=:--:=.=-.::=... ..*@*-+%@@@:.....-@@#%@*#@@@#%:.. ..-:..---:-#**+-.........
|
||||
.. ...::::....::-.:.::-.. ..*%:..*@@@*.. ..-%#%@@+%@@@@=.. ...::.=#=..-%*++=:... ...
|
||||
...... .......... ..**...*#=*%:. .-*#@%+#%@@@@+... ..*%@%+...+%+=*+=-...
|
||||
..*#:.-#+..+-. ..-*#**%%*%@@%=.. ..-%@@*:..+@%=:+**+=:..
|
||||
..*@#*%%=..==. .-*%@#%@##@@@#-. ...#@@%*-=%@@#:..-=++=-
|
||||
.:#@*-:++..==. .=#%@%*@@*%*=+*:....:.+@*::+%@@@%=......-*
|
||||
.-%+...=%##%-. .+@*@%*%@##*-:*+..:-==*@=..:#@+:=*:.......
|
||||
.:*#:..:*@@@%:. .-%@*%@#*%*#=..-%-....:+#=-.:#%-.:+-.......
|
||||
.+@#=.-*@@@@*.. ....-%@@@@@@=..+%*.. .-%--=+#%-.:*-. ....
|
||||
.-=++++++++=... .:***+++==::::... .-%#=-*#%#**#-.
|
||||
</pre>
|
||||
|
||||
<div id="content">
|
||||
<h1 id="titleText">Princess Pi's Magic Random Words Generator</h1>
|
||||
|
||||
<div class="privacy-badge">
|
||||
✨ 100% Offline • Zero Storage • Zero Logging • Web Crypto API ✨
|
||||
</div>
|
||||
|
||||
<div class="controls-row">
|
||||
<div class="form-group">
|
||||
<label for="wordCount">Number of Words</label>
|
||||
<input type="number" id="wordCount" value="12" min="1" max="256">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="delimiter">Custom Delimiter</label>
|
||||
<input type="text" id="delimiter" value=" ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button onclick="generateSecureWords()">Generate Magic Words</button>
|
||||
|
||||
<div class="output-container">
|
||||
<label for="output">Generated Output</label>
|
||||
<textarea id="output" readonly placeholder="Click generate to create magic words..."></textarea>
|
||||
<button class="copy-btn" onclick="copyToClipboard()">Copy to Clipboard</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Changed variable name from BIP39_WORDS to wordsListArray per your request
|
||||
// SecLists language-english.txt + SecLists us-citites.txt
|
||||
// sed 's/.*/"&"/' input.txt | paste -sd, - | sed 's/,/, /g' > output.txt
|
||||
const wordsListArray = [
|
||||
"Abbeville", "Abbotsford", "Abbott", "Abbottsburg", "Abbottstown", "Abbyville", "Abell", "Abercrombie", "Aberdeen", "Aberfoil", "Abernant", "Abernathy", "Abeytas", "Abie", "Abilene", "Abingdon", "Abington", "Abiquiu", "Abita Springs", "Abo", "Aboite", "Abraham", "Abram", "Abrams", "Absarokee", "Absecon", "Academy", "Accokeek", "Accomac", "Accord", "Ace", "Aceitunas", "Acequia", "Achille", "Achilles", "Ackerly", "Ackerman", "Ackley", "Ackworth", "Acme", "Acomita Lake", "Acra", "Acree", "Acton", "Acworth", "Acy", "Ada", "Adair", "Adair Village", "Adairsville", "Adairville", "Adams", "Adams Center", "Adams City", "Adamstown", "Adamsville", "Adario", "Addicks", "Addie", "Addieville", "Addington", "Addis", "Addison", "Addy", "Addyston", "Adel", "Adelaide", "Adelanto", "Adelino", "Adell", "Adelphi", "Adelphia", "Aden", "Adena", "Adgateville", "Adin", "Adjuntas", "Admire", "Adna", "Adona", "Adrian", "Advance", "Adwolf", "Ady", "Aetna", "Affton", "Afton", "Agar", "Agate", "Agate Beach", "Agawam", "Agency", "Agnes", "Agness", "Agnew", "Agnos", "Agoura", "Agra", "Agricola", "Agua Dulce", "Agua Fria", "Aguada", "Aguadilla", "Aguanga", "Aguas Buenas", "Aguas Claras", "Agudo", "Aguila", "Aguilar", "Aguilares", "Aguilita", "Ahloso", "Ahmeek", "Ahoskie", "Ahtanum", "Ahuimanu", "Ahwahnee", "Aibonito", "Aid", "Aiea", "Aiken", "Ailey", "Ainsworth", "Airmont", "Airport Drive", "Airway Heights", "Aitkin", "Ajo", "Akaska", "Akeley", "Akers", "Akhiok", "Akiachak", "Akiak", "Akin", "Akra", "Akron", "Akutan", "Alabam", "Alabaster", "Aladdin", "Alakanuk", "Alamance", "Alameda", "Alamo", "Alamo Alto", "Alamo Heights", "Alamo Oaks", "Alamogordo", "Alamosa", "Alamota", "Alanreed", "Alapaha", "Alba", "Albany", "Albee", "Albemarle", "Alberene", "Alberhill", "Albers", "Albert", "Albert City", "Albert Lea", "Alberta", "Alberton", "Albertson", "Albertville", "Albin", "Albion", "Alborn", "Albright", "Albuquerque", "Alburg", "Alburnett", "Alburtis", "Alcalde", "Alcan", "Alcester", "Alco", "Alcoa", "Alcoa Center", "Alcolu", "Alcoma", "Alda", "Aldan", "Alden", "Alden Bridge", "Alder", "Alderpoint", "Alderson", "Alderwood Manor", "Aldine", "Aldrich", "Aledo", "Aleknagik", "Alex", "Alexander", "Alexander City", "Alexandria", "Alexandria Bay", "Alexis", "Alfalfa", "Alfordsville", "Alfred", "Alger", "Algerita", "Algoa", "Algodones", "Algoma", "Algona", "Algonac", "Algonquin", "Algood", "Alhambra", "Ali Chukson", "Alice", "Aliceville", "Alicia", "Aline", "Aliquippa", "Alire", "Aliso Viejo", "Alix", "Alkabo", "Allakaket", "Allamuchy", "Allandale", "Allardt", "Alleene", "Allegan", "Allegany", "Alleghany", "Allegre", "Alleman", "Allen", "Allen City", "Allen Park", "Allendale", "Allenfarm", "Allenhurst", "Allenport", "Allenspark", "Allensville", "Allenton", "Allentown", "Allenville", "Allenwood", "Allerton", "Alley", "Allgood", "Alliance", "Alligator", "Allison", "Allison Gap", "Allison Park", "Allons", "Allouez", "Alloway", "Allport", "Allyn", "Alma", "Alma Center", "Almedia", "Almelund", "Almena", "Almeria", "Almira", "Almo", "Almon", "Almond", "Almont", "Almonte", "Almota", "Almy", "Almyra", "Alnwick", "Aloe", "Aloha", "Alondra Park", "Alpaugh", "Alpena", "Alpha", "Alpharetta", "Alpine", "Alquina", "Alsea", "Alsen", "Alsey", "Alsip", "Alston", "Alstown", "Alsuma", "Alta", "Alta Loma", "Alta Sierra", "Alta Vista", "Altadena", "Altair", "Altamahaw", "Altamont", "Altamonte Springs", "Altavista", "Altenburg", "Altha", "Altheimer", "Altmar", "Alto", "Alto Pass", "Alton", "Altona", "Altoona", "Altura", "Alturas", "Altus", "Alum Bridge", "Alva", "Alvarado", "Alvaton", "Alvin", "Alvo", "Alvord", "Alvordton", "Alvwood", "Alzada", "Amado", "Amador City", "Amagansett", "Amagon", "Amalga", "Amanda", "Amanda Park", "Amargosa Valley", "Amarillo", "Amasa", "Amawalk", "Amazonia", "Amber", "Amberg", "Amberley", "Ambler", "Amboy", "Ambridge", "Ambridge Heights", "Ambrose", "Amchitka", "Amelia", "Amelia City", "Amelia Court House", "Amenia", "American Beach", "American Canyon", "American Falls", "American Fork", "Americus", "Amery", "Ames", "Amesbury", "Amesville", "Amherst", "Amherst Junction", "Amherstdale", "Amidon", "Amiret", "Amistad", "Amite", "Amity", "Amity Gardens", "Amityville", "Ammon", "Amo", "Amonate", "Amoret", "Amorita", "Amory", "Amsden", "Amsterdam", "Amy", "Anacoco", "Anaconda", "Anacortes", "Anaheim", "Anahola", "Anahuac", "Anaktuvuk Pass", "Anamoose", "Anamosa", "Anandale", "Anasco", "Anatone", "Anawalt", "Ancho", "Anchor", "Anchor Point", "Anchorage", "Anchorville", "Ancient Oaks", "Andale", "Andalusia", "Anderson", "Anderson Mill", "Andersonville", "Andes", "Anding", "Andover", "Andrade", "Andrew", "Andrews", "Andrix", "Anegam", "Aneta", "Angel City", "Angel Fire", "Angela", "Angeles", "Angelica", "Angels City", "Angelus", "Angier", "Angiola", "Angle", "Angle Inlet", "Angleton", "Angola", "Angola on the Lake", "Angora", "Anguilla", "Angus", "Angwin", "Aniak", "Animas", "Anita", "Aniwa", "Ankeny", "Ankenytown", "Anmoore", "Ann Arbor", "AnLine truncated
|
||||
];
|
||||
|
||||
/**
|
||||
* Utility function to generate a random pastel color
|
||||
*/
|
||||
function getRandomPastel() {
|
||||
const hue = Math.floor(Math.random() * 360);
|
||||
return `hsl(${hue}, 100%, 75%)`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility function for random timeouts
|
||||
*/
|
||||
function getRandomTimeout(min, max) {
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
}
|
||||
|
||||
// Initialization logic for UI animations
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
// --- H1 Character Color Animation ---
|
||||
const h1 = document.getElementById('titleText');
|
||||
const textChars = h1.innerText.split('');
|
||||
h1.innerText = ''; // Clear raw text
|
||||
|
||||
textChars.forEach(char => {
|
||||
const span = document.createElement('span');
|
||||
// Handle spaces explicitly
|
||||
span.innerHTML = char === ' ' ? ' ' : char;
|
||||
h1.appendChild(span);
|
||||
|
||||
const animateChar = () => {
|
||||
span.style.color = getRandomPastel();
|
||||
setTimeout(animateChar, getRandomTimeout(50, 500));
|
||||
};
|
||||
|
||||
// Kick off the animation loop for this character
|
||||
animateChar();
|
||||
});
|
||||
|
||||
// --- ASCII Art Background Animation ---
|
||||
const asciiBg = document.getElementById('ascii-bg');
|
||||
const animateAsciiBg = () => {
|
||||
asciiBg.style.color = getRandomPastel();
|
||||
setTimeout(animateAsciiBg, getRandomTimeout(200, 750));
|
||||
};
|
||||
|
||||
// Kick off the ASCII background loop
|
||||
animateAsciiBg();
|
||||
});
|
||||
|
||||
/**
|
||||
* Generates a string of cryptographically secure random words.
|
||||
*/
|
||||
function generateSecureWords() {
|
||||
const countInput = document.getElementById('wordCount').value;
|
||||
const delimiter = document.getElementById('delimiter').value;
|
||||
const outputArea = document.getElementById('output');
|
||||
|
||||
let numberOfWords = parseInt(countInput, 10);
|
||||
if (isNaN(numberOfWords) || numberOfWords < 1) {
|
||||
numberOfWords = 12;
|
||||
document.getElementById('wordCount').value = 12;
|
||||
}
|
||||
|
||||
const generatedWords = [];
|
||||
|
||||
// Array length evaluated dynamically allowing arbitrary additions/removals
|
||||
const wordListLength = wordsListArray.length;
|
||||
|
||||
for (let i = 0; i < numberOfWords; i++) {
|
||||
const randomBuffer = new Uint32Array(1);
|
||||
window.crypto.getRandomValues(randomBuffer);
|
||||
|
||||
const randomIndex = randomBuffer[0] % wordListLength;
|
||||
generatedWords.push(wordsListArray[randomIndex]);
|
||||
}
|
||||
|
||||
outputArea.value = generatedWords.join(delimiter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the currently generated text in the textarea to the system clipboard.
|
||||
*/
|
||||
function copyToClipboard() {
|
||||
const outputArea = document.getElementById('output');
|
||||
|
||||
if (!outputArea.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
outputArea.select();
|
||||
outputArea.setSelectionRange(0, 99999);
|
||||
|
||||
navigator.clipboard.writeText(outputArea.value)
|
||||
.then(() => {
|
||||
const copyBtn = document.querySelector('.copy-btn');
|
||||
const originalText = copyBtn.innerText;
|
||||
copyBtn.innerText = "Copied! ✨";
|
||||
setTimeout(() => {
|
||||
copyBtn.innerText = originalText;
|
||||
}, 2000);
|
||||
})
|
||||
.catch(err => {
|
||||
console.warn('Clipboard API failed, attempting execCommand...', err);
|
||||
document.execCommand('copy');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,280 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>String Tools</title>
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
body {
|
||||
background-color: #f4f6f8;
|
||||
color: #333;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
padding: 20px;
|
||||
}
|
||||
.container {
|
||||
background: #ffffff;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
||||
padding: 30px;
|
||||
width: 100%;
|
||||
max-width: 650px;
|
||||
}
|
||||
h2 {
|
||||
margin-bottom: 20px;
|
||||
font-size: 1.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
.input-group {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
label {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
font-size: 0.9rem;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
padding: 12px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 6px;
|
||||
font-size: 0.95rem;
|
||||
resize: vertical;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
textarea:focus {
|
||||
outline: none;
|
||||
border-color: #0066ff;
|
||||
background-color: #fff;
|
||||
}
|
||||
.section-header {
|
||||
font-size: 0.85rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
color: #0066ff;
|
||||
margin: 20px 0 10px 0;
|
||||
padding-bottom: 4px;
|
||||
border-bottom: 2px solid #e1effe;
|
||||
}
|
||||
.output-card {
|
||||
background-color: #f8f9fa;
|
||||
border: 1px solid #e9ecef;
|
||||
border-radius: 6px;
|
||||
padding: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.output-card.hidden {
|
||||
display: none;
|
||||
}
|
||||
.output-card.error {
|
||||
border-color: #ffc9c9;
|
||||
background-color: #fff5f5;
|
||||
}
|
||||
.output-card .title {
|
||||
font-size: 0.8rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
color: #6c757d;
|
||||
margin-bottom: 4px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.output-card .value {
|
||||
font-family: monospace;
|
||||
font-size: 0.95rem;
|
||||
word-break: break-all;
|
||||
white-space: pre-wrap;
|
||||
color: #212529;
|
||||
}
|
||||
.value.error-text {
|
||||
color: #d9534f;
|
||||
font-style: italic;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<h2>String Tools</h2>
|
||||
|
||||
<div class="input-group">
|
||||
<label for="strInput">Enter your string below:</label>
|
||||
<textarea id="strInput" placeholder="Type or paste something here..."></textarea>
|
||||
</div>
|
||||
|
||||
<div class="section-header">String Transformations</div>
|
||||
|
||||
<div class="output-card">
|
||||
<div class="title">Character Count (Length)</div>
|
||||
<div class="value" id="outLength">0</div>
|
||||
</div>
|
||||
|
||||
<div class="output-card">
|
||||
<div class="title">Uppercase</div>
|
||||
<div class="value" id="outUpper">---</div>
|
||||
</div>
|
||||
|
||||
<div class="output-card">
|
||||
<div class="title">Lowercase</div>
|
||||
<div class="value" id="outLower">---</div>
|
||||
</div>
|
||||
|
||||
<div class="output-card">
|
||||
<div class="title">URL Encoded</div>
|
||||
<div class="value" id="outEncoded">---</div>
|
||||
</div>
|
||||
|
||||
<div class="output-card" id="urlDecodedCard">
|
||||
<div class="title">URL Decoded</div>
|
||||
<div class="value" id="outDecoded">---</div>
|
||||
</div>
|
||||
|
||||
<div class="output-card">
|
||||
<div class="title">Base64 Encoded</div>
|
||||
<div class="value" id="outB64Enc">---</div>
|
||||
</div>
|
||||
|
||||
<div class="output-card hidden" id="b64DecCard">
|
||||
<div class="title">Base64 Decoded</div>
|
||||
<div class="value" id="outB64Dec">---</div>
|
||||
</div>
|
||||
|
||||
<div class="section-header">Hashes</div>
|
||||
|
||||
<div class="output-card">
|
||||
<div class="title">SHA-1</div>
|
||||
<div class="value" id="outSha1">---</div>
|
||||
</div>
|
||||
|
||||
<div class="output-card">
|
||||
<div class="title">SHA-256</div>
|
||||
<div class="value" id="outSha256">---</div>
|
||||
</div>
|
||||
|
||||
<div class="output-card">
|
||||
<div class="title">SHA-512</div>
|
||||
<div class="value" id="outSha512">---</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const strInput = document.getElementById('strInput');
|
||||
const outLength = document.getElementById('outLength');
|
||||
const outUpper = document.getElementById('outUpper');
|
||||
const outLower = document.getElementById('outLower');
|
||||
const outEncoded = document.getElementById('outEncoded');
|
||||
const outDecoded = document.getElementById('outDecoded');
|
||||
const urlDecodedCard = document.getElementById('urlDecodedCard');
|
||||
|
||||
const outB64Enc = document.getElementById('outB64Enc');
|
||||
const outB64Dec = document.getElementById('outB64Dec');
|
||||
const b64DecCard = document.getElementById('b64DecCard');
|
||||
|
||||
const outSha1 = document.getElementById('outSha1');
|
||||
const outSha256 = document.getElementById('outSha256');
|
||||
const outSha512 = document.getElementById('outSha512');
|
||||
|
||||
// Safe Unicode Base64 Helper
|
||||
function utf8ToBase64(str) {
|
||||
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) => {
|
||||
return String.fromCharCode('0x' + p1);
|
||||
}));
|
||||
}
|
||||
|
||||
function base64ToUtf8(str) {
|
||||
return decodeURIComponent(atob(str).split('').map((c) => {
|
||||
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
||||
}).join(''));
|
||||
}
|
||||
|
||||
// Helper function to calculate Web Crypto hashes
|
||||
async function computeHash(algo, text) {
|
||||
if (!text) return '---';
|
||||
const msgUint8 = new TextEncoder().encode(text);
|
||||
const hashBuffer = await crypto.subtle.digest(algo, msgUint8);
|
||||
const hashArray = Array.from(new Uint8Array(hashBuffer));
|
||||
return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');
|
||||
}
|
||||
|
||||
strInput.addEventListener('input', async () => {
|
||||
const val = strInput.value;
|
||||
|
||||
if (val.length === 0) {
|
||||
outLength.textContent = '0';
|
||||
outUpper.textContent = '---';
|
||||
outLower.textContent = '---';
|
||||
outEncoded.textContent = '---';
|
||||
outDecoded.textContent = '---';
|
||||
outB64Enc.textContent = '---';
|
||||
outB64Dec.textContent = '---';
|
||||
outSha1.textContent = '---';
|
||||
outSha256.textContent = '---';
|
||||
outSha512.textContent = '---';
|
||||
|
||||
urlDecodedCard.classList.remove('error');
|
||||
b64DecCard.classList.add('hidden');
|
||||
return;
|
||||
}
|
||||
|
||||
// Basic Transformations
|
||||
outLength.textContent = val.length;
|
||||
outUpper.textContent = val.toUpperCase();
|
||||
outLower.textContent = val.toLowerCase();
|
||||
outEncoded.textContent = encodeURIComponent(val);
|
||||
|
||||
// URL Decoded
|
||||
try {
|
||||
outDecoded.textContent = decodeURIComponent(val);
|
||||
outDecoded.classList.remove('error-text');
|
||||
urlDecodedCard.classList.remove('error');
|
||||
} catch (e) {
|
||||
outDecoded.textContent = "Error: Invalid URL encoding sequence";
|
||||
outDecoded.classList.add('error-text');
|
||||
urlDecodedCard.classList.add('error');
|
||||
}
|
||||
|
||||
// Base64 Encoded
|
||||
outB64Enc.textContent = utf8ToBase64(val);
|
||||
|
||||
// Base64 Decoded (Hidden unless input is valid Base64)
|
||||
const trimmedVal = val.trim();
|
||||
// Regex validates Base64 formatting before attempting decoding
|
||||
const isB64Format = /^[A-Za-z0-9+/=]+$/.test(trimmedVal) && (trimmedVal.length % 4 === 0);
|
||||
|
||||
if (isB64Format) {
|
||||
try {
|
||||
const decoded = base64ToUtf8(trimmedVal);
|
||||
outB64Dec.textContent = decoded;
|
||||
b64DecCard.classList.remove('hidden');
|
||||
} catch (e) {
|
||||
b64DecCard.classList.add('hidden');
|
||||
}
|
||||
} else {
|
||||
b64DecCard.classList.add('hidden');
|
||||
}
|
||||
|
||||
// Calculate Cryptographic Hashes asynchronously
|
||||
try {
|
||||
outSha1.textContent = await computeHash('SHA-1', val);
|
||||
outSha256.textContent = await computeHash('SHA-256', val);
|
||||
outSha512.textContent = await computeHash('SHA-512', val);
|
||||
} catch (e) {
|
||||
outSha1.textContent = "Error computing hash";
|
||||
outSha256.textContent = "Error computing hash";
|
||||
outSha512.textContent = "Error computing hash";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +0,0 @@
|
||||
# Windows-Repair.ps1 Usage:
|
||||
1. Open PowerShell terminal
|
||||
```powershell
|
||||
iwr -UseBasicParsing -Uri "https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/Windows-Scripts/windows-repair.ps1?nocache=$(Get-Random)" -OutFile "$env:TEMP\windows-repair3.ps1"; &"$env:TEMP\windows-repair3.ps1"
|
||||
```
|
||||
@@ -1,3 +0,0 @@
|
||||
while($True) {
|
||||
nmap -p22 -sV --open 10.0.0.0/24 -oG -
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
# usage:
|
||||
## All paramaters are optional
|
||||
## All paramaters are compatible with each other
|
||||
## Default behavior is to restart immediately after zero time
|
||||
## IM_SO_TIRED_BOSS -Seconds <int seconds> -Minutes <int minutes> -Hours <int hours> -ChkDsk $True
|
||||
## Examples:
|
||||
### IM_SO_TIRED_BOSS -Minutes 90
|
||||
### IM_SO_TIRED_BOSS -Minutes 30 -Hours 1
|
||||
### IM_SO_TIRED_BOSS -Minutes 30 -ChkDsk $True
|
||||
|
||||
Param(
|
||||
[int]$Seconds = 0,
|
||||
[int]$Minutes = 0,
|
||||
[int]$Hours = 0,
|
||||
[bool]$ChkDsk = $false
|
||||
)
|
||||
|
||||
# Force off for longer by doing offline modern chkdsk to tie up your computer to be unusable for a while
|
||||
# pipes y to it so its noninteractive
|
||||
# auto elevates to admin when run with -ChkDsk $True
|
||||
if ($ChkDsk) {
|
||||
# elevate to admin
|
||||
# set for offline chkdsk noninteractively by piping y to it lmao
|
||||
# runs a cmd window as admin running "echo y | chkdsk C: /f /r" which then closes
|
||||
Start-Process cmd.exe -Verb RunAs -ArgumentList "/c echo y | chkdsk C: /f /r"
|
||||
}
|
||||
|
||||
# Current date object
|
||||
$CurrentTime = Get-Date
|
||||
|
||||
# the .AddX() are in sequence to get the date object plus seconds, minutes, and hours
|
||||
$RebootTime = $CurrentTime.AddSeconds($Seconds).AddMinutes($Minutes).AddHours($Hours).ToString("dddd hh:mm:ss tt")
|
||||
|
||||
# Calculate the number of seconds in total selected time
|
||||
$WaitDuration = New-TimeSpan -Seconds $Seconds -Minutes $Minutes -Hours $Hours
|
||||
$WaitSeconds = $WaitDuration.TotalSeconds
|
||||
|
||||
# Print to terminal too for nicess
|
||||
Write-Host "`nREBOOTING AT $RebootTime`n"
|
||||
|
||||
# Start-Job to fork the script block to background so it can proceed with the timer/shutdown even if no interaction with alert box
|
||||
Start-Job -ScriptBlock {
|
||||
# the $using: method lets me adjusst the scope of $RebootTime and get it in this script block
|
||||
$RebootTime = $using:RebootTime
|
||||
|
||||
# add the presentation framework in
|
||||
Add-Type -AssemblyName PresentationFramework
|
||||
|
||||
# Show an Error/Stop alert box with just an OK button and the message
|
||||
[System.Windows.MessageBox]::Show("REBOOTING AT $RebootTime", "FORCE REBOOTING MINUTES AT $RebootTime", 'OK', 'Error')
|
||||
}
|
||||
|
||||
# do the wait
|
||||
Start-Sleep -Seconds $WaitSeconds
|
||||
|
||||
# Add-Type -AssemblyName PresentationFramework
|
||||
# [System.Windows.MessageBox]::Show("PING WORKING", "$RebootTime", 'OK', 'Error')
|
||||
|
||||
# x Force reboot with no warning
|
||||
# Disabled -Force to let apps close gracefully
|
||||
Stop-Computer # -Force
|
||||
@@ -1 +0,0 @@
|
||||
donkeydicks:pope:
|
||||
@@ -1,42 +0,0 @@
|
||||
# Usage: alert <message="Alert"> (<type=Information/None/Error/Question/Warning> (<Buttons=OK/OKCancel/YesNoCancel/YesNo>))
|
||||
|
||||
# HELP HANDLE
|
||||
if($args[0] -eq 'h' -or $args[0] -eq '-h' -or $args[0] -eq 'H' -or $args[0] -eq '-H' -or $args[0] -eq 'help' -or $args[0] -eq 'Help' -or $args[0] -eq 'HELP') {
|
||||
Write-Host "Usage: alert <message=Alert> (<type=Information/None/Error/Question/Warning> (<Buttons=OK/OKCancel/YesNoCancel/YesNo>))`nalert h/-h/help/etc: Display this help message"
|
||||
exit
|
||||
}
|
||||
|
||||
# MESSAGE HANDLE DEFAULT
|
||||
if([string]::IsNullOrEmpty($args[0])) {
|
||||
$Message = "Alert"
|
||||
} else {
|
||||
$Message = $args[0]
|
||||
}
|
||||
|
||||
# TYPE HANDLE DEFAULT
|
||||
if([string]::IsNullOrEmpty($args[1])) {
|
||||
$Type = "Information"
|
||||
} else {
|
||||
$Type = $args[1]
|
||||
}
|
||||
|
||||
# BUTTONS HANDLE DEFAULT
|
||||
if([string]::IsNullOrEmpty($args[2])) {
|
||||
$Buttons = "OK"
|
||||
} else {
|
||||
$Buttons = $args[2]
|
||||
}
|
||||
|
||||
# doin inide start-job method so alert box doesnt block
|
||||
Start-Job -ScriptBlock {
|
||||
# get back my fuckin vars inside this script block
|
||||
$Message = $using:Message
|
||||
$Buttons = $using:Buttons
|
||||
$Type = $using:Type
|
||||
|
||||
# Add the PresentationFramework
|
||||
Add-Type -AssemblyName PresentationFramework
|
||||
|
||||
# Send the alert
|
||||
[System.Windows.MessageBox]::Show($Message, $Message, $Buttons, $Type)
|
||||
};
|
||||
@@ -1,9 +0,0 @@
|
||||
1. recursive verify error: `FAILED open or read` RIGHT NOW GENERATES RELATIVE PATH/FILENAME IN CHECKSUMS FILES IN SUBDIRS, SHOULD JUST BE FOR THE FILES IN DAT DIR (for linux compatability)
|
||||
2. recursive progress set to count total number of files recursively first for progress bar.
|
||||
3. paralell processing
|
||||
4. Princess Pi ascii art magenta
|
||||
5. princess pi bubble text ascii art blue
|
||||
6. script for full top-to-bottom testing
|
||||
7. BASH linux version
|
||||
8. more hashing algos?
|
||||
9. multi-algo paralell workin? like multiple -a params?
|
||||
@@ -1,656 +0,0 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Princess Pi's Magical CHECKSUM! - Computes and verifies message digests / file checksums.
|
||||
.DESCRIPTION
|
||||
Computes or verifies checksums using cryptographic hash algorithms (SHA256, SHA512, SHA1, MD5, SHA384).
|
||||
Supports parallel processing, recursive scanning, direct hash matching, and verification file parsing.
|
||||
.NOTES
|
||||
Requires PowerShell 7.0 or higher.
|
||||
#>
|
||||
|
||||
[CmdletBinding(DefaultParameterSetName='Generate')]
|
||||
param(
|
||||
# File(s) or wildcard pattern to compute checksum for
|
||||
[Parameter(Position = 0, ParameterSetName = 'Generate', ValueFromPipeline = $true)]
|
||||
[Parameter(Position = 0, ParameterSetName = 'Match', ValueFromPipeline = $true)]
|
||||
[Parameter(Position = 0, ParameterSetName = 'PrincessPi', ValueFromPipeline = $false)]
|
||||
[Alias('i', 'input', 'if', 'InputFile')]
|
||||
[string[]]$FilePath,
|
||||
|
||||
# Custom output file (-f / -OutFile / -of)
|
||||
[Parameter(Mandatory = $false, ParameterSetName = 'Generate')]
|
||||
[Alias('f', 'of')]
|
||||
[string]$OutFile,
|
||||
|
||||
# Auto output file switch (-s / -Save / -o)
|
||||
[Parameter(Mandatory = $false, ParameterSetName = 'Generate')]
|
||||
[Alias('s', 'o')]
|
||||
[switch]$Save,
|
||||
|
||||
# File containing checksums to verify (-c / -Check)
|
||||
[Parameter(Mandatory = $false, ParameterSetName = 'Verify')]
|
||||
[Alias('c')]
|
||||
[string]$Check,
|
||||
|
||||
# Direct checksum hash string to match against (-m / -Match)
|
||||
[Parameter(Mandatory = $true, ParameterSetName = 'Match')]
|
||||
[Alias('m')]
|
||||
[string]$Match,
|
||||
|
||||
# Hashing algorithm to use (Defaults to SHA256)
|
||||
[Parameter(Mandatory = $false)]
|
||||
[Alias('a', 'algo')]
|
||||
[ValidateSet('SHA1', 'SHA256', 'SHA384', 'SHA512', 'MD5')]
|
||||
[string]$Algorithm,
|
||||
|
||||
# Recursive flag (-r / -Recursive)
|
||||
[Parameter(Mandatory = $false)]
|
||||
[Alias('r')]
|
||||
[switch]$Recursive,
|
||||
|
||||
# Princess Pi art flag (-pp / -PrincessPi)
|
||||
[Parameter(Mandatory = $true, ParameterSetName = 'PrincessPi')]
|
||||
[Alias('pp')]
|
||||
[switch]$PrincessPi,
|
||||
|
||||
# Help flag (-h / -Help)
|
||||
[Parameter(Mandatory = $false)]
|
||||
[Alias('h')]
|
||||
[switch]$Help
|
||||
)
|
||||
|
||||
# --- ENVIRONMENT SANITY CHECK ---
|
||||
if ($PSVersionTable.PSVersion.Major -lt 7) {
|
||||
Write-Error "checksum: This script requires PowerShell 7 or higher for parallel execution (-Parallel support). Current version is $($PSVersionTable.PSVersion)."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# --- HELPER FUNCTIONS ---
|
||||
function Show-Help {
|
||||
@'
|
||||
|
||||
Princess Pi's Magical CHECKSUM!
|
||||
|
||||
NAME
|
||||
checksum - Compute and verify message digests / file checksums
|
||||
|
||||
SYNOPSIS
|
||||
.\checksum.ps1 [-FilePath] <string[]> [-s] [-f <string>] [-Algorithm <string>] [-r]
|
||||
.\checksum.ps1 [-FilePath] <string[]> -Match <string> [-Algorithm <string>] [-r]
|
||||
.\checksum.ps1 -Check <string> [-Algorithm <string>] [-r]
|
||||
.\checksum.ps1 -PrincessPi
|
||||
.\checksum.ps1 -Help
|
||||
|
||||
DESCRIPTION
|
||||
Computes or verifies checksums using cryptographic hash algorithms (SHA256, SHA512, SHA1, MD5, SHA384).
|
||||
Outputs hash values in standard GNU coreutils format (<hash> <filename>).
|
||||
Ignores checksum metadata files (.md5, .sha1, .sha256, .sha384, .sha512) during wildcards unless passed explicitly.
|
||||
|
||||
PARAMETERS
|
||||
-FilePath, -i, -input, -if, -InputFile <string[]>
|
||||
Specifies the target file(s) or wildcard pattern (*).
|
||||
|
||||
-s, -S, -Save, -o, -O <switch>
|
||||
Auto-saves checksum results. (Takes no arguments).
|
||||
- If input filename contains a wildcard (*), saves to 'checksums.<algo>'.
|
||||
- If input filename does NOT contain a wildcard, saves to '<filename>.<algo>'.
|
||||
When combined with -r and *, recursively auto-generates checksums per directory.
|
||||
|
||||
-f, -F, -of, -OF, -OutFile <string>
|
||||
Saves checksum results to a specific custom filename.
|
||||
Overrides the auto-naming behavior of -s if both are passed.
|
||||
|
||||
-c, -C, -Check <string>
|
||||
Reads hashes from a specified checksum file and verifies target files on disk.
|
||||
If -r is specified, recursively looks for and validates checksum files by name across subdirectories.
|
||||
|
||||
-m, -M, -Match <string>
|
||||
Compares the computed hash of target file(s) directly against a given hash string.
|
||||
|
||||
-a, -A, -Algo, -Algorithm <string>
|
||||
Specifies the hash algorithm to use.
|
||||
Supported options: MD5, SHA1, SHA256 (default), SHA384, SHA512.
|
||||
In -c or -m mode, auto-detects algorithm from hash length if omitted.
|
||||
|
||||
-r, -R, -Recursive <switch>
|
||||
Processes target files or verification files recursively across directory structures.
|
||||
|
||||
-pp, -PP, -PrincessPi <switch>
|
||||
Displays Princess Pi!
|
||||
|
||||
-h, -H, -Help <switch>
|
||||
Displays this help documentation.
|
||||
Also displays on any error.
|
||||
|
||||
EXAMPLES
|
||||
1. Compute SHA256 for a single file and auto-save as 'myfile.iso.sha256':
|
||||
.\checksum.ps1 myfile.iso -s
|
||||
|
||||
2. Compute SHA512 recursively and auto-save as 'checksums.sha512' in each folder:
|
||||
.\checksum.ps1 * -r -s -a SHA512
|
||||
|
||||
3. Compute SHA256 checksums and save to a specific custom file:
|
||||
.\checksum.ps1 * -f my_hashes.txt
|
||||
|
||||
4. Verify checksums against a verification file:
|
||||
.\checksum.ps1 -c checksums.sha256
|
||||
|
||||
5. Compare file directly against an expected hash string:
|
||||
.\checksum.ps1 myfile.bin -m 406653a68bd3538975656831f33f031b
|
||||
|
||||
Princess Pi LOVES YOU!~
|
||||
https://linktr.ee/princesspi3
|
||||
|
||||
'@
|
||||
}
|
||||
|
||||
function Write-ErrorWithHelp {
|
||||
param([string]$ErrorMessage);
|
||||
Show-Help;
|
||||
Write-Host "";
|
||||
Write-Error $ErrorMessage;
|
||||
}
|
||||
|
||||
function Show-PrincessPiArt {
|
||||
$art = @'
|
||||
|
||||
=#= -- ##*+++++ *+
|
||||
-#=#- +# -*%%= ##++++++++++# ##*********#
|
||||
#==#= *** %%++%% -++# #++++++++++++*+ *#***************#
|
||||
#===#= %***+%++#*%%@+++++% #++++++++++++**+++#******++********#
|
||||
====+#%@*******###%=%++##++% #+++++++++++*++++++++#***====+****++#
|
||||
=#=*==**#*#########%++#*+++@ *++++++++#+++++++++++#****==+******#
|
||||
*#=====%####***%%++++#*+++**% ++++++++*+++++++++++++#************#*******
|
||||
@****#==%####**#*+++++++#+++#**# #+++++++++++++++++++#####+*****************#
|
||||
@****#######%**@+*%**#%+++++%##*** #+++++++++++++++++#+++++#****+======*****+
|
||||
#****##%####@**%+*******@@+++@###**% #+++++++++++++*++++++++++****========****#
|
||||
****#####%%*%*%+***@@@%%@*+++@####** *+++++++++++++++++++++#****=======****#
|
||||
%***####%%**+%%*++*@=##@@%@++++%###*** ++++*+++++++++++#+**************#
|
||||
@%%%@@##%%#++++++++==**@@**+++%*###**% +++++++++++#*+++++#*********####
|
||||
%###%++++++++====**#++++%**##**% @% ++++#+++++++++++++**************#
|
||||
%###%++++++++++++++++++%**%##**%@###@ %++++++++++++++++***=====********
|
||||
###%%++++++++%++++++*%%%%###***##%##@ +++++++++++++##**************#
|
||||
###%%%%+++++##+++++++#*+%###***%%%##@ ++++++++++++++%********+############%@
|
||||
@%%*@*%%%%###****+*%%****++%##***%##@@@ #+++++++++++++++*********###*****#########*
|
||||
#%%###***#####%**++++##**%#@@#@ ##+++++++++*###%#+***+***##*************#######
|
||||
@#%%####%%####%+++++++##*######%++++++++++++++#*+++++#%###%#######*********######%
|
||||
##%########@%@+++@###%*%#####@+++++++++++%**++++++++++%%%%%%########***==**###%##%
|
||||
%#%###%###########@@%#%#@@##++++++++****++++********+++ %########**===*###%*#
|
||||
#**##%####@@####%@######%*++++++++++++++++#++**+*#++++# ########******###% %
|
||||
@#***# ###%@@##%#######@+++++++++++++++++++++%*++**++++# *########******##% @
|
||||
*******% %##% =@#########++++++++++++++++++#++++*%++*#%#++# ########******##%
|
||||
#@%@# %% *@#@@###*+++++++++++++++++++%+++##+++###++* ##*#####******##@
|
||||
**##%*++%++++++++++++++++++++++++++++++++% +#**#####******###
|
||||
##%#######*@***+#+++++++++++++++#***#++++++++++++ %**#####*******#%
|
||||
*+++++$****##****++++++++##% #******#+++++++++++ %**#####*******#@
|
||||
#++++++++*******- ++++++++# *******#++++++++++# @**#####*******#
|
||||
#@@+++++++******- *+++++++# #******#+++++++++* **####%**==+**@
|
||||
@@@@@+++ %+++++++# ******# %+++++++ %*###%***===**@ %=
|
||||
@@@@@@@@@ #+++++++# =****** #++++++% *###%#***=+**% %**
|
||||
@@@@@@@@@@ ++++++++# ******# #++++++# *##@%********% @*@
|
||||
@@+@@@++@@+ ++++++++# ******# #++++++# @## #*********@ #***#
|
||||
@@+@@++@@@++ @@@++++++* @@@%**** #@@++++% +## %#****************%
|
||||
@*@**@+++# @@@@+++++ @@@@@@**# @@@@@++++# @# %#****************
|
||||
+#+++++# @@@@@@+++% @@@@@@@@# @@@@@@@++ @ %##************%
|
||||
#+++** @@@@@@@@@@ @@@@@@@@@ @@@@@@@@@ %###********%*
|
||||
@@@@@@@@@@+ @@@@@@@@@@ =@@@@@@@@@ %%#####%%
|
||||
*@@@@@@@@@@ @+*@@@@@@@= @@++@@@@@@
|
||||
@++@@@@@@@@ #**@**@@@@@ *@@*#@@@@@@ -=
|
||||
@%#@@@@@@@@ *#***@@@@@@ @+#+@++#@@@
|
||||
#+++@++@@@@@ **********# #+++++@+@@@@
|
||||
##+#+++@@@@@@ ##****#### *+#+##+++@@%%
|
||||
#+++++++++++# #++++++++++#
|
||||
#########*
|
||||
|
||||
____ ____ ____ _ _ ___ ____ ___ ___ ____ ____
|
||||
( _ \( _ \(_ _)( \( )/ __)( ___)/ __)/ __) ( _ \(_ _)/\/
|
||||
)___/ ) / _)(_ ) (( (__ )__) \__ \\__ \ )___/ _)(_
|
||||
(__) (_)\_)(____)(_)\_)\___)(____)(___/(___/ (__) (____)
|
||||
|
||||
Princess Pi
|
||||
https://linktr.ee/princesspi3
|
||||
|
||||
'@
|
||||
Write-Host $art -ForegroundColor Blue;
|
||||
}
|
||||
|
||||
function Get-AlgorithmFromHashLength {
|
||||
param([string]$HashString);
|
||||
|
||||
switch ($HashString.Trim().Length) {
|
||||
32 { return 'MD5'; }
|
||||
40 { return 'SHA1'; }
|
||||
64 { return 'SHA256'; }
|
||||
96 { return 'SHA384'; }
|
||||
128 { return 'SHA512'; }
|
||||
default {
|
||||
Write-ErrorWithHelp "checksum: Could not auto-detect algorithm for hash length $($HashString.Length). Please specify -Algorithm.";
|
||||
return $null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# --- MAIN EXECUTION FLOW ---
|
||||
$helpInPath = $false;
|
||||
if ($FilePath) {
|
||||
foreach ($p in ($FilePath)) {
|
||||
if ($p -match '^(?i)[-/]{1,2}(h|help|\?)$') {
|
||||
$helpInPath = $true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($Help.IsPresent -or $helpInPath) {
|
||||
Show-Help;
|
||||
return;
|
||||
}
|
||||
|
||||
if ($PrincessPi.IsPresent) {
|
||||
Show-PrincessPiArt;
|
||||
return;
|
||||
}
|
||||
|
||||
if (-not [string]::IsNullOrWhiteSpace($Algorithm)) {
|
||||
$Algorithm = $Algorithm.ToUpper();
|
||||
}
|
||||
|
||||
$isWildcardGlobal = $false;
|
||||
if ($FilePath) {
|
||||
foreach ($p in $FilePath) {
|
||||
if ($p -match '\*') { $isWildcardGlobal = $true; }
|
||||
}
|
||||
}
|
||||
$showProgress = $Recursive.IsPresent -or $isWildcardGlobal -or ($PSCmdlet.ParameterSetName -eq 'Verify');
|
||||
|
||||
# --- ITEM GATHERING (Generate & Match Modes) ---
|
||||
if ($PSCmdlet.ParameterSetName -in @('Generate', 'Match')) {
|
||||
if (-not $FilePath -or $FilePath.Count -eq 0) {
|
||||
Write-ErrorWithHelp "checksum: Missing file path parameter. Use -Help for usage.";
|
||||
return;
|
||||
}
|
||||
|
||||
$allItems = @();
|
||||
$skipExtensions = @('.md5', '.sha1', '.sha256', '.sha384', '.sha512');
|
||||
|
||||
foreach ($pathEntry in ($FilePath)) {
|
||||
$isWildcard = ($pathEntry -match '\*');
|
||||
$resolvedItems = @();
|
||||
|
||||
if ($Recursive) {
|
||||
$resolvedItems = Get-ChildItem -Path ($pathEntry) -Recurse -File -ErrorAction 'SilentlyContinue';
|
||||
} else {
|
||||
if ($isWildcard -or ($pathEntry -match '\?')) {
|
||||
$resolvedItems = Get-ChildItem -Path ($pathEntry) -File -ErrorAction 'SilentlyContinue';
|
||||
} else {
|
||||
$resolvedItems = Get-Item -Path ($pathEntry) -ErrorAction 'SilentlyContinue';
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $resolvedItems) {
|
||||
Write-ErrorWithHelp "checksum: $($pathEntry): No such file or directory";
|
||||
continue;
|
||||
}
|
||||
|
||||
$explicitFileFound = $false;
|
||||
if ((-not $isWildcard) -and (Test-Path -Path ($pathEntry) -PathType 'Leaf')) {
|
||||
$explicitFileFound = $true;
|
||||
}
|
||||
|
||||
foreach ($item in ($resolvedItems)) {
|
||||
if ($item.PSIsContainer) { continue; }
|
||||
|
||||
if (-not $explicitFileFound) {
|
||||
if ($skipExtensions -contains $item.Extension.ToLower()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$allItems += $item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# --- DIRECT MATCH MODE (-m / -Match) ---
|
||||
if ($PSCmdlet.ParameterSetName -eq 'Match') {
|
||||
if ([string]::IsNullOrWhiteSpace($Algorithm)) {
|
||||
$Algorithm = Get-AlgorithmFromHashLength -HashString ($Match);
|
||||
if (-not $Algorithm) { return; }
|
||||
}
|
||||
|
||||
$expectedHash = $Match.Trim().ToLower();
|
||||
$totalFiles = $allItems.Count;
|
||||
$currentIndex = 0;
|
||||
|
||||
$allItems | ForEach-Object -Parallel {
|
||||
$item = $_
|
||||
$algo = $using:Algorithm
|
||||
$exp = $using:expectedHash
|
||||
|
||||
$actualHash = (Get-FileHash -Path ($item.FullName) -Algorithm ($algo)).Hash.ToLower();
|
||||
$targetFile = Resolve-Path -Path ($item.FullName) -Relative -ErrorAction 'SilentlyContinue';
|
||||
if (-not $targetFile) { $targetFile = $item.Name; }
|
||||
if ($targetFile.StartsWith(".\") -or $targetFile.StartsWith("./")) { $targetFile = $targetFile.Substring(2); }
|
||||
|
||||
[PSCustomObject]@{
|
||||
TargetFile = $targetFile
|
||||
IsMatch = ($actualHash -eq $exp)
|
||||
}
|
||||
} -ThrottleLimit 16 | ForEach-Object {
|
||||
$currentIndex++
|
||||
if ($showProgress -and $totalFiles -gt 0) {
|
||||
Write-Progress -Activity "Matching Checksums ($Algorithm)" -Status "Processing file $currentIndex of $totalFiles" -PercentComplete (($currentIndex / $totalFiles) * 100);
|
||||
}
|
||||
|
||||
if ($_.IsMatch) {
|
||||
Write-Host "$($_.TargetFile): " -NoNewline;
|
||||
Write-Host "OK" -ForegroundColor Green;
|
||||
} else {
|
||||
Write-Host "$($_.TargetFile): " -NoNewline;
|
||||
Write-Host "FAILED" -ForegroundColor Red;
|
||||
}
|
||||
}
|
||||
|
||||
if ($showProgress) {
|
||||
Write-Progress -Activity "Matching Checksums ($Algorithm)" -Completed;
|
||||
}
|
||||
}
|
||||
# --- VERIFICATION MODE (-c / -Check) ---
|
||||
elseif ($PSCmdlet.ParameterSetName -eq 'Verify') {
|
||||
$checkFiles = @();
|
||||
if ($Recursive) {
|
||||
$checkFileName = Split-Path -Path ($Check) -Leaf;
|
||||
$checkFiles = Get-ChildItem -Path '.\' -Filter ($checkFileName) -Recurse -File -ErrorAction 'SilentlyContinue';
|
||||
} else {
|
||||
if (Test-Path -Path ($Check) -PathType 'Leaf') {
|
||||
$checkFiles = @(Get-Item -Path ($Check));
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $checkFiles -or $checkFiles.Count -eq 0) {
|
||||
Write-ErrorWithHelp "checksum: $($Check): No such file or directory";
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($cf in ($checkFiles)) {
|
||||
$lines = Get-Content -Path ($cf.FullName);
|
||||
$baseDir = $cf.DirectoryName;
|
||||
|
||||
$fileAlgo = $Algorithm;
|
||||
if ([string]::IsNullOrWhiteSpace($fileAlgo)) {
|
||||
foreach ($line in ($lines)) {
|
||||
if ([string]::IsNullOrWhiteSpace($line) -or $line.StartsWith("#")) { continue; }
|
||||
|
||||
if ($line -match '^([a-fA-F0-9]+)\s+') {
|
||||
$fileAlgo = Get-AlgorithmFromHashLength -HashString ($Matches[1]);
|
||||
break;
|
||||
}
|
||||
elseif ($line -match '^([a-fA-F0-9]{128}|[a-fA-F0-9]{96}|[a-fA-F0-9]{64}|[a-fA-F0-9]{40}|[a-fA-F0-9]{32})') {
|
||||
$fileAlgo = Get-AlgorithmFromHashLength -HashString ($Matches[1]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ([string]::IsNullOrWhiteSpace($fileAlgo)) { $fileAlgo = 'SHA256'; }
|
||||
}
|
||||
|
||||
$verifyItems = @();
|
||||
foreach ($line in ($lines)) {
|
||||
if ([string]::IsNullOrWhiteSpace($line) -or $line.StartsWith("#")) { continue; }
|
||||
|
||||
$expectedHash = $null;
|
||||
$targetFile = $null;
|
||||
|
||||
if ($line -match '^([a-fA-F0-9]+)\s+[* ]?(.*)$') {
|
||||
$expectedHash = $Matches[1].ToLower();
|
||||
$targetFile = $Matches[2].Trim().TrimStart('*');
|
||||
}
|
||||
elseif ($line -match '^([a-fA-F0-9]{128}|[a-fA-F0-9]{96}|[a-fA-F0-9]{64}|[a-fA-F0-9]{40}|[a-fA-F0-9]{32})[* ]?(.*)$') {
|
||||
$expectedHash = $Matches[1].ToLower();
|
||||
$targetFile = $Matches[2].Trim().TrimStart('*');
|
||||
}
|
||||
|
||||
if ($expectedHash -and $targetFile) {
|
||||
$targetFullPath = Join-Path -Path ($baseDir) -ChildPath ($targetFile);
|
||||
$verifyItems += [PSCustomObject]@{
|
||||
ExpectedHash = $expectedHash
|
||||
TargetFile = $targetFile
|
||||
TargetFullPath = $targetFullPath
|
||||
BaseDir = $baseDir
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
$totalFiles = $verifyItems.Count;
|
||||
$currentIndex = 0;
|
||||
|
||||
$verifyItems | ForEach-Object -Parallel {
|
||||
$item = $_
|
||||
$algo = $using:fileAlgo
|
||||
|
||||
if (Test-Path -Path ($item.TargetFullPath) -PathType 'Leaf') {
|
||||
$actualHash = (Get-FileHash -Path ($item.TargetFullPath) -Algorithm ($algo)).Hash.ToLower();
|
||||
|
||||
$displayPath = Resolve-Path -Path ($item.TargetFullPath) -Relative -ErrorAction 'SilentlyContinue';
|
||||
if (-not $displayPath) { $displayPath = $item.TargetFile; }
|
||||
if ($displayPath.StartsWith(".\") -or $displayPath.StartsWith("./")) { $displayPath = $displayPath.Substring(2); }
|
||||
|
||||
[PSCustomObject]@{
|
||||
DisplayPath = $displayPath
|
||||
Status = if ($actualHash -eq $item.ExpectedHash) { "OK" } else { "FAILED" }
|
||||
IsError = $false
|
||||
}
|
||||
} else {
|
||||
$displayPath = $item.TargetFile;
|
||||
if ($item.BaseDir -ne (Get-Location).Path) {
|
||||
$displayPath = Join-Path -Path (Resolve-Path -Path ($item.BaseDir) -Relative -ErrorAction 'SilentlyContinue') -ChildPath ($item.TargetFile);
|
||||
if ($displayPath.StartsWith(".\") -or $displayPath.StartsWith("./")) { $displayPath = $displayPath.Substring(2); }
|
||||
}
|
||||
[PSCustomObject]@{
|
||||
DisplayPath = $displayPath
|
||||
Status = "FAILED open or read"
|
||||
IsError = $true
|
||||
}
|
||||
}
|
||||
} -ThrottleLimit 16 | ForEach-Object {
|
||||
$currentIndex++
|
||||
if ($totalFiles -gt 0) {
|
||||
Write-Progress -Activity "Verifying Checksums ($fileAlgo)" -Status "Processing file $currentIndex of $totalFiles" -PercentComplete (($currentIndex / $totalFiles) * 100);
|
||||
}
|
||||
|
||||
Write-Host "$($_.DisplayPath): " -NoNewline;
|
||||
if ($_.IsError) {
|
||||
Write-Host "$($_.Status)" -ForegroundColor Red;
|
||||
} elseif ($_.Status -eq "OK") {
|
||||
Write-Host "OK" -ForegroundColor Green;
|
||||
} else {
|
||||
Write-Host "FAILED" -ForegroundColor Red;
|
||||
}
|
||||
}
|
||||
Write-Progress -Activity "Verifying Checksums ($fileAlgo)" -Completed;
|
||||
}
|
||||
}
|
||||
# --- GENERATION MODE ---
|
||||
else {
|
||||
if ([string]::IsNullOrWhiteSpace($Algorithm)) {
|
||||
$Algorithm = 'SHA256';
|
||||
}
|
||||
|
||||
$wantCustomOut = $PSBoundParameters.ContainsKey('OutFile');
|
||||
$wantAutoOut = $Save.IsPresent;
|
||||
|
||||
if ($wantCustomOut -or $wantAutoOut) {
|
||||
if ($Recursive -and $isWildcardGlobal) {
|
||||
$groupedItems = $allItems | Group-Object DirectoryName;
|
||||
|
||||
foreach ($group in ($groupedItems)) {
|
||||
$dirPath = $group.Name;
|
||||
$filesInDir = $group.Group;
|
||||
|
||||
if ($wantCustomOut) {
|
||||
$currentOutFile = Join-Path -Path ($dirPath) -ChildPath ($OutFile);
|
||||
} else {
|
||||
$currentOutFile = Join-Path -Path ($dirPath) -ChildPath "checksums.$($Algorithm.ToLower())";
|
||||
}
|
||||
|
||||
$totalFiles = $filesInDir.Count;
|
||||
$currentIndex = 0;
|
||||
$linesToWrite = @();
|
||||
|
||||
$filesInDir | ForEach-Object -Parallel {
|
||||
$item = $_
|
||||
$algo = $using:Algorithm
|
||||
|
||||
$hash = (Get-FileHash -Path ($item.FullName) -Algorithm ($algo)).Hash.ToLower();
|
||||
|
||||
$relativePath = Resolve-Path -Path ($item.FullName) -Relative -ErrorAction 'SilentlyContinue';
|
||||
if (-not $relativePath) { $relativePath = $item.Name; }
|
||||
if ($relativePath.StartsWith(".\") -or $relativePath.StartsWith("./")) {
|
||||
$relativePath = $relativePath.Substring(2);
|
||||
}
|
||||
|
||||
[PSCustomObject]@{
|
||||
Item = $item
|
||||
Hash = $hash
|
||||
RelativePath = $relativePath
|
||||
OutputLine = "${hash} ${relativePath}"
|
||||
ItemOutFile = "$($item.FullName).$($algo.ToLower())"
|
||||
}
|
||||
} -ThrottleLimit 16 | ForEach-Object {
|
||||
$currentIndex++;
|
||||
if ($showProgress -and $totalFiles -gt 0) {
|
||||
Write-Progress -Activity "Computing Checksums ($Algorithm)" -Status "Directory: $(Split-Path $dirPath -Leaf) [$currentIndex/$totalFiles]" -PercentComplete (($currentIndex / $totalFiles) * 100);
|
||||
}
|
||||
|
||||
$linesToWrite += $_.OutputLine;
|
||||
Write-Output $_.OutputLine;
|
||||
}
|
||||
|
||||
if ($showProgress) {
|
||||
Write-Progress -Activity "Computing Checksums ($Algorithm)" -Completed;
|
||||
}
|
||||
|
||||
Set-Content -Path ($currentOutFile) -Value $linesToWrite -Encoding utf8;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($wantCustomOut -or ($wantAutoOut -and $isWildcardGlobal)) {
|
||||
if ($wantCustomOut) {
|
||||
$singleOutFile = $OutFile;
|
||||
} else {
|
||||
$singleOutFile = "checksums.$($Algorithm.ToLower())";
|
||||
}
|
||||
|
||||
$totalFiles = $allItems.Count;
|
||||
$currentIndex = 0;
|
||||
$linesToWrite = @();
|
||||
|
||||
$allItems | ForEach-Object -Parallel {
|
||||
$item = $_
|
||||
$algo = $using:Algorithm
|
||||
|
||||
$hash = (Get-FileHash -Path ($item.FullName) -Algorithm ($algo)).Hash.ToLower();
|
||||
|
||||
$relativePath = Resolve-Path -Path ($item.FullName) -Relative -ErrorAction 'SilentlyContinue';
|
||||
if (-not $relativePath) { $relativePath = $item.Name; }
|
||||
if ($relativePath.StartsWith(".\") -or $relativePath.StartsWith("./")) {
|
||||
$relativePath = $relativePath.Substring(2);
|
||||
}
|
||||
|
||||
[PSCustomObject]@{
|
||||
Item = $item
|
||||
Hash = $hash
|
||||
RelativePath = $relativePath
|
||||
OutputLine = "${hash} ${relativePath}"
|
||||
ItemOutFile = "$($item.FullName).$($algo.ToLower())"
|
||||
}
|
||||
} -ThrottleLimit 16 | ForEach-Object {
|
||||
$currentIndex++;
|
||||
if ($showProgress -and $totalFiles -gt 0) {
|
||||
Write-Progress -Activity "Computing Checksums ($Algorithm)" -Status "Processing file $currentIndex of $totalFiles" -PercentComplete (($currentIndex / $totalFiles) * 100);
|
||||
}
|
||||
|
||||
$linesToWrite += $_.OutputLine;
|
||||
Write-Output $_.OutputLine;
|
||||
}
|
||||
|
||||
if ($showProgress) {
|
||||
Write-Progress -Activity "Computing Checksums ($Algorithm)" -Completed;
|
||||
}
|
||||
|
||||
Set-Content -Path ($singleOutFile) -Value $linesToWrite -Encoding utf8;
|
||||
}
|
||||
else {
|
||||
$totalFiles = $allItems.Count;
|
||||
$currentIndex = 0;
|
||||
|
||||
$allItems | ForEach-Object -Parallel {
|
||||
$item = $_
|
||||
$algo = $using:Algorithm
|
||||
|
||||
$hash = (Get-FileHash -Path ($item.FullName) -Algorithm ($algo)).Hash.ToLower();
|
||||
|
||||
$relativePath = Resolve-Path -Path ($item.FullName) -Relative -ErrorAction 'SilentlyContinue';
|
||||
if (-not $relativePath) { $relativePath = $item.Name; }
|
||||
if ($relativePath.StartsWith(".\") -or $relativePath.StartsWith("./")) {
|
||||
$relativePath = $relativePath.Substring(2);
|
||||
}
|
||||
|
||||
[PSCustomObject]@{
|
||||
Item = $item
|
||||
Hash = $hash
|
||||
RelativePath = $relativePath
|
||||
OutputLine = "${hash} ${relativePath}"
|
||||
ItemOutFile = "$($item.FullName).$($algo.ToLower())"
|
||||
}
|
||||
} -ThrottleLimit 16 | ForEach-Object {
|
||||
$currentIndex++;
|
||||
if ($showProgress -and $totalFiles -gt 0) {
|
||||
Write-Progress -Activity "Computing Checksums ($Algorithm)" -Status "Processing file $currentIndex of $totalFiles" -PercentComplete (($currentIndex / $totalFiles) * 100);
|
||||
}
|
||||
|
||||
Write-Output $_.OutputLine;
|
||||
Set-Content -Path ($_.ItemOutFile) -Value $_.OutputLine -Encoding utf8;
|
||||
}
|
||||
|
||||
if ($showProgress) {
|
||||
Write-Progress -Activity "Computing Checksums ($Algorithm)" -Completed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$totalFiles = $allItems.Count;
|
||||
$currentIndex = 0;
|
||||
|
||||
$allItems | ForEach-Object -Parallel {
|
||||
$item = $_
|
||||
$algo = $using:Algorithm
|
||||
|
||||
$hash = (Get-FileHash -Path ($item.FullName) -Algorithm ($algo)).Hash.ToLower();
|
||||
|
||||
$relativePath = Resolve-Path -Path ($item.FullName) -Relative -ErrorAction 'SilentlyContinue';
|
||||
if (-not $relativePath) { $relativePath = $item.Name; }
|
||||
if ($relativePath.StartsWith(".\") -or $relativePath.StartsWith("./")) {
|
||||
$relativePath = $relativePath.Substring(2);
|
||||
}
|
||||
|
||||
[PSCustomObject]@{
|
||||
Item = $item
|
||||
Hash = $hash
|
||||
RelativePath = $relativePath
|
||||
OutputLine = "${hash} ${relativePath}"
|
||||
ItemOutFile = "$($item.FullName).$($algo.ToLower())"
|
||||
}
|
||||
} -ThrottleLimit 16 | ForEach-Object {
|
||||
$currentIndex++;
|
||||
if ($showProgress -and $totalFiles -gt 0) {
|
||||
Write-Progress -Activity "Computing Checksums ($Algorithm)" -Status "Processing file $currentIndex of $totalFiles" -PercentComplete (($currentIndex / $totalFiles) * 100);
|
||||
}
|
||||
|
||||
Write-Output $_.OutputLine;
|
||||
}
|
||||
|
||||
if ($showProgress) {
|
||||
Write-Progress -Activity "Computing Checksums ($Algorithm)" -Completed;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
param(
|
||||
# powershell is factually gay idkl why its such a shit
|
||||
[Parameter(Mandatory=$True, Position=0)] # deband the param, its in position 0 so ya canb just ffmpreg_gif_loopy filename.mp4 OR ffmpreg_gif_loopy -Filename filename.mp4
|
||||
[string]$Filename # var for filename string
|
||||
)
|
||||
# apng is far hjigher quality and also preserves transparancy :activated:
|
||||
$noextpath = [System.IO.Path]::GetFileNameWithoutExtension($Filename) # get filename without extension
|
||||
$gifpath = "$noextpath`_MAXLOOP.gif" # add da .gif extension and MAXLOOP tag
|
||||
|
||||
# ffmpeg
|
||||
## -i input file (mp4)
|
||||
## settings for -filter_complex purely vibe coded for max quality
|
||||
### split [a][b]: Splitting clones the video stream into two identical, simultaneous feeds. This lets you process the color palette and render the GIF all in one
|
||||
### palettegen=stats_mode=single: This generates the highest quality 256-color palette based strictly on the exact colors present in your video. Changing the mode to single tells FFmpeg to optimize colors for moving objects across frames.
|
||||
### paletteuse=dither=bayer:bayer_scale=5: This dictates how colors are blended. Using a strict bayer dither with a scale of 5 keeps gradients incredibly clean and crisp, eliminating the ugly "cross-hatch" or "grainy" patterns typical of basic GIFs
|
||||
## -loop 0 maek da gif loop
|
||||
## outputfile (gif)
|
||||
ffmpeg -i "$Filename" -filter_complex "[0:v] split [a][b];[a] palettegen=stats_mode=single [p];[b][p] paletteuse=dither=bayer:bayer_scale=5" -loop 0 "$gifpath"
|
||||
@@ -1,150 +0,0 @@
|
||||
# todo: sanity checks for if x wsl is installed and x v2, if x usbipd is installed, if the user is running powershell >-7
|
||||
# x if wsl is not installed, install it
|
||||
# x if usbipd is not installed, install it
|
||||
# if wsl is not version 2, upgrade it
|
||||
|
||||
# :pope: may work
|
||||
#Requires -RunAsAdministrator
|
||||
|
||||
# llm cancer string that amkes it run as admin
|
||||
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
|
||||
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
|
||||
exit
|
||||
}
|
||||
|
||||
# detach and unbind all devices and exit
|
||||
if($args[0] -eq "detach") {
|
||||
Write-Host "Detaching and Unbinding all USB devices from WSL"
|
||||
usbipd detach --all
|
||||
usbipd unbind --all
|
||||
Write-Host "All USB devices have been detached and unbound from WSL"
|
||||
Write-Host "Press Any Key To Exit"
|
||||
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
|
||||
exit
|
||||
}
|
||||
|
||||
# list devices and exit
|
||||
if ($args[0] -eq "list") {
|
||||
Write-Host "Listing USB devices attached to WSL"
|
||||
usbipd list
|
||||
|
||||
Write-Host "Press Any Key To Exit"
|
||||
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
|
||||
exit
|
||||
}
|
||||
|
||||
# help bs
|
||||
if ($args[0] -eq "help") {
|
||||
Write-Host "Usage: .\get_wsl_usb.ps1 [options]"
|
||||
Write-Host "Options:"
|
||||
Write-Host " attach Attach a USB device to WSL (default action if no options are provided)"
|
||||
Write-Host " detach Detach and unbind all USB devices from WSL"
|
||||
Write-Host " list List USB devices attached to WSL"
|
||||
Write-Host " help Display this help message"
|
||||
Write-Host "If no options are provided, the script will list USB devices and allow you to attach one to WSL."
|
||||
Write-Host "Press Any Key To Exit"
|
||||
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
|
||||
exit
|
||||
}
|
||||
|
||||
# now sanity/env checks
|
||||
## check if wsl installed is version 2, if not upgrade it it
|
||||
function Check-WSLVersion {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Check if WSL is version 2 and upgrade if necessary.
|
||||
|
||||
.DESCRIPTION
|
||||
This function checks the installed WSL version and upgrades to WSL 2 if needed.
|
||||
#>
|
||||
|
||||
# Get WSL status
|
||||
$wslStatus = wsl --status 2>&1
|
||||
|
||||
# Check if WSL 2 is available (look for WSL 2 in status output)
|
||||
if ($wslStatus -match "WSL version:\s+\d") {
|
||||
if ($wslStatus -match "Default distribution version:\s+2") {
|
||||
Write-Host "WSL 2 is already installed and set as default."
|
||||
return $true
|
||||
}
|
||||
else {
|
||||
Write-Host "WSL 1 detected. Attempting to upgrade to WSL 2..."
|
||||
try {
|
||||
wsl --update
|
||||
Write-Host "WSL has been updated. Please restart your computer and run this script again."
|
||||
return $false
|
||||
}
|
||||
catch {
|
||||
Write-Host "Error updating WSL: $_"
|
||||
return $false
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
# Fallback: try to get list of distributions
|
||||
$wslList = wsl --list -v 2>&1
|
||||
if ($wslList -match "VERSION\s+2") {
|
||||
Write-Host "WSL 2 detected."
|
||||
return $true
|
||||
}
|
||||
elseif ($wslList -match "VERSION\s+1") {
|
||||
Write-Host "WSL 1 detected. Upgrading to WSL 2..."
|
||||
try {
|
||||
$distros = $wslList | Where-Object { $_ -match "^[^*]" } | ForEach-Object { ($_ -split '\s+')[0] } | Where-Object { $_ -and $_ -ne "NAME" }
|
||||
foreach ($distro in $distros) {
|
||||
Write-Host "Upgrading $distro to WSL 2..."
|
||||
wsl --set-version $distro 2
|
||||
}
|
||||
Write-Host "Distros have been upgraded to WSL 2."
|
||||
return $true
|
||||
}
|
||||
catch {
|
||||
Write-Host "Error upgrading WSL: $_"
|
||||
return $false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $false
|
||||
}
|
||||
|
||||
## if wsl not installed, install it
|
||||
if (-not (Get-Command wsl -ErrorAction SilentlyContinue)) {
|
||||
Write-Host "WSL is not installed. Installing WSL..."
|
||||
wsl --install
|
||||
Write-Host "WSL has been installed. Please restart your computer and run this script again."
|
||||
exit
|
||||
}
|
||||
|
||||
## Check WSL version and upgrade if needed
|
||||
# if (-not (Check-WSLVersion)) {
|
||||
# Write-Host "WSL upgrade required. Please restart your computer and run this script again."
|
||||
# }
|
||||
|
||||
# do the wsl version check and upgrade if needed before we do anything else
|
||||
if (-not (Get-Command usbipd -ErrorAction SilentlyContinue)) {
|
||||
Write-Host "usbipd is not installed. Installing usbipd..."
|
||||
winget install usbipd
|
||||
Write-Host "usbipd has been installed."
|
||||
}
|
||||
|
||||
# Your code goes here
|
||||
Write-Host "Admin Perms Confirmed!"
|
||||
Write-Host "Launching WSL"
|
||||
# lanch in enew window so we can run usbipd commands in the current one
|
||||
Start-Process pwsh.exe "-NoExit","-Command", "wsl", "-d", "kali-wsl"
|
||||
# Write-Host "Press Any Key To Continue"
|
||||
# Clear-Host
|
||||
Write-Host "Listing usb devices, remember the busid (ex. 1-3) of the device you wish to attach to WSL"
|
||||
usbipd list
|
||||
# Write-Host "Press Any Key To Continue"
|
||||
# $null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
|
||||
$BUSID = Read-Host "Enter The BUSID of the USB Device You Wish to Attach to WSL"
|
||||
Clear-Host
|
||||
Write-Host "Attaching USB Device with BUSID $BUSID"
|
||||
usbipd bind --force --busid $BUSID
|
||||
usbipd attach --wsl --busid $BUSID
|
||||
Write-Host "USB Device With BUSID $BUSID Has Been Attached to WSL"
|
||||
Write-Host "Press Any Key To Exit"
|
||||
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
|
||||
exit
|
||||
@@ -1,17 +0,0 @@
|
||||
if ($args) {
|
||||
$message=$args -join ' '
|
||||
} else {
|
||||
if(test-path './version.txt') {
|
||||
$message = $(get-content './version.txt')
|
||||
} else {
|
||||
$message = $(Get-Date -uformat "%s")
|
||||
}
|
||||
}
|
||||
|
||||
echo "git commit message: '$message'"
|
||||
|
||||
git add .
|
||||
git commit -m "$message"
|
||||
git push
|
||||
|
||||
echo "Done :3"
|
||||
@@ -1,20 +0,0 @@
|
||||
# todo, param and defaults these up
|
||||
$remote_dir = "/var/www/html/Media-Viewer"
|
||||
$remote_host = "pi3"
|
||||
$remote_cmd = "echo REMOTE pull $remote_dir; git -C $remote_dir pull; echo REMOTE add $remote_diradding; git -C $remote_dir add .; echo REMOTE commit $remote_dir; git -C $remote_dir commit -m `$(date +%s); echo REMOTE push $remote_dir; git -C $remote_dir push; echo -e `"\nREMOTE status $remote_dir\n`"; git -C $remote_dir status;"
|
||||
|
||||
echo "`nLOCAL pulling`n"
|
||||
git pull
|
||||
|
||||
echo "`nLOCAL adding, comitting and pushing`n"
|
||||
gitshit # usin gitshit here lmfao maybe make message a param
|
||||
|
||||
echo "`nLOCAL status`n"
|
||||
git status
|
||||
|
||||
# run da REMOTE
|
||||
echo "`nREMOTE running sync"
|
||||
ssh $remote_host "/bin/bash -c $remote_cmd"
|
||||
|
||||
echo "`nLOCAL status`n"
|
||||
git status
|
||||
@@ -1,99 +0,0 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
# First string to compare
|
||||
[Parameter(Position = 0)]
|
||||
[string]$String1,
|
||||
|
||||
# Second string to compare
|
||||
[Parameter(Position = 1)]
|
||||
[string]$String2,
|
||||
|
||||
# Optional switch to enable case-sensitive comparison
|
||||
[switch]$CaseSensitive,
|
||||
|
||||
# Help flag (-h, -Help)
|
||||
[Alias('h')]
|
||||
[switch]$Help
|
||||
)
|
||||
|
||||
begin {
|
||||
function Show-Help {
|
||||
@'
|
||||
NAME
|
||||
match - Compare two strings and output visual match status
|
||||
|
||||
SYNOPSIS
|
||||
match <String1> <String2> [-CaseSensitive]
|
||||
match -Help
|
||||
|
||||
DESCRIPTION
|
||||
Compares two string arguments.
|
||||
Outputs "Match OK" in GREEN if they match.
|
||||
Outputs "FAIL: NO MATCH" in RED if they differ.
|
||||
|
||||
PARAMETERS
|
||||
String1
|
||||
The first string to compare.
|
||||
|
||||
String2
|
||||
The second string to compare.
|
||||
|
||||
-CaseSensitive
|
||||
Perform a case-sensitive comparison (default is case-insensitive).
|
||||
|
||||
-h, -Help, h, help (case insensitive)
|
||||
Display this help message.
|
||||
|
||||
EXAMPLES
|
||||
1. Compare two strings (case-insensitive default):
|
||||
match "hello" "Hello"
|
||||
Output: Match OK (in green)
|
||||
|
||||
2. Compare two strings with case sensitivity:
|
||||
match "hello" "Hello" -CaseSensitive
|
||||
Output: FAIL: NO MATCH (in red)
|
||||
|
||||
3. Compare hashes or checksum outputs:
|
||||
match "e3b0c442" "e3b0c442"
|
||||
Output: Match OK (in green)
|
||||
'@
|
||||
}
|
||||
}
|
||||
|
||||
process {
|
||||
# Check if help was explicitly requested via flag or positional parameter
|
||||
$isHelpRequested = $Help.IsPresent -or (
|
||||
$PSBoundParameters.Count -gt 0 -and (
|
||||
($String1 -and $String1 -match '^(?i)[-/]{0,2}(h|help)$') -or
|
||||
($String2 -and $String2 -match '^(?i)[-/]{0,2}(h|help)$')
|
||||
)
|
||||
)
|
||||
|
||||
if ($isHelpRequested) {
|
||||
Show-Help
|
||||
return
|
||||
}
|
||||
|
||||
# Trigger help usage if either string parameter is missing or whitespace
|
||||
if ([string]::IsNullOrWhiteSpace($String1) -or [string]::IsNullOrWhiteSpace($String2)) {
|
||||
Write-Host "Error: Missing required arguments." -ForegroundColor Yellow
|
||||
Write-Host "Usage: match <String1> <String2> [-CaseSensitive]" -ForegroundColor Cyan
|
||||
Write-Host "Run 'match -Help' for detailed documentation.`n"
|
||||
return
|
||||
}
|
||||
|
||||
# Compare strings based on case-sensitivity choice
|
||||
$isMatch = if ($CaseSensitive) {
|
||||
$String1 -ceq $String2
|
||||
} else {
|
||||
$String1 -eq $String2
|
||||
}
|
||||
|
||||
if ($isMatch) {
|
||||
Write-Host "`n`nSUCCESS: MATCH OK!`n`n" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "`n`nFAIL: NO MATCH!`n`n" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
|
||||
end {}
|
||||
@@ -1,25 +0,0 @@
|
||||
$counter = 1;
|
||||
$paths_file = ".\paths.txt"
|
||||
$destination_dir = ""
|
||||
$sleep_seconds = 90
|
||||
|
||||
# infinite loop to run through to and loop every $sleep_seconds seconeds
|
||||
while($true) {
|
||||
Write-Host "`n`nNew Rotation!`n`tRotation $counter `n`tCopying...`n`n"
|
||||
# loop through paths in $paths_file
|
||||
foreach($line in Get-Content "$paths_file") {
|
||||
Clear-Host
|
||||
Write-Host "Handling $line on rotation $counter"
|
||||
# copy the path
|
||||
$path = $line
|
||||
# split $line by \ and return last element
|
||||
$dirname = $line -split "\\" | Select-Object -Last 1
|
||||
# do the copy
|
||||
robocopy /e /z $path $destination_dir\$dirname
|
||||
}
|
||||
Clear-Host
|
||||
Write-Host "`n`nFinished Rotation $counter`n`tSleeping 90 Seconds...`n`n"
|
||||
# sleep wont start until robopy loop is finished
|
||||
Start-Sleep -Seconds $sleep_seconds # sleep $sleep_seconds seconds
|
||||
$counter++;
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
# TEXT TO ASCII ART GENERATOR https://patorjk.com/software/taag/#p=display&f=Graceful&t=PRINCESS+PI&x=none&v=4&h=4&w=80&we=false
|
||||
# IMAGE TO ASCII ART GENERATOR https://www.asciiart.eu/image-to-ascii
|
||||
Clear-Host # cleanup
|
||||
Write-Host -ForegroundColor Magenta @'
|
||||
=--= =----=
|
||||
=--= -------=
|
||||
=--= --------=
|
||||
=----= --- =---------=
|
||||
----= =--- ---==++=----:-----=
|
||||
=-----= - ---- ========----::----=
|
||||
=------= ----=+===-::::::::=+**++===+#
|
||||
==-----=----=+**+=:::-======++******+==+##
|
||||
=------=-=+*:::-=============+*****+==+*##
|
||||
=------=+=:-++==--+=++===+====+***+===***=
|
||||
=--------+*===---+===+===+++==+**=+==+**+-
|
||||
=------=+===--=+++==++++%%*==**====+**+.- -
|
||||
#=---=+====-=+++=+++*+.%+-==**=-==+**+.. --
|
||||
#**+--+========++++#%#**=--==**--==+**=..: =-
|
||||
*****+======+-+++*%%@@%=---==**--+=+*--:..- =
|
||||
#*****=====+=-=++***#%#-----=**=-+=+*=---:.. %%
|
||||
%****+====+=--=+++.:+*=-------=*-===**=---:..- %%
|
||||
#***+=====------=:.-=----------==+=+**+---...: %%%%#%
|
||||
#**+====:---------=-------------+=+=***=-....: %%##%%##
|
||||
%***====..:---------------------==+=-****:.....+%#%%#%%%%#
|
||||
#**+==*=...---------------:.----+==--=***=....##%#######%%
|
||||
#***+=+*=...--------------:..:--=+=----+***:...#%###%%##%
|
||||
#**+==+*=..:-------------:...:--++------=***.:+##%#%%%#% =
|
||||
#***+==+**...:----------:.....:--+=------==**++##%#%%%%% =-
|
||||
#***#+==+**=.................+*---+=------=#+=##%%##%%%#%=---
|
||||
%#**#%*===+***-.....---...=+.:*#=----------=##*#%####%%%%#=----
|
||||
%#### +===****-...: -+##=#%%+---------+###%%%%%%#%%%%%*-----
|
||||
*===+****-..- %###%%%+------=*######%%%%%%%##%#*------
|
||||
+===+****-.- %##%%%*-----#########%####%#####*-------
|
||||
____ ____ __ __ _ ___ ____ ____ ____ ____ __
|
||||
( _ \( _ \( )( ( \ / __)( __)/ ___)/ ___) ( _ \( )
|
||||
) __/ ) / )( / /( (__ ) _) \___ \\___ \ ) __/ )(
|
||||
(__) (__\_)(__)\_)__) \___)(____)(____/(____/ (__) (__)
|
||||
'@
|
||||
@@ -1,20 +0,0 @@
|
||||
Param(
|
||||
[string]$hosts_file = "subnets.txt",
|
||||
[int]$delay_seconds = 120,
|
||||
[int]$port = 5555,
|
||||
[bool]$ChkDsk = $false
|
||||
)
|
||||
|
||||
# infinitte looppsie
|
||||
$counter = 1
|
||||
while($True) {
|
||||
Clear-Host # this ig iss the new clear/cls
|
||||
|
||||
Write-Host "Scanning $subnet for port $port loop count $counter`n"
|
||||
# only show open ports, disable ping host check, output to stdout in greppable format on specified port for all subnets in hosts file
|
||||
nmap --open -Pn -oG - -p $port -iL "$hosts_file"
|
||||
$counter++
|
||||
|
||||
Write-Host "`nSleeping $delay_seconds Seconds`n"
|
||||
Start-Sleep -Seconds $delay_seconds
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
10.0.0.0/24
|
||||
10.0.2.0/24
|
||||
10.0.1.0/24
|
||||
192.168.56.0/24
|
||||
172.18.208.0/24
|
||||
@@ -1,39 +0,0 @@
|
||||
# usage
|
||||
## sync_media [NUKE]
|
||||
|
||||
# $media_viewer_dir="C:\Users\human\OneDrive\Documents\Git\Media-Viewer"
|
||||
$media_viewer_dir_wsl="/mnt/c/Users/human/OneDrive/Documents/Git/Media-Viewer"
|
||||
|
||||
# select for nuke mode
|
||||
if($args[0] -eq "NUKE") {
|
||||
Write-Host "`nNUKE MODE ACTIVATED`n"
|
||||
$nuke = $True
|
||||
} else {
|
||||
Write-Host "`nNormal Mode Activated`n"
|
||||
$nuke = $False
|
||||
}
|
||||
|
||||
Write-Host "`nSillyfillyy synching media loleen`n"
|
||||
|
||||
# do da synchiedink
|
||||
Write-Host "`n`bPERFORMING THE DILDOSYNC`n`n"
|
||||
# wsl bash $media_viewer_dir_wsl/copy_local_wsl.sh
|
||||
if($nuke) {
|
||||
Write-Host "`nrunning sync with NUKE`n"
|
||||
wsl bash $media_viewer_dir_wsl/dildo_new_full_sync_total.sh NUKE
|
||||
} else {
|
||||
Write-Host "`nNormal sync`n"
|
||||
wsl bash $media_viewer_dir_wsl/dildo_new_full_sync_total.sh
|
||||
}
|
||||
|
||||
# remote esp-idf
|
||||
Write-Host "`nRunning esp-idf-tools update`n"
|
||||
if($nuke) {
|
||||
Write-Host "`nNUKE REBOOT esp-idf-tools `n"
|
||||
ssh pi3 "bash /home/princesspi/esp/esp-idf-tools/esp-idf-tools-cmd.sh nr"
|
||||
} else {
|
||||
Write-Host "`nNormal esp-idf-tools update`n"
|
||||
ssh pi3 "bash /home/princesspi/esp/esp-idf-tools/esp-idf-tools-cmd.sh"
|
||||
}
|
||||
|
||||
Write-Host "`naahm done bein a sillyfilly fro noew`n"
|
||||
@@ -1,10 +0,0 @@
|
||||
$remote_host = "pi3"
|
||||
$remote_dir = "/var/www/html/Media-Viewer"
|
||||
|
||||
echo "LOCAL: pulling"
|
||||
git pull
|
||||
|
||||
echo "LOCAL: status"
|
||||
git status
|
||||
|
||||
ssh $remote_host "echo 'REMOTE: pulling'; git -C $remote_dir pull; echo 'REMOTE: status'; git -C $remote_dir status"
|
||||
Binary file not shown.
@@ -1,7 +0,0 @@
|
||||
# usage:
|
||||
# testtime "some powershell command string"
|
||||
param([string] $cmd)
|
||||
$start=$(get-date -uformat "%s")
|
||||
invoke-expression "$cmd"
|
||||
$end=$(get-date -uformat "%s")
|
||||
echo "`n`ntime: $($end - $start)`n`n"
|
||||
@@ -1,80 +0,0 @@
|
||||
# usage:
|
||||
# `.\wait-on-host.ps1 -hostname <DOMAIN_NAME_OR_IP> -sleep <SECONDS_TO_SLEEP_PER_CYCLE> -pingcount <NUMBER_OF_TIMES_TO_PING_PER_ITERATION> -max <MAX_NUMBER_OF_ITERATIONS> -hold <SECONDS_TO_WAIT_AFTER_FIRST_RESPONSE>`
|
||||
#
|
||||
# defaults:
|
||||
# hostname: cable-wind.local
|
||||
# sleep: 25
|
||||
# pingcount: 1
|
||||
# max: 500
|
||||
# hold: 30
|
||||
# ex. `.\wait-on-host.ps1 -hostname google.com -sleep 10 -pingcount 5`
|
||||
|
||||
param(
|
||||
[string]
|
||||
$hostname = "cable-wind.local",
|
||||
|
||||
[int]
|
||||
$sleep = 25,
|
||||
|
||||
[int]
|
||||
$pingcount = 1,
|
||||
|
||||
[int]
|
||||
$max = 500,
|
||||
|
||||
[bool]
|
||||
$loop = 0, # 1 to loop
|
||||
|
||||
[int]
|
||||
$hold = 30
|
||||
)
|
||||
|
||||
if($hostname -eq 'help') {
|
||||
echo "usage:`n`twait-on-host [help] -hostname <DOMAIN_NAME_OR_IP> -sleep <SECONDS_TO_SLEEP_PER_CYCLE> -pingcount <NUMBER_OF_TIMES_TO_PING_PER_ITERATION> -max <MAX_NUMBER_OF_ITERATIONS> -hold <SECONDS_TO_WAIT_AFTER_FIRST_RESPONSE>`n`twait-on-host help`n`t`tthis help message`n`twait-on-host 8.8.8.8`n`t`twait on 8.8.8.8 with defaults`n`tdefaults:`n`t`thostname: cable-wind.local`n`t`tsleep: 25`n`t`tpingcount: 1`n`t`tmax: 500`n`t`thold: 30`n`tex. wait-on-host -hostname google.com -sleep 10 -pingcount 5`n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$iterations = 0;
|
||||
|
||||
while(1 -eq 1) { # infinite loop
|
||||
echo "`nHost: $hostname" # Iterations: $iterations Count: $pingcount Sleep: $sleep Max: $max`n`tFlushing dns..."
|
||||
echo "`tFlushing DNS"
|
||||
ipconfig /flushdns >NUL 2>&1 # redirects output nowhere
|
||||
if($?) {
|
||||
echo "`t`tDone."
|
||||
} else {
|
||||
echo "`t`tFAILED TO FLUSH DNS! EXITING!"
|
||||
exit
|
||||
}
|
||||
|
||||
echo "`tPinging..."
|
||||
# $pingObj = Test-Connection -Count $pingcount -TargetName "$hostname" # powershell Test-Connection -Ping is default and redundant
|
||||
$pingObj = Test-Connection -Count $pingcount -TargetName "$hostname" 2>&1
|
||||
|
||||
if($pingObj.Status -eq "Success") { # if return status of abopve (ping -n 1...) is True
|
||||
# $pingObj = Test-Connection -Count $pingcount -TargetName "$hostname" # powershell Test-Connection -Ping is default and redundant
|
||||
$ip = $pingObj.Address.IPAddressToString # get the bare ip out
|
||||
|
||||
echo "`t`tSuccess!`n`t`tIP: $ip`n`t`tHost: $hostname`n`t`tURL (host): http://$hostname`n`t`tURL (IP): http://$ip"
|
||||
if($loop) {
|
||||
echo "Sleeping $sleep Seconds..."
|
||||
sleep $sleep # sleepy time
|
||||
} else {
|
||||
echo "`nWaiting $hold Seconds to Make Sure..."
|
||||
sleep $hold
|
||||
echo "`nReady!`n"
|
||||
break
|
||||
}
|
||||
} else {
|
||||
echo "`t`tNOT FOUND YET"
|
||||
echo "`nSleeping $sleep Seconds..."
|
||||
sleep $sleep # sleepy time
|
||||
}
|
||||
|
||||
if($iterations -gt $max) {
|
||||
echo "`nMAX ITERATIONS OF $max REACHED! EXITINTG`n"
|
||||
exit
|
||||
}
|
||||
|
||||
$iterations++
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
if ($args[0]) { $commit_message=($args -join " ") } # if arg0 exists, join all passed args with spaces
|
||||
else { $commit_message="waypoint" } # or default to "waypoint"
|
||||
|
||||
Write-Host "WAYPOINT!`n`tCommit Message: $commit_message`n"
|
||||
# add and commit
|
||||
git add .
|
||||
git commit -m "$commit_message"
|
||||
|
||||
Write-Host "`nDone :`"3"
|
||||
@@ -1,21 +0,0 @@
|
||||
param (
|
||||
[string]$messageContent = "PING!"
|
||||
)
|
||||
|
||||
# get the ping tag
|
||||
# in discord: \@role_name
|
||||
$tag = $(Get-Content -Path "$PSScriptRoot\tag.txt")
|
||||
$messageContent += "`n$tag"
|
||||
|
||||
# get webhook url from .\webhook.txt
|
||||
$webhookUrl = $(Get-Content -Path "$PSScriptRoot\webhook.txt")
|
||||
|
||||
$payload = [PSCustomObject]@{
|
||||
content = $messageContent
|
||||
}
|
||||
|
||||
# Convert the payload to JSON format
|
||||
$jsonPayload = $payload | ConvertTo-Json
|
||||
|
||||
# Send the POST request to the Discord webhook
|
||||
Invoke-RestMethod -Uri $webhookUrl -Method Post -Body $jsonPayload -ContentType "Application/Json"
|
||||
@@ -1,152 +0,0 @@
|
||||
# Usage:
|
||||
# Open PowerShell as Administrator
|
||||
# win+x
|
||||
# alt+a
|
||||
# alt+y
|
||||
# Run:
|
||||
# In admin powershell Terminal:
|
||||
# iwr https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/Windows-Scripts/windows-repair.ps1?nocache=$(Get-Random) -OutFile $env:TEMP\windows-repair-temp.ps1; powershell -nop -ep Bypass -File $env:TEMP\windows-repair-temp.ps1
|
||||
|
||||
# check if hasadmin rights, if notm run script in new terminal, clopsing old
|
||||
## if not, carry on
|
||||
if (-not ([Security.Principal.WindowsIdentity]::GetCurrent().Groups -contains 'S-1-5-32-544')) {
|
||||
# launch tghis script int new window after promopting for admin
|
||||
Start-Process -FilePath 'powershell' -Verb RunAs -ArgumentList "-ExecutionPolicy Bypass -File $PSCommandPath"
|
||||
|
||||
# CLOSE previous terminal with success
|
||||
exit 0
|
||||
} else {
|
||||
Clear-Host # clear window
|
||||
|
||||
# ascii art
|
||||
Write-Host -ForegroundColor Magenta @'
|
||||
.. .....
|
||||
....------..
|
||||
..:--------.. .......
|
||||
..----------.. ....---..
|
||||
...---------=------::....:----:..
|
||||
..-----=+**************=-----:...
|
||||
.----+****************=-----...
|
||||
.--=****************=-----=**+:::--:....
|
||||
.-=#*********##**++=---====++**+-----:.
|
||||
..:==********#=.+@%-==++===++===++*=----...
|
||||
.:=::******%%+-::=++====+==++====+**=--...
|
||||
.:+..+*****--@===-:-%--====-=+====+*#=:..
|
||||
.-=.-****#=.#+===--=+===----======+*+..
|
||||
.:=:+****#@#+=====-**-----*+====++**:.
|
||||
.. .=****=--======-..%-----%+==++***+-..
|
||||
..=++***+-.----======..*-----#+==+***#%#+..
|
||||
.. .:-..---=====--------=-+==+**-@*. ............::::::....
|
||||
..=:..--===+-:-------*%+==*+#%**=. .....:-------------------------:.
|
||||
..............-:..--===+-..:-------+==+==.:... ...:----------------------------::.
|
||||
......:----------::=:...--==+--:.:-------+==+=:.... ....--------------------------:.....
|
||||
..:::----------------=-::.:--===---:.:------=--:.... ...:---------------------------...
|
||||
..:------------------=--:..:--=+=--------::.:+-..... ...------------------------------..
|
||||
...:-----------------:....----==-------:...=%*.......:::--------------------------------:..
|
||||
...--------------:+......---------------:+%%#.----------------------------:.......-----:..
|
||||
.:----===-------:-.. .:--------------*%%%%=--------------========------:.......-------:...
|
||||
..-:.:------------....-.=---------=#%%%%##%------------=-----------------------------------..
|
||||
.:--:....:--------:##*=:.-------=#%%%%%%#%+-----------=-------------------------------------:
|
||||
..:-----------------::*%%#-------=###%%%%##=--------------------------------------:............
|
||||
..:-------------------:.-#%%##+==+%%%%%%#%+------------------------...:::--------------::::::..
|
||||
...:----------------------..-#%#%%%%%%%%*+#%=-------------------------=-:....:----------------:...
|
||||
--------------------------:.-#%%%%%%%%+#@%%%--------------------------=++=-::---------------:...
|
||||
---------------------------...+%%%%%%%#%%%%#---------------------------------------------:....
|
||||
............------.....----:....-#%%%%%%%*=------------------------------::+=---------.......
|
||||
..:-... ....-----.. ....-=-------------------------------------.=*+=.......
|
||||
..---:....:-----:.......:--------------------------:-------------==+=-......
|
||||
.:-------------..........:---------------------------..:-------------==..........
|
||||
..-------------:... ...--------:...----------------....:-----------==-...........
|
||||
..:----==------:..-.... ..--------:...:---------------.....:----------=+-.....
|
||||
..------==+=++==-..+--:. .:--------.....-----------=*%=.. ..----------=+=......
|
||||
....------------........:... ..:--------.....-------+#%%#@%.. ...----------=+=......
|
||||
....---------===:............... .:----=+*#=. ..--+#**+%@@@#%+. ..:-:..=----=*=:.....
|
||||
:............:=::+=:--:=.=-.::=... ..*@*-+%@@@:.....-@@#%@*#@@@#%:.. ..-:..---:-#**+-.........
|
||||
.. ...::::....::-.:.::-.. ..*%:..*@@@*.. ..-%#%@@+%@@@@=.. ...::.=#=..-%*++=:... ...
|
||||
...... .......... ..**...*#=*%:. .-*#@%+#%@@@@+... ..*%@%+...+%+=*+=-...
|
||||
..*#:.-#+..+-. ..-*#**%%*%@@%=.. ..-%@@*:..+@%=:+**+=:..
|
||||
..*@#*%%=..==. .-*%@#%@##@@@#-. ...#@@%*-=%@@#:..-=++=-
|
||||
.:#@*-:++..==. .=#%@%*@@*%*=+*:....:.+@*::+%@@@%=......-*
|
||||
.-%+...=%##%-. .+@*@%*%@##*-:*+..:-==*@=..:#@+:=*:.......
|
||||
.:*#:..:*@@@%:. .-%@*%@#*%*#=..-%-....:+#=-.:#%-.:+-.......
|
||||
.+@#=.-*@@@@*.. ....-%@@@@@@=..+%*.. .-%--=+#%-.:*-. ....
|
||||
.-=++++++++=... .:***+++==::::... .-%#=-*#%#**#-.
|
||||
..............
|
||||
'@
|
||||
# vars
|
||||
$LogDir = "$env:USERPROFILE\Downloads\Repair-Log-$((Get-Date).ToString('yyyy-MM-dd-HHmm'))" # path to new log Dir
|
||||
$MainLog = "$LogDir\main.log" # error log file
|
||||
|
||||
Write-Host "FIXING WINDOWS FULL PRINCESS PI STYLE (THIS WILL TAKE MANY HOURS AND REBOOT MORE THAN ONCE, SLOWLY)`n" -ForegroundColor Magenta
|
||||
|
||||
Write-Output "Creating Log Dir at $LogDir 1/21 at $((Get-Date).ToString('yyyy-MM-dd-HHmm'))"
|
||||
mkdir "$LogDir" > $null 2> $null # create log dir
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm')) Initialize Log File $LogFile 3/21`n`tFollow Log File in Another Terminal With`n`t`t``Get-Content `"$MainLog`" -Wait -Tail 50``"
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))" >> "$MainLog"
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tOpening Log Dir 2/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
explorer.exe "$LogDir"
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tAborting Any Scheduled Shutdowns 4/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
shutdown.exe /a > $null 2>> "$MainLog" # cmd abort scheduled shutdowns
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`t`Creating Log Dir at $LogDir 5/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
New-Item -Path "$LogDir" -ItemType Directory > $null 2>> "$MainLog" # create log dir
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tGenerating and Displaying Comprehensive Stability Report 6/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Start-Process "perfmon.exe" -ArgumentList "/report" -Wait # running report
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tGenerating and Displaying Stability History Report 7/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Start-Process "perfmon.exe" -ArgumentList "/rel" -Wait # historical report
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tClearning DNS Cache 8/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
ipconfig.exe /flushsdns > $null 2>> "$MainLog" # flush dns cache
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tClearing ARP Table 9/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Remove-NetNeighbor -Confirm:$false > $null 2>> "$MainLog" # flush ARP Table
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tClearing ALL Samba Credentials 10/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
net.exe use * /delete /y > $null 2>> "$MainLog" # nuke all samba creds automagically
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tReleasing and Renweing DHCP 11/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
# release and renew dhcp
|
||||
ipconfig.exe /release > $null 2>> "$MainLog"
|
||||
ipconfig.exe /renew > $null 2>> "$MainLog"
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tGetting Control of Windows Update 12/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Install-Module -Name PSWindowsUpdate -Force > $null 2>> "$MainLog"
|
||||
Import-Module PSWindowsUpdate
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tUpdating Windows 13/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Get-WindowsUpdate -AcceptAll -Install -IgnoreReboot > $null 2>> "$MainLog"
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tUpdating Malware Signatures 14/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Update-MpSignature 2>> "$MainLog" # update windows defender malware siggs
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tRunning FULL Windows Defender SCAN 15/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Start-MpScan -ScanType FullScan 2>> "$MainLog" # full windows defender scan
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tRunning DISM Online Image Cleanup 16/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
DISM.exe /Online /Cleanup-Image /RestoreHealth 2>> "$MainLog" # online check for bad files
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tRunning System File Checker 17/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
SFC.exe /scannow 2>> "$MainLog" # older check for bad files
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tScheduling Essential File Check on Next Boot 18/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
SFC.exe /scanonce 2>> "$MainLog" # check essential files on next boot
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tScheduling Offline chkdsk and Repair of C: 19/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Write-Output y | chkdsk.exe /f /r C: > $null 2>> "$MainLog" # cmd checks C drive after reboot to waste time and fix errors (noninteractive via y ffuckery)
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tScheduling Offline Memory Test at Next Boot 20/21" | Tee-Object -FilePath "$MainLog" -Append
|
||||
mdsched.exe /s 2>> "$MainLog" # schedule offline memtest (noninteractive)
|
||||
|
||||
Write-Output "$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`tScheduling Windows Defender Offline Scan 21/21`n`tMAY REBOOT UNEXPECTEDLY`n" | Tee-Object -FilePath "$MainLog" -Append
|
||||
Start-MpWDOScan 2>> "$MainLog" # powershell starts Windows Defender Offline Scan after reboot
|
||||
|
||||
Write-Host "`nRebooting in 5 Minutes MAX Probably Sooner`n" -ForegroundColor Magenta
|
||||
shutdown.exe /r /t (60*5) # shutdown in 5 minutes as failsafe
|
||||
|
||||
Write-Output "`n$((Get-Date).ToString('yyyy-MM-dd-HHmm'))`n`nDONEsiez :3~`n" | Tee-Object -FilePath "$MainLog" -Append
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
# CUSTOM STUFFS
|
||||
# custom scripts https://github.com/PrincessPi3/general-scripts-and-system-ssssssetup
|
||||
PATH="$PATH:/usr/share/customscripts"
|
||||
|
||||
# pico SDK https://github.com/raspberrypi/pico-sdk
|
||||
export PICO_SDK_PATH='/home/kali/pico-sdk'
|
||||
|
||||
# esp-install-custom https://github.com/PrincessPi3/esp-install-custom
|
||||
alias get_idf='. /home/princesspi/esp/esp-idf/export.sh'
|
||||
alias run_esp_reinstall='git -C /home/princesspi/esp/esp-install-custom pull;echo -e "\nOld Version:";tail -1 /home/princesspi/esp/version-data.log;echo -e "\n";bash /home/princesspi/esp/esp-install-custom/reinstall-esp-idf.sh'
|
||||
alias esp_monitor='tail -n 75 -f /home/princesspi/esp/install.log'
|
||||
alias esp_logs='less /home/princesspi/esp/version-data.log;less /home/princesspi/esp/install.log'
|
||||
export ESPIDF_INSTALLDIR="/home/princesspi/esp"
|
||||
|
||||
# pyenv https://github.com/pyenv/pyenv
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init - zsh)"
|
||||
@@ -1,21 +0,0 @@
|
||||
# Errata-Oneliners
|
||||
leave self a warning not to fuck with shit
|
||||
```bash
|
||||
clear && echo -e "\n\n\n\n\n\n\n\n\n\n\n\n\n\e[32mFOOOKN 1TB DUMP IN PROGRESS DONT FUCK WITH ANYTHNG\e[0m\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
|
||||
```
|
||||
watch file growth based on partial names
|
||||
```bash
|
||||
file_tag=Kali-Pi5-Full-Configured-Working-1TB && dump_pid=1717053 && watch -n 300 "echo -e '\n\n\n\e[32mFOOOKN 1TB DUMP IN PROGRESS DONT FUCK WITH ANYTHNG\e[0m\n\n\n' && ls -lAh *${file_tag}* && echo && free -h && echo && uptime && echo && ps -p $dump_pid -o etime"
|
||||
```
|
||||
**submit sample to virustotal**
|
||||
```bash
|
||||
# in ~/.bashrc
|
||||
export VIRUSTOTAL_API_KEY="<mah key>"
|
||||
|
||||
# in cli
|
||||
sha256dsum SAMPLE.zip # get sha256 to look up on the site
|
||||
curl -X POST -H "X-ApiKey: $VIRUSTOTAL_API_KEY" -F "file=@$PWD/SAMPLE.zip" https://www.virustotal.com/api/v3/files
|
||||
# then look up file by sha256 checksum on the site
|
||||
```
|
||||
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
OUTPUT_FILE="/mnt/c/Users/human/Downloads/NORMIEDIRWTFFILEHGISTORYFUCKYOUWINDOWSFUCKYOUTOHELLANDYOUDIEWINDOWS-$(date +%s).txt"
|
||||
TEST_DIR="/mnt/c/Users/human/OneDrive/Documents/Git/general-scripts-and-system-ssssssetup/customscripts"
|
||||
|
||||
echo -n "" > "$OUTPUT_FILE" # inuitialize fiel ig lmao
|
||||
|
||||
# mAWEK dildohe3aderz
|
||||
# INItuialie fiel to empty, add HEASDWERS ABDDDD PRINT TO SCREEEEBN
|
||||
printf "%-85s %-66s %-22s %-22s %-15s %-12s\n" "FILENAME" "SHA-256 CHECKSUM" "DATETIME CREATED" "DATETIME MODIFIED" "SIZE (BYTES)" "SIZE (HUMAN)" | tee "$OUTPUT_FILE"
|
||||
|
||||
for file in $TEST_DIR/*; do # loop da fuck threough fileZ in TEST_DIR
|
||||
if [ -f "$file" ]; then
|
||||
filename=$(basename "$file") # DELET DA PAAATH
|
||||
|
||||
sha256=$(sha256sum "$file" | awk '{print $1}') # CHECJKSUYMNZZZ! VUUUT DELETE DA FIEL ANMEEE
|
||||
|
||||
created=$(stat -c '%w' "$file" 2>/dev/null | cut -d'.' -f1) # ATTENP GET CREATUIION DARTE
|
||||
if [ "$created" = "-" ] || [ -z "$created" ]; then # IF DAT FUCKS UP
|
||||
created="N/A" # ajust fuckinA N/A it lmao
|
||||
fi
|
||||
|
||||
modified=$(stat -c '%y' "$file" | cut -d'.' -f1) # MODIFIED TIMDATESTAMP
|
||||
|
||||
bytes=$(du -b "$file" | awk '{print $1}' | tr -d '\n') # FIEK SIZE IN BYTES BUT NUKE FILEBNANE AND NUJKE NEWLINES
|
||||
|
||||
human_size=$(du -h "$file" | awk '{print $1}' | tr -d '\n') # HUMNAN FIEL SIZE VBT KILL DA FIELNAME AND NUKE NWEKLINEZ
|
||||
|
||||
# output DILDIOFACTZ 2 FIEL AND TERMINALLL
|
||||
printf "%-85s %-66s %-22s %-22s %-15s %-12s\n" "$filename" "$sha256" "$created" "$modified" "$bytes" "$human_size" | tee -a "$OUTPUT_FILE"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Report generated successfully in $OUTPUT_FILE"
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
subnet="10.0.0.0/24"
|
||||
delay=60
|
||||
count=1
|
||||
start_time=$(date +%s)
|
||||
|
||||
while true; do
|
||||
current_time=$(date +%s)
|
||||
elapsed_time=$((current_time - start_time))
|
||||
elapsed_minutes=$((elapsed_time / 60))
|
||||
echo -e "\ndate $(date) elapsed_mins $elapsed_minutes count $count delay $delay subnet $subnet\n"
|
||||
nmap -sV -O -p22 $subnet -oG - | grep -n '22/open/tcp' # fast on port 22 only with ping sweep
|
||||
# nmap -sV -O -Pn -p22 $subnet -oG - | grep -n '22/open/tcp' # pingless search
|
||||
# nmap -sV -O $subnet -oG - | grep -n '22/open/tcp' # lots of ports search
|
||||
# nmap -sV -O -Pn $subnet -oG - | grep -n '22/open/tcp' # all ports search, pingless, slow
|
||||
# sleep $delay
|
||||
count=$((count + 1))
|
||||
done
|
||||
@@ -1,56 +0,0 @@
|
||||
#!/bin/bash
|
||||
checkcode () {
|
||||
if [ -z "$1" ]; then
|
||||
echo "Error! Use Checkcode like checkcode \$?" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
retcode=$1
|
||||
|
||||
if [ ! $retcode -eq 0 ]; then
|
||||
printf " \033[0;31mError Code: $retcode\033[0m\n"
|
||||
else
|
||||
printf " \033[0;32mOK!\033[0m\n"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
echo -e "\n\033[0;31mCRASHING DOCKER AND EVERYTHING IN IT WITH NO SURVIVORS\033[0m\n"
|
||||
|
||||
echo -n "1/9: Stopping Docker... "
|
||||
sudo docker stop $(sudo docker ps -a -q) >/dev/null 2>&1
|
||||
checkcode $?
|
||||
|
||||
echo -n "2/9 Removing Docker Containers..."
|
||||
sudo docker rm -v $(sudo docker ps -a -q) >/dev/null 2>&1
|
||||
checkcode $?
|
||||
|
||||
echo -n "3/9 Removing Docker Images..."
|
||||
sudo docker rmi $(sudo docker images -a -q) >/dev/null 2>&1
|
||||
checkcode $?
|
||||
|
||||
echo -n "4/9 Removing Docker Volumes..."
|
||||
sudo docker volume rm $(sudo docker volume ls -q) >/dev/null 2>&1
|
||||
checkcode $?
|
||||
|
||||
echo -n "5/9 Removing Docker Networks..."
|
||||
sudo docker network rm $(sudo docker network ls -q) >/dev/null 2>&1
|
||||
checkcode $?
|
||||
|
||||
echo -n "6/9 Stopping Docker Daemon..."
|
||||
sudo systemctl stop docker >/dev/null 2>&1
|
||||
checkcode $?
|
||||
|
||||
echo -n "7/9 Disabling Docker Daemon Start At Boot..."
|
||||
sudo systemctl disable docker >/dev/null 2>&1
|
||||
checkcode $?
|
||||
|
||||
echo -n "8/9 Updating Package Repos..."
|
||||
sudo apt update >/dev/null 2>&1
|
||||
checkcode $?
|
||||
|
||||
echo -n "9/9 Removing and Purging docker.io and docker-compose"
|
||||
sudo apt purge docker.io docker-compose -y >/dev/null 2>&1
|
||||
checkcode $?
|
||||
|
||||
echo -e "\n\n\033[0;32mdonesies docker gone and purged\033[0m\n\n"
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
username=princesspi
|
||||
echo "UNFUCK HOMEDIR PERMS"
|
||||
sudo chown -R $username:$username /home/$username 2>/dev/null
|
||||
sudo chmod 755 /home/$username 2>/dev/null
|
||||
sudo chmod 700 /home/$username/.ssh 2>/dev/null
|
||||
sudo chmod 600 /home/$username/.ssh/id_rsa 2>/dev/null
|
||||
sudo chmod 644 /home/$username/.ssh/id_rsa.pub 2>/dev/null
|
||||
sudo chmod 600 /home/$username/.ssh/authorized_keys 2>/dev/null
|
||||
sudo chmod 600 /home/$username/.ssh/config 2>/dev/null
|
||||
sudo chmod 644 /home/$username/.ssh/known_hosts 2>/dev/null
|
||||
sudo chmod 644 /home/$username/.ssh/id_ed25519.pub 2>/dev/null
|
||||
sudo chmod 600 /home/$username/.ssh/id_ed25519 2>/dev/null
|
||||
@@ -1,42 +0,0 @@
|
||||
#!/bin/bash
|
||||
[ "root" != "$USER" ] && exec sudo $0 "$@"
|
||||
#usage sudo sh add_site_apache2.sh 192.168.1.1 example.com
|
||||
#note: the web server will go down for the duration this script is running
|
||||
#set needed A records to domain DNS before beginning
|
||||
#bind IP desired before beginning
|
||||
|
||||
IP=$1
|
||||
DOMAIN=$2
|
||||
|
||||
#stop apache
|
||||
systemctl stop apache2
|
||||
|
||||
#cert get interface
|
||||
certbot certonly
|
||||
|
||||
mkdir /var/www/$DOMAIN
|
||||
echo "<h1>its live</h1>" > /var/www/$DOMAIN/index.html
|
||||
|
||||
#make and place config file
|
||||
cat << EOF | echo > /etc/apache2/sites-available/{$DOMAIN}.config
|
||||
<VirtualHost {$IP}:443>
|
||||
DocumentRoot /var/www/{$DOMAIN}
|
||||
ServerName $DOMAIN
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/letsencrypt/live/{$DOMAIN}/fullchain.pem
|
||||
SSLCertificateKeyFile /etc/letsencrypt/live/{$DOMAIN}/privkey.pem
|
||||
SSLProtocol all -SSLv2 -SSLv3
|
||||
SSLHonorCipherOrder on
|
||||
SSLCipherSuite "HIGH:!aNULL:!MD5:!3DES:!CAMELLIA:!AES128"
|
||||
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost {$IP}:80>
|
||||
ServerName $DOMAIN
|
||||
Redirect permanent / https://{$DOMAIN}/
|
||||
</VirtualHost>
|
||||
EOF
|
||||
|
||||
a2ensite $DOMAIN
|
||||
sh fix_permissions.sh
|
||||
systemctl start apache2
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
# usage:
|
||||
# add_user_ssh.sh "$USER" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP2D+9oYQlTnu1zeVi2gHfTKE7+DDWiu1EibXNwB9g72 [email protected]"
|
||||
|
||||
[ "root" != "$USER" ] && exec sudo $0 "$@"
|
||||
KEY="$2"
|
||||
if [ -d "/home/$1/.ssh" ]; then
|
||||
echo "$KEY" >> "/home/$1/.ssh/authorized_keys"
|
||||
else
|
||||
mkdir "/home/$1/.ssh"
|
||||
echo "$KEY" >> "/home/$1/.ssh/authorized_keys"
|
||||
fi
|
||||
chmod 700 "/home/$1/.ssh"
|
||||
chmod 600 "/home/$1/.ssh/authorized_keys"
|
||||
chown -R $1:$1 "/home/$1/.ssh"
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
polygen /usr/share/customscripts/annoy_the_fuck_out_of_commit_message_nerds.grm | tr -d '\n'
|
||||
@@ -1,17 +0,0 @@
|
||||
I ::= "title: Annoy the Fuck Out of Commit Message Nerds\n"
|
||||
^ "author: Princess Pi <[email protected]>\n"
|
||||
^ "language: english\n"
|
||||
^ "topic: annoyances\n"
|
||||
^ "audience: people who like to fuck off git purists :glimglamgrin:\n"
|
||||
^ "created: 2025-12-20\n"
|
||||
;
|
||||
|
||||
S ::= Adjective Noun Chaos Operation;
|
||||
|
||||
Adjective ::= "Async" | "Blocking" | "Brittle" | "Cached" | "Concurrent" | "Deprecated" | "Distributed" | "Flaky" | "Immutable" | "Leaky" | "Monolithic" | "Mutable" | "Racey" | "Recursive" | "Redundant" | "Sandboxed" | "Stale" | "Thread-Safe" | "Undefined" | "Unoptimized";
|
||||
|
||||
Noun ::= "api" | "build" | "cache" | "compiler" | "container" | "daemon" | "database" | "endpoint" | "function" | "heap" | "kernel" | "microservice" | "mutex" | "pipeline" | "process" | "queue" | "runtime" | "scheduler" | "stack" | "thread";
|
||||
|
||||
Chaos ::= "overflow" | "deadlock" | "panic" | "segfault" | "bottleneck" | "regression" | "refactor" | "hotfix" | "workaround" | "incident";
|
||||
|
||||
Operation ::= "added" | "removed" | "updated" | "fixed" | "corrected" | "tweaked" | "optimized" | "deleted" | "appended" | "concatanated" | "repaired" | "simplified" | "reverted" | "approved" | "rejected";
|
||||
Binary file not shown.
@@ -1,61 +0,0 @@
|
||||
#!/bin/bash
|
||||
# PACKAGES NEEDDED: argon2, cracklib-check, xxd?
|
||||
|
||||
time_cost=3 # time cost (iterations)
|
||||
memory_cost=16 # 2^n KiB ex 16 = 64 MiB (mem usage)
|
||||
paralellization_cost=1 # threads
|
||||
salt_min_length=40
|
||||
|
||||
read -p "Input File to prove authorship of:" file
|
||||
if [ ! -f "$file" ]; then
|
||||
echo "$file not found!"
|
||||
exit 1
|
||||
else
|
||||
echo "File: OK"
|
||||
file=$(realpath $file)
|
||||
fi
|
||||
|
||||
# gather salt
|
||||
read -s -p "Input Secret Salt" salt1
|
||||
read -s -p "Re-Enter Secret Salt" salt2
|
||||
## Sanity check the salt
|
||||
### not empty
|
||||
if [ -z "$salt1" -o -z "$salt2" ]; then
|
||||
echo "Input salts can NOT be blank!"
|
||||
exit 1
|
||||
else
|
||||
echo "Salt Supplied: OK"
|
||||
fi
|
||||
### match
|
||||
if [[ "$salt1" != "$salt2" ]]; then
|
||||
echo "Salts DO NOT MATCH"
|
||||
exit 1
|
||||
else
|
||||
echo "Salts match: OK"
|
||||
fi
|
||||
### length
|
||||
salt_length=${#salt1} # salt len
|
||||
if [[ $salt_length -le $salt_min_length ]]; then
|
||||
echo "Salt MUST be $salt_min_length characters or longer!"
|
||||
exit 1
|
||||
else
|
||||
echo "Salt Length: OK"
|
||||
fi
|
||||
### salt safety and complexity
|
||||
complexity_check=$(echo -n "$salt1" | cracklib-check)
|
||||
if grep -q 'OK' <<< "$complexity_check"; then
|
||||
echo "Complexity: OK"
|
||||
else
|
||||
echo "Salt NOT Complex enough!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
argon2 "$salt1" -id -t $time_cost -m $memory_cost -p $paralellization_cost -e
|
||||
< "$file"
|
||||
|
||||
## cleanup
|
||||
unset $salt1
|
||||
unset $salt2
|
||||
unset $salt_length
|
||||
echo "DONE"
|
||||
exit 0
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
[ "root" != "$USER" ] && exec sudo $0 "$@"
|
||||
LOCK=/var/lock/backups.lock
|
||||
if [ ! -f $LOCK ]; then
|
||||
echo "lock" > $LOCK
|
||||
rsync -rzvvb --backup-dir=_old_ --suffix=$(date+_%F-%T) --update --times -e ssh /home/ <username>@<server>:~/backups/home
|
||||
rm -f $LOCK
|
||||
fi
|
||||
@@ -1,103 +0,0 @@
|
||||
#!/bin/bash
|
||||
# todo:
|
||||
## seperate out values
|
||||
### x compression ratios
|
||||
### x avg cpu and memory load (free and uptime?)
|
||||
### x time to complete
|
||||
### parse apart before and after mem values and display deltas
|
||||
|
||||
log_file="$(date +"%Y-%m-%d-%H%M-%S")_compressor_battle.log" # file safe sortable timestamp
|
||||
# exec 2> >(tee -a "$log_file" >&2) # output all errs to terminal and log file
|
||||
echo > "$log_file" # clean and initialize log file
|
||||
|
||||
# SUM TEXT COLORS
|
||||
RED='\e[31m'
|
||||
GREEN='\e[1;32m'
|
||||
RESET='\033[0m'
|
||||
|
||||
echo -e "\n${GREEN}Battle of the img compressions${RESET}\n"
|
||||
|
||||
# first, delete any outstanding logs or compressed files
|
||||
if [[ "$2" =~ nuke ]]; then
|
||||
echo -e "${GREEN}Deleting old Files because NUKE was specified${RESET}"
|
||||
rm -f *.log *.zip *.xz *.tar *.gz *.7z
|
||||
echo -e "${GREEN}Done!${RESET}"
|
||||
fi
|
||||
|
||||
if [ ! -f "$1" ]; then
|
||||
echo -e "\n\n\n${RED}No image File Specified, exiting${RESET}"
|
||||
exit 1
|
||||
else
|
||||
echo -e "${GREEN}OK!${RESET} $1 is a file and it exists"
|
||||
img_file="$1"
|
||||
fi
|
||||
|
||||
# xz
|
||||
echo -e "\n${GREEN}Starting test with xz${RESET}\n"
|
||||
xz_start=$(date +%s)
|
||||
xz -k -v "$img_file"
|
||||
xz_end=$(date +%s)
|
||||
xz_time=$(($xz_end - $xz_start))
|
||||
xz_img_size=$(du --bytes "$img_file" | awk '{print $1}')
|
||||
xz_compressed_size=$(du --bytes "$img_file.xz" | awk '{print $1}')
|
||||
xz_compression_ratio=$(($xz_compressed_size / $xz_img_size))
|
||||
echo -e "\n\nxz_img_size: $xz_img_size xz_compressed_size: $xz_compressed_size xz_compression_ratio: $xz_compression_ratio seconds: $xz_time start: $xz_start end: $xz_end\n\n"
|
||||
# echo -e "Size of file $img_file is: $(du -h $img_file | awk '{print $1}') or $(du --bytes $img_file | awk '{print $1}') bytes taking $xz_time seconds to complete" | tee -a "$log_file"
|
||||
# echo -e "Size of the compressed file is $(du -h $img_file.xz | awk '{print $1}') or $(du --bytes $img_file.xz | awk '{print $1}') bytes" | tee -a "$log_file"
|
||||
|
||||
# gzip
|
||||
echo -e "\n${GREEN}Starting test with gzip${RESET}"
|
||||
gz_start=$(date +%s)
|
||||
gzip -k -v "$img_file"
|
||||
gz_retcode=$?
|
||||
gz_end=$(date +%s)
|
||||
gz_time=$(($gz_end - $gz_start))
|
||||
gz_img_size=$(du --bytes "$img_file" | awk '{print $1}')
|
||||
gz_compressed_size=$(du --bytes "$img_file.gz" | awk '{print $1}')
|
||||
gz_compression_ratio=$(($gz_img_size / $gz_compressed_size))
|
||||
echo -e "\n\n${GREEN}GZ Finished!\n\tgz_img_size: $gz_img_size\n\tgz_compressed_size: $gz_compressed_size\n\tgz_compression_ratio: $gz_compression_ratio\n\tseconds: $gz_time\n\tstart: $gz_start\n\tend: $gz_end \n\tretcode: $gz_retcode${RESET}\n\n"
|
||||
# echo -e "Size of file $img_file is: $(du -h $img_file | awk '{print $1}') bytes taking $gz_time seconds to complete" | tee -a "$log_file"
|
||||
# echo -e "Size of the compressed file is $(du -h $img_file.gz | awk '{print $1}') or $(du --bytes $img_file.xz | awk '{print $1}') bytes" | tee -a "$log_file"
|
||||
|
||||
# tar
|
||||
echo -e "\n${GREEN}Starting test with tar${RESET}\n"
|
||||
tar_start=$(date +%s)
|
||||
tar -cvf "$img_file.tar" "$img_file"
|
||||
tar_retcode=$?
|
||||
tar_end=$(date +%s)
|
||||
tar_time=$(($tar_end - $tar_start))
|
||||
tar_img_size=$(du --bytes "$img_file" | awk '{print $1}')
|
||||
tar_compressed_size=$(du --bytes "$img_file.tar" | awk '{print $1}')
|
||||
tar_compression_ratio=$(($tar_img_size / $tar_compressed_size))
|
||||
echo -e "\n\n${GREEN}TAR Finished!\n\ttar_img_size: $tar_img_size\n\ttar_compressed_size: $tar_compressed_size\n\ttar_compression_ratio: $tar_compression_ratio\n\tseconds: $tar_time\n\tstart: $tar_start\n\tend: $tar_end \n\tretcode: $tar_retcode${RESET}\n\n"
|
||||
# echo -e "Size of file $img_file is: $(du -h $img_file | awk '{print $1}') or $(du --bytes $img_file | awk '{print $1}') bytes taking $tar_time seconds to complete" | tee -a "$log_file"
|
||||
# echo -e "Size of the compressed file is $(du -h $img_file.tar | awk '{print $1}') or $(du --bytes $img_file.tar | awk '{print $1}') bytes" | tee -a "$log_file"
|
||||
|
||||
# 7z
|
||||
echo -e "\n${GREEN}Starting test with 7z${RESET}"
|
||||
sevenz_start="$(date +%s)"
|
||||
7z a "$img_file.7z" "$img_file"
|
||||
sevenz_end=$(date +%s)
|
||||
sevevnz_time=$(($sevenz_end - $sevenz_start))
|
||||
seven_img_size=$(du --bytes "$img_file" | awk '{print $1}')
|
||||
seven_compressed_size=$(du --bytes "$img_file.7z" | awk '{print $1}')
|
||||
seven_compression_ratio=$(($sevem_img_size / $seven_compressed_size))
|
||||
echo -e "\n\n${GREEN}7ZIP Finished!\n\tseven_img_size: $sevem_img_size\n\tseven_compressed_size: $seven_compressed_size\n\tseven_compression_ratio: $seven_compression_ratio\n\tseconds: $tar_time\n\tstart: $tar_start\n\tend: $tar_end \n\tretcode: $tar_retcode${RESET}\n\n"
|
||||
# echo -e "Size of file $img_file is: $(du -h "$img_file" | awk '{print $1}') or $(du --bytes "$img_file" | awk '{print $1}') bytes taking "$sevenz_time" seconds to complete" | tee -a "$log_file"
|
||||
# echo -e "Size of the compressed file is $(du -h "$img_file.7z" | awk '{print $1}') or $(du --bytes "$img_file.7z" | awk '{print $1}') bytes" | tee -a "$log_file"
|
||||
|
||||
# zip
|
||||
echo -e "\n${GREEN}Starting test with zip${RESET}\n"
|
||||
zip_start=$(date +%s)
|
||||
zip -v "$img_file.zip" "$img_file"
|
||||
zip_retcode=$?
|
||||
zip_end=$(date +%s)
|
||||
zip_time=$(($zip_end - $zip_start))
|
||||
zip_img_size=$(du --bytes "$img_file" | awk '{print $1}')
|
||||
zip_compressed_size=$(du --bytes "$img_file.zip" | awk '{print $1}')
|
||||
zip_compression_ratio=$(($zip_compressed_size / $zip_img_size))
|
||||
echo -e "\n\n${GREEN}ZIP Finished!\n\tzip_img_size: $zip_img_size\n\tzip_compressed_size: $zip_compressed_size\n\tzip_compression_ratio: $zip_compression_ratio\n\tseconds elapssed: $zip_time\n\tstart: $zip_start\n\tend: $zip_end \n\tretcode: $zip_retcode${RESET}\n\n"
|
||||
# echo -e "Size of file $img_file is: $(du -h $img_file | awk '{print $1}') or $(du --bytes $img_file | awk '{print $1}') bytes taking $zip_time seconds to complete" | tee -a "$log_file"
|
||||
# echo -e "Size of the compressed file is $(du -h $img_file.zip | awk '{print $1}') or $(du --bytes $img_file.zip | awk '{print $1}') bytes" | tee -a "$log_file"
|
||||
|
||||
echo -e "\n\n\n${GREEN}DONE :3 nyaa~${RESET}\n\n"
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/bin/bash
|
||||
# usage
|
||||
# binwalk.sh filename [default/opcodes/basicextract/compressionextract/opcodeextract
|
||||
set -e
|
||||
filename="$2"
|
||||
unix_seconds=$(date +%s)
|
||||
dir="binwalk-exracted-$filename-$unix_seconds"
|
||||
log="binwalk-log-$filename-$unix_seconds.txt"
|
||||
|
||||
basic="Bf"
|
||||
basicextract="Bef"
|
||||
compressionextract="BeMXZCf"
|
||||
opcodecompressextract="ABeMXZCf"
|
||||
opcodeextract="ABeCf"
|
||||
opcode="ABf"
|
||||
|
||||
basic_cmd="--signature"
|
||||
basicextract_cmd="--signature --extract --directory=$dir"
|
||||
compressionextract_cmd="--signature --extract --matryoshka --deflate --lzma --directory=$dir"
|
||||
opcodecompressextract_cmd="--opcodes --signature --extract --matryoshka --deflate -lzma --directory=$dir"
|
||||
opcodeextract_cmd="--opcodes --signature --extract --directory=$dir"
|
||||
opcode_cmd="--opcodes --signature"
|
||||
|
||||
usage_string="Usage:\n\tbinwalk.sh <option> <file>\n\t\tb/d/basic/default\n\t\to/op/opcode/opcodes\n\t\tbe/eb/basicextract/extractbasic\n\t\tce/ec/compressionextract/extractcompression\n\t\tope/oce/oec/opcodecompressionextract\n\t\toe/eo/opcodeextract/extractopcode"
|
||||
|
||||
if [ "$1" == "o" -o "$1" == "opcode" -o "$1" == "opcodes" -o "$1" == "op" ]; then
|
||||
tag="$opcode"
|
||||
cmd="$opcode_cmd"
|
||||
elif [ "$1" == "d" -o "$1" == "default" -o "$1" == "b" -o "$1" == "basic" ]; then
|
||||
tag="$basic"
|
||||
cmd="$basic_cmd"
|
||||
elif [ "$1" == "be" -o "$1" == "basicextract" -o "$1" == "eb" -o "$1" == "extractbasic" ]; then
|
||||
tag="$basicextract"
|
||||
cmd="$basicextract_cmd"
|
||||
elif [ "$1" == "ce" -o "$1" == "compressionextract" -o "$1" == "ec" -o "$1" == "extractcompression" ]; then
|
||||
tag="$compressionextract"
|
||||
cmd="$compressionextract_cmd"
|
||||
elif [ "$1" == "oce" -o "$1" == "opcodecompressionextract" -o "$1" == "eoc" -o "$1" == "oec" ]; then
|
||||
tag="$opcodecompressextract"
|
||||
cmd="$opcodecompressextract_cmd"
|
||||
elif [ "$1" == "oe" -o "$1" == "opcodeextract" -o "$1" == "eo" -o "$1" == "extractopcode" ]; then
|
||||
tag="$opcodeextract_cmd"
|
||||
cmd="$opcodeextract_cmd"
|
||||
else
|
||||
echo -e "$usage_string"
|
||||
exit
|
||||
fi
|
||||
|
||||
echo -e $cmd
|
||||
|
||||
if [ -z $2 ]; then
|
||||
echo -e "$usage_string"
|
||||
exit
|
||||
fi
|
||||
|
||||
to_run="binwalk $cmd --log=$log"
|
||||
eval($to_run)
|
||||
@@ -1,69 +0,0 @@
|
||||
#!/bin/bash
|
||||
# set -e # die on any errpr because nmama didnt raise no bitch
|
||||
# even includes error handling and sanity checks plus has help and even did tha retcodes :3
|
||||
|
||||
# happy naesms
|
||||
provided_credential="$1"
|
||||
openbadge_file="$2"
|
||||
|
||||
# halp string
|
||||
halp_str="\nHelp:\n\tAbout:\n\t\tCheckBadge for verifying Openbadges\n\t\tPart of https://github.com/PrincessPi3/general-scripts-and-system-ssssssetup Files\n\tUsage:\n\t\tcheckbadge <string credential (email or phone number)> <string path to openbadge file>\n\t\tExample:\n\t\t\tcheckbadge '[email protected]' mybadgefile.png\n\t Requires:\n\t\t* coreutils (sha256sum)\n\t\t* jq\n\t\t* exiftool"
|
||||
|
||||
# sum silliness so you can get help with retcode 0 with -h, -help, --help, --h, help, h, etc so lnog as the first arg starts with -?-?h (case insensitive) and arg two is empty
|
||||
if [[ "$1" =~ ^[-]{0,2}[hH] ]]; then
|
||||
if [ -z "$2" ]; then
|
||||
echo -e "$halp_str"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# maek sure da args are in place or print help and fail
|
||||
if [ -z "$provided_credential" -o -z "$openbadge_file" ]; then
|
||||
echo -e "\nERROR: must provide the credential and the file path"
|
||||
echo -e "$halp_str"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# does fiel exist dipshit?
|
||||
if [ ! -f "$openbadge_file" ]; then
|
||||
echo -e "\nERROR: $openbadge_file not found"
|
||||
echo -e "$halp_str"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# maek sure its an openbadges fiel
|
||||
exiftool "$openbadge_file" | grep -q Openbadges
|
||||
ret=$?
|
||||
|
||||
if [ $ret -ne 0 ]; then
|
||||
echo -e "\nERROR: File $openbadgefile does not seem to be an Openbadge file or it has had its metadata stripped"
|
||||
echo -e "$halp_str"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# gert da json out of da metadata fo da badger
|
||||
openbadge_json=$(exiftool "$openbadge_file" | grep Openbadges | awk -F ': ' '{print $2}')
|
||||
|
||||
# get da values out of dat json
|
||||
openbadge_url=$(echo $openbadge_json | jq -r '.badge')
|
||||
openbadge_sha256=$(echo $openbadge_json | jq -r '.recipient.identity' | awk -F '$' '{print $2}')
|
||||
openbadge_salt=$(echo $openbadge_json | jq -r '.recipient.salt')
|
||||
openbadge_narrative=$(echo $openbadge_json | jq -r '.narrative')
|
||||
openbadge_name=$(echo $openbadge_json | jq -r '.extensions.recipientProfile.name')
|
||||
|
||||
# generate da checksum from the provided credential and extracted salt
|
||||
# sha256(<string provided credential><string extracted salt>)
|
||||
generated_sha256=$(printf "$provided_credential$openbadge_salt" | sha256sum | awk '{print $1}')
|
||||
|
||||
# outputter
|
||||
echo -e "\nTESTING '$provided_credential' AGAINST OPENBADGE FILE '$openbadge_file'\n\nProvided Credential: $provided_credential\nBadge File: $openbadge_file\n\tBadge URL: $openbadge_url\n\tSalt: $openbadge_salt\n\tNarrative: $openbadge_narrative\n\tSHA256 Checksum: $openbadge_sha256\nGenerated SHA256 Checksum: $generated_sha256\n\tFrom: sha256(<string credential><string salt>)"
|
||||
|
||||
# do dey maaaatch again>???
|
||||
# but this time set retcode show succ or failure
|
||||
if [ "$openbadge_sha256" = "$generated_sha256" ]; then
|
||||
echo -e "\nSUCCESS: VERIFIED MATCH!"
|
||||
exit 0
|
||||
else
|
||||
echo -e "\nFAIL: NO MATCH!"
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,69 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# file paths
|
||||
sha256_file_path=./checksums.sha256
|
||||
md5_file_path=./checksums.md5
|
||||
error_log=./checksums_error.log
|
||||
|
||||
# text colors
|
||||
RED='\e[31m'
|
||||
GREEN='\e[32m'
|
||||
RESET='\e[0m'
|
||||
|
||||
# set these false at the start to be safe
|
||||
checksha256=false
|
||||
checkmd5=false
|
||||
|
||||
# output errors to error log
|
||||
exec 2> >(tee -a "$error_log" >&2)
|
||||
|
||||
# environment checks
|
||||
## check for presence of $sha256_file_path, fail with general error on error
|
||||
if [ ! -f "$sha256_file_path" ]; then
|
||||
echo -e "\n${RED}FAIL!${RESET} File $sha256_file_path Not Found!\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
## check if $sha256_file_path is writable
|
||||
if [ ! -r "$sha256_file_path" ]; then
|
||||
echo -e "\n${RED}FAIL!${RESET} File $sha256_file_path Exists But Not Readable!\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
## check for presence of $md5_file_path, fail with general error on error
|
||||
if [ ! -f "$md5_file_path" ]; then
|
||||
echo -e "\nFAIL! File $md5_file_path Not Found!\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
## check if $md5_file_path is writable
|
||||
if [ ! -r "$md5_file_path" ]; then
|
||||
echo -e "\n${RED}FAIL!${RESET} File $md5_file_path Exists But Not Readable!\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check checksums
|
||||
## check sha256
|
||||
if sha256sum -c "$sha256_file_path" 1>/dev/null; then
|
||||
echo -e "SHA256 Checksums: ${GREEN}OK!${RESET}"
|
||||
checksha256=true
|
||||
else
|
||||
echo -e "\n\nSHA256 Checksums: ${RED}BAD!${RESET}\nDumping SHA256 Checksum Fails:" >&2
|
||||
sha256sum -c "$sha256_file_path" | grep 'FAILED' >&2
|
||||
echo -e "\nSHA256 Checksums: ${RED}BAD!${RESET}\n" >&2
|
||||
fi
|
||||
## check md5
|
||||
if md5sum -c "$md5_file_path" 1>/dev/null; then
|
||||
echo -e "MD5 checksums: ${GREEN}OK!${RESET}"
|
||||
checkmd5=true
|
||||
else
|
||||
echo -e "\n\nFAIL: MD5 Checksums: ${RED}BAD!${RESET}\n\tDumping MD5 Checksum Fails:" >&2
|
||||
md5sum -c "md5_file_path" | grep 'FAILED' >&2
|
||||
echo -e "\nMD5 Checksums: ${RED}BAD!${RESET}\n" >&2
|
||||
fi
|
||||
|
||||
# tally checks
|
||||
if [[ $checksha256 == true && $checkmd5 == true ]]; then
|
||||
echo -e "\nFile Integrity: VERIFIED! All Checksums: ${GREEN}OK!${RESET}\n"
|
||||
exit 0 # exit success
|
||||
else
|
||||
echo -e "\nFile Integrity Check: ${RED}FAILED!${RESET}\n\tSee Above or See $error_log" >&2
|
||||
exit 1 # exit general failure
|
||||
fi
|
||||
@@ -1,40 +0,0 @@
|
||||
#!/bin/bash
|
||||
# file paths
|
||||
sha256_file_path=./checksums.sha256
|
||||
md5_file_path=./checksums.md5
|
||||
error_log=./checksums_error.log
|
||||
|
||||
# text colors
|
||||
RED='\e[31m'
|
||||
YELLOW='\033[33m'
|
||||
GREEN='\e[32m'
|
||||
RESET='\e[0m'
|
||||
|
||||
# output errors to error log
|
||||
exec 2> >(tee -a "$error_log" >&2)
|
||||
|
||||
if [ -f "sha256_file_path" ]; then
|
||||
echo -e "${YELLOW}Warn${RESET}: Existing $sha256_file_path Found, Deleting..."
|
||||
rm -f "sha256_file_path"
|
||||
fi
|
||||
|
||||
if [ -f "$md5_file_path" ]; then
|
||||
echo -e "${YELLOW}Warn${RESET}: Existing $md5_file_path Found, Deleting..."
|
||||
rm -f "$md5_file_path"
|
||||
fi
|
||||
|
||||
if [ -f "$error_log" ]; then
|
||||
echo -e "${YELLOW}Warn${RESET}: Existing $error_log Found, Deleting..."
|
||||
rm -f "$error_log"
|
||||
fi
|
||||
|
||||
# notify user
|
||||
echo "Calculating SHA256 and MD5 Checksums Recursively into $sha256_file_path and $md5_file_path\n\t${YELLOW}This May Take a Long Time!${RESET}"
|
||||
# exclude git
|
||||
if find . -type f ! -path "*/.git/*" ! -path "$error_log" ! -path "$md5_file_path" ! -path "$sha256_file_path" ! -path "$0" ! -path "./check_checksums.sh" -exec bash -c "file_path={} && sha256sum \$file_path 1>> $sha256_file_path && md5sum \$file_path 1>> $md5_file_path" \;; then
|
||||
echo -e "\n${GREEN}SUCCESS!${RESET} Generated SHA256 and MD5 Checksums into $sha256_file_path and $md5_file_path Respectively!\n"
|
||||
exit 0 # explicitly exit success
|
||||
else
|
||||
echo -e "\n${RED}FAIL!${RESET} Failed to Generate SHA256 and MD5 Checksums! Check Error Output or Check Error Log: $error_log\n" >&2
|
||||
exit 1 # explicitly fail
|
||||
fi
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
# set -euo pipefail # we tolerate no failure :pensive: 😔
|
||||
|
||||
# nullglobyyyy so da FUCKIN wildcard STOPS BEING A FUCK
|
||||
shopt -s nullglob
|
||||
|
||||
# add da current dir name, and timedate stamp to it plus sum middleshit idk
|
||||
default_file_name="$(date +%Y-%m-%d-%H%M-%Z)_$(printf '%s\n' ${PWD##*/})_ChecksumsSHA256.sha256"
|
||||
|
||||
existing_sha256_files=(*.sha256)
|
||||
|
||||
# just for spooky :3
|
||||
## sumtin spookie :3
|
||||
|
||||
# if sha256 files exist, handle
|
||||
if [ ${#existing_sha256_files[@]} -gt 0 ]; then
|
||||
# existing sha256 files fond
|
||||
echo "Existing *.sha256 files found in $PWD, Checking the Latest $default_file_name"
|
||||
|
||||
for file in *.sha256; do
|
||||
# on fnding sha256 files in pwd, generate shas56 checks of each one, notify OK! on success, delete the offending sha256 file if fail
|
||||
[ -f "$file" ] && sha256sum -c $file && echo -e "$file Check: \033[0;32mOK!\033[0m\n" || (echo -e "\n$file NO MATCH! Deleting Bad File \033[31mFAIL\033[0m\n\n"; rm -f $file) # 2>/dev/null)
|
||||
done
|
||||
# validate the found checksums
|
||||
sha256sum -c *.sha256 | tee -a "$default_file_name" && echo -e "\nAll Checksums: \033[0;32mOK!\033[0m\n" || echo -e "\nOne or More Checksums Failed to Match: \033[33mWARN ($?)\033[0m\n"
|
||||
else
|
||||
# no sha256 files, run generate
|
||||
echo "NO Existing *.sha256 files found! Generating sha256 checksums recursively"
|
||||
|
||||
# recursive search in current working dir,
|
||||
find "$PWD" -type f -exec bash -c "sha256sum {} | tee -a \"$PWD/$default_file_name\"" \; && echo -e "\nAll Checksums Created: \033[0;32mOK!\033[0m\n\tLog File: $default_file_name\n" || echo -e "\nOne or More Cecksums Failed to Run: \033[31mWARN ($?)\033[0m\n"
|
||||
fi
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
sleep 10
|
||||
curl -L https://github.com/espressif/esp-idf/releases/download/v5.5.1/esp-idf-v5.5.1.zip
|
||||
oniux curl -s https://canhazip.com
|
||||
oniux curl -s https://canhazip.com
|
||||
rm -f /tmp/*.tmp
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
# todo
|
||||
## pull commands from file with title
|
||||
|
||||
commands_to_test=("sudo mount -a" "lsblk" "sha256sum *img")
|
||||
|
||||
for command in "${commands_to_test[@]}"; do
|
||||
memory_avg_bytes_before=$(free --bytes | rg 'Mem:' | awk '{print "Memory Usage (bytes) Before Test\nTotal\tUsed\tFree\tAvailable\n", $2, $3, $4, $6}')
|
||||
load_avg_before=$(cat /proc/loadavg)
|
||||
start=$(date +%s)
|
||||
eval "$command"
|
||||
retcode=$?
|
||||
end=$(date +%s)
|
||||
time=$(($end - $start)) # duration
|
||||
load_avg_after=$(cat /proc/loadavg) # read da load avg, number of processes, and most recent process
|
||||
memory_avg_bytes_after=$(free --bytes | rg 'Mem:' | awk '{print "Memory Usage (bytes) After Test\nTotal\tUsed\tFree\tAvailable\n", $2, $3, $4, $6}')
|
||||
|
||||
echo -e "${GREEN}Completed $command\n\tTime: $time seconds\n\tStart: $start\n\tEnd: $end\n\tLoad Average Initial: $load_avg_before\n\tLoad Average After $load_avg_after\n\tRetcode $retcode${RESET}"
|
||||
echo -e "${GREEN}memory before${RESET}"
|
||||
echo -e "$memory_avg_bytes_before"
|
||||
echo -e "${GREEN}memory after${RESET}"
|
||||
echo -e "$memory_avg_bytes_after"
|
||||
done
|
||||
@@ -1,58 +0,0 @@
|
||||
#!/bin/bash
|
||||
finalDir='/usr/share/customscripts'
|
||||
|
||||
fix_perms() {
|
||||
# fix ownership
|
||||
echo -e "\nChanging ownership of $finalDir to $username:$username recursively"
|
||||
sudo chown -R $username:$username $finalDir
|
||||
|
||||
# fix perms
|
||||
echo -e "\nSetting perms of $finalDir and contents to 775"
|
||||
sudo chmod -R 775 $finalDir
|
||||
}
|
||||
|
||||
# ta get da right usermayhaps
|
||||
if [[ -z $SUDO_USER ]]; then
|
||||
echo "Using User $USER"
|
||||
username="$USER"
|
||||
else
|
||||
echo "Using User $SUDO_USER"
|
||||
username="$SUDO_USER"
|
||||
fi
|
||||
|
||||
echo -e "\nConfigure Discord Webhook Settings"
|
||||
|
||||
if [ -f /tmp/tag.txt ] && [ -f /tmp/webhook.txt ]; then
|
||||
echo -e "\nExisting Webhook and Tag found. Using those values unless you enter new ones.\n"
|
||||
|
||||
existing_webhook=$(cat /tmp/webhook.txt)
|
||||
existing_tag=$(cat /tmp/tag.txt)
|
||||
|
||||
echo -e "Existing Webhook URL: $existing_webhook"
|
||||
echo -e "Existing Tag: $existing_tag\n"
|
||||
|
||||
# move em into place
|
||||
sudo mv /tmp/tag.txt $finalDir/tag.txt
|
||||
sudo mv /tmp/webhook.txt $finalDir/webhook.txt
|
||||
|
||||
# update permissions
|
||||
fix_perms
|
||||
|
||||
exit 0 # exit ok
|
||||
fi
|
||||
|
||||
# get webhook url
|
||||
echo -e "\nEnter Discord Webhook URL"
|
||||
read webhook_url
|
||||
|
||||
# get tag
|
||||
echo -e "\nEnter Tag to Notify"
|
||||
read webhook_tag
|
||||
|
||||
# write da files
|
||||
sudo bash -c "echo '$webhook_url' > $finalDir/webhook.txt"
|
||||
sudo bash -c "echo '$webhook_tag' > $finalDir/tag.txt"
|
||||
|
||||
fix_perms
|
||||
|
||||
echo -e "\n\nDone! Restarting shell..."
|
||||
@@ -1,40 +0,0 @@
|
||||
#!/bin/bash
|
||||
if [ -z "$1" ]; then
|
||||
echo "Showing Wifi Interfaces:"
|
||||
iwconfig
|
||||
echo "Please Enter Wifi Interface:"
|
||||
read interface
|
||||
else
|
||||
interface="$1"
|
||||
fi
|
||||
|
||||
echo "Scanning Wifi Networks"
|
||||
nmcli dev wifi list
|
||||
|
||||
if [ -z "$2" ]; then
|
||||
echo "Please Enter SSID"
|
||||
read ssid
|
||||
else
|
||||
ssid="$2"
|
||||
fi
|
||||
|
||||
if [ -z "$3" ]; then
|
||||
echo "Please Enter Password"
|
||||
read password
|
||||
else
|
||||
password="$2"
|
||||
fi
|
||||
|
||||
echo -e "\n\nConnect to $ssid with password $password on interface $interface \n\n"
|
||||
pause
|
||||
|
||||
echo "Running ./fix-wifi.sh"
|
||||
sudo bash ./fix-wifi.sh $interface
|
||||
|
||||
echo "Rescanning"
|
||||
nmcli dev wifi rescan
|
||||
|
||||
echo "Connecting to $ssid"
|
||||
nmcli device wifi connect $ssid password $password ifname $interface # --rescan yes
|
||||
|
||||
echo -e "\nnyaa mrrp done~ :D\n"
|
||||
@@ -1,55 +0,0 @@
|
||||
#!/bin/bash
|
||||
# set -e
|
||||
|
||||
# date strings
|
||||
start=`date +%s`
|
||||
isodate=`date -I`
|
||||
|
||||
echo -e "\nStarting at `date`!\n"
|
||||
|
||||
lsblk
|
||||
echo -e "\ninput disk full path (like /dev/sdX)"
|
||||
read disk
|
||||
|
||||
echo -e "\ninput tag for image (no spaces or special chars)"
|
||||
read file_tag
|
||||
|
||||
file_string=$isodate-$file_tag
|
||||
out_dir=$PWD
|
||||
out_img=$out_dir/$file_string.img
|
||||
out_xz=$out_dir/$file_string.img.xz
|
||||
info_log=$out_dir/$file_string.txt
|
||||
|
||||
echo -e "\nCOPYAN $disk to $out_img\n"
|
||||
sudo dd if=$disk of=$out_img bs=4M status=progress
|
||||
ret=$?
|
||||
|
||||
ddd=$(($end - `date +%s`))
|
||||
echo -e "\nDONE COPYING IN $ddd SECONDS ($ret)!\n\nGetting size of $out_img!\n"
|
||||
sudo du -h $out_img | tee -a $info_log
|
||||
sudo du -b $out_img | tee -a $info_log
|
||||
ret=$?
|
||||
|
||||
# ddd=$(($end - `date +%s`))
|
||||
# echo -e "\nDONE GETTING SIZE IN $ddd SECONDS ($ret)!\n\n! MAKIN SHA256 CHECKSUM OF $out_img"
|
||||
# sudo sha256sum $out_img | tee -a $info_log
|
||||
# ret=$?
|
||||
|
||||
ddd=$(($end - `date +%s`))
|
||||
echo -e "\nDONE GETTING SIZE IN $ddd SECONDS LOGGED TO $info_log ($ret)!\n\nRUNNOIG PISHRINK from $out_img to $out_xz\n"
|
||||
sudo pishrink -Z -a -v $out_img
|
||||
ret=$?
|
||||
|
||||
ddd=$(($end - `date +%s`))
|
||||
echo -e "\nDONE RUNNING PISHRINK IN $ddd SECONDS ($ret)!\n\nGETTIN SIZE OF $out_xz\n"
|
||||
sudo du -h $out_xz | tee -a $info_log
|
||||
sudo du -b $out_xz | tee -a $info_log
|
||||
ret=$?
|
||||
|
||||
ddd=$(($end - `date +%s`))
|
||||
echo -e "\nDONE GETTING FILE SIZE IN $ddd SECONDS ($ret)!\n\aMAKIN SHA256 CHECKSUM OF $out_xz\n"
|
||||
sha256sum $out_xz | tee -a $info_log
|
||||
|
||||
ddd=$(($end - `date +%s`))
|
||||
echo -e "ALL DONE IN $ddd SECONDS!"
|
||||
echo "Duration $duration seconds" >> $info_log
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/bin/bash
|
||||
#Crowdsec Install and config
|
||||
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash
|
||||
apt -y install crowdsec
|
||||
truncate -s 0 /var/log/crowdsec.log
|
||||
#configure bouncers as needed here https://hub.crowdsec.net/browse/#bouncers
|
||||
apt -y install crowdsec-firewall-bouncer-iptables
|
||||
cscli collections install crowdsecurity/base-http-scenarios
|
||||
cscli bouncers add php-bouncer
|
||||
systemctl reload crowdsec
|
||||
#cscli bouncers add <nginx-bouncer php-bouncer wordpress-bouncer cloudflare-bouncer> #as needed
|
||||
# SAVE API KEY, THEY ARE UNRECOVERABLE
|
||||
#for wordpress: install crowdsec plugin in admin panel
|
||||
# SAVE API KEY FROM INSTALL
|
||||
# add API key
|
||||
# LAPIU URL: http://localhost:8080
|
||||
#for cpanel
|
||||
#cscli scenarios install crowdsecurity/cpanel-bf
|
||||
|
||||
#unban an IP
|
||||
#cscli decisions list
|
||||
#cscli decisions delete --id <id number from list>
|
||||
@@ -1,266 +0,0 @@
|
||||
#!/bin/bash
|
||||
# todo:
|
||||
## packages to add:
|
||||
## x enable start services: xrdp apache2 avahi-service
|
||||
## x run customscripts
|
||||
## make less interactive
|
||||
### visudo
|
||||
### su user
|
||||
## x reboot
|
||||
|
||||
# set safety optinonz
|
||||
set -o errexit # fail on error
|
||||
set -o errtrace # run trace on error
|
||||
set -o pipefail # fail on pipe fail
|
||||
set -o nounset # fail on unset var
|
||||
|
||||
# packages
|
||||
new_packages=(gawk curl wget git gh build-essential scrypt openssl argon2 qbittorrent xfce4 gparted xrdp xz-utils 7zip zip unzip gzip apache2 php php-cli php-bz2 php-crypt-gpg php-curl php-db php-doc php-email-validator cowsay iotop iptraf-ng gh btop htop screen byobu wget thefuck lynx zip unzip 7zip net-tools clamav php restic cifs-utils detox fdupes ffmpeg ripgrep avahi-daemon libnss-mdns xxd libimage-exiftool-perl ffuf wireshark hashcat snap pipx restic firefox)
|
||||
|
||||
# user info
|
||||
new_username="princesspi"
|
||||
groups_username=("tty" "dialout" "plugdev" "sudo" "www-data")
|
||||
home_username="/home/${new_username}"
|
||||
|
||||
# services shit
|
||||
services_to_enable=("ssh" "apache2" "xrdp" "avahi-daemon")
|
||||
services_to_disable=("nginx")
|
||||
|
||||
# save here to use in error_handle function
|
||||
num_of_args="$#"
|
||||
all_args="$@"
|
||||
|
||||
# Define the cleanup function
|
||||
error_handle() {
|
||||
# CRITICAL: Capture the exit status code before ANY other command runs
|
||||
local exit_code=$?
|
||||
local script_path="$(realpath $0)"
|
||||
local hr='===================================================='
|
||||
echo
|
||||
echo $hr
|
||||
echo -e "🚨 \033[0;31m FATAL ERROR DETECTED \033[0m"
|
||||
echo $hr
|
||||
echo "-> Script : $0"
|
||||
echo "-> Num Script Args : $num_of_args"
|
||||
echo "-> Script Args : $all_args"
|
||||
echo "-> Shell : $SHELL"
|
||||
echo "-> Script Path : $script_path"
|
||||
echo "-> Script (full) : $SHELL $script_path $all_args"
|
||||
echo "-> User : $USER"
|
||||
echo "-> Working Directory : $PWD"
|
||||
echo "-> Failed Command : $BASH_COMMAND"
|
||||
echo "-> Line Number : $LINENO"
|
||||
echo "-> Exit Status : $exit_code"
|
||||
echo "-> Seconds Elapsed : $SECONDS"
|
||||
echo "-> Date Failed : $(date)"
|
||||
# Generate a professional, clean stack traceback
|
||||
echo "-> Stack Trace"
|
||||
printf "\t" # to intent da stack trace
|
||||
local frame=0
|
||||
# Loop backwards through the function execution stack array
|
||||
while caller $frame; do
|
||||
printf "\t" # to indenet da stack trace
|
||||
frame=$((frame + 1))
|
||||
done
|
||||
|
||||
# closing niceties
|
||||
echo
|
||||
echo $hr
|
||||
echo
|
||||
|
||||
# exit with last failcode
|
||||
exit "$exit_code"
|
||||
}
|
||||
|
||||
trap error_handle ERR
|
||||
|
||||
# to give pass/fail output from da commmands
|
||||
## usage like checkcode $?
|
||||
checkcode () {
|
||||
if [ -z "$1" ]; then
|
||||
echo -e "\n\e[31mERROR!\033[0m chkcode missing return code paramater\n"
|
||||
exit 1
|
||||
else
|
||||
retcode=$1
|
||||
fi
|
||||
|
||||
if [ $retcode -ne 0 ]; then
|
||||
echo -e "\t\e[31mERROR!\033[0m Response Code: $retcode"
|
||||
else
|
||||
echo -e '\t\e[1;32mOK!\e[0m'
|
||||
fi
|
||||
}
|
||||
|
||||
reload_shell() {
|
||||
echo "reload_shell: START"
|
||||
echo "reload_shell: sourcing to $home_username/.bashrc"
|
||||
source "$home_username/.bashrc"
|
||||
checkcode $?
|
||||
echo "reload_shell: reloading shell"
|
||||
exec "$SHELL"
|
||||
checkcode $?
|
||||
echo "reload_shell: FINISHED"
|
||||
}
|
||||
|
||||
reset_root() {
|
||||
echo "reset_root: START"
|
||||
echo "reset_root: change password"
|
||||
sudo passwd root
|
||||
checkcode $?
|
||||
echo "reset_root: FINISHED"
|
||||
}
|
||||
|
||||
user() {
|
||||
echo "user: START"
|
||||
echo "user: create $new_username"
|
||||
useradd "$new_username"
|
||||
checkcode $?
|
||||
echo "user: adding groups"
|
||||
for group in "${groups_username[@]}"; do
|
||||
echo "user: adding $new_username to group $group"
|
||||
usermod -aG $group $new_username &> /dev/null
|
||||
checkcode $?
|
||||
done
|
||||
echo "user: FINISHED"
|
||||
}
|
||||
|
||||
apt() {
|
||||
echo "apt: START"
|
||||
echo "apt: updating"
|
||||
sudo apt update &> /dev/null
|
||||
checkcode $?
|
||||
echo "apt: running dist-upgrade"
|
||||
sudo apt dist-upgrade -y &> /dev/null
|
||||
checkcode $?
|
||||
echo "apt: install packages"
|
||||
sudo apt install -y "${new_packages[@]}" &> /dev/null
|
||||
checkcode $?
|
||||
sudo snap install urh
|
||||
checkcode $?
|
||||
echo "apt: autoremoving"
|
||||
sudo apt autoremove -y &> /dev/null
|
||||
checkcode $?
|
||||
echo "apt: FINISHED"
|
||||
}
|
||||
|
||||
pyenv() {
|
||||
echo "pyenv: START"
|
||||
echo "pyenv: installin"
|
||||
curl -fsSL https://pyenv.run | bash &> /dev/null
|
||||
checkcode $?
|
||||
echo "pyenv: adding exports to $home_username/.bashrc"
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> "$home_username/.bashrc"
|
||||
checkcode $?
|
||||
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> "$home_username/.bashrc"
|
||||
checkcode $?
|
||||
echo 'eval "$(pyenv init -)"' >> "$home_username/.bashrc"
|
||||
checkcode $?
|
||||
echo "pyenv: sourcing to $home_username/.bashrc"
|
||||
source "$home_username/.bashrc"
|
||||
checkcode $?
|
||||
echo "pyenv: installing latest python3"
|
||||
latest_python=$(pyenv install --list | grep -E '^[[:space:]]*3\.[0-9]+\.[0-9]+$' | tail -1 | tr -d '[:space:]')
|
||||
if [ -z "$latest_python" ]; then
|
||||
echo "pyenv: could not detect latest Python 3 version"
|
||||
exit 1
|
||||
fi
|
||||
pyenv install "$latest_python" &> /dev/null
|
||||
checkcode $?
|
||||
echo "pyenv: setting latest python3 as global"
|
||||
pyenv global "$latest_python" &> /dev/null
|
||||
checkcode $?
|
||||
reload_shell
|
||||
echo "pyenv: FINISHED"
|
||||
}
|
||||
|
||||
blesh() {
|
||||
echo "ble.sh: START"
|
||||
echo "ble.sh: changing directory to /tmp"
|
||||
cd /tmp
|
||||
checkcode $?
|
||||
echo "ble.sh: downloading"
|
||||
git clone --recursive --depth 1 --shallow-submodules --single-branch -b master https://github.com/akinomyoga/ble.sh.git &> /dev/null
|
||||
checkcode $?
|
||||
echo "ble.sh: building and installing"
|
||||
make -C ble.sh install PREFIX=$home_username/.local &> /dev/null
|
||||
checkcode $?
|
||||
echo "ble.sh: setting up $home_username/.bashrc file"
|
||||
echo '# ble.sh' >> $home_username/.bashrc
|
||||
checkcode $?
|
||||
echo 'source -- $home_username/.local/share/blesh/ble.sh' >> $home_username/.bashrc
|
||||
checkcode $?
|
||||
reload_shell
|
||||
echo "ble.sh: FINISHED"
|
||||
}
|
||||
|
||||
wordists() {
|
||||
echo "wordlists: START"
|
||||
echo "wordlists: making $home_username/wordlists dir"
|
||||
mkdir -p $home_username/wordlists &> /dev/null
|
||||
checkcode $?
|
||||
echo "wordlists: downloading seclists to $home_username/wordlists"
|
||||
git clone --single-branch https://github.com/danielmiessler/SecLists.git $home_username/wordlists/SecLists &> /dev/null
|
||||
# todo: finish
|
||||
echo "wordlists: FINISHED"
|
||||
}
|
||||
|
||||
services() {
|
||||
echo "services: START"
|
||||
echo "services: disable"
|
||||
for service in "${services_to_disable[@]}"; do
|
||||
echo "services: disabling $service"
|
||||
sudo systemctl disable "$service"
|
||||
checkcode $?
|
||||
echo "services: stopping $service"
|
||||
sudo systemctl stop "$service"
|
||||
checkcode $?
|
||||
done
|
||||
echo "services: enable"
|
||||
for service in "${services_to_enable[@]}"; do
|
||||
echo "services: enabling $service"
|
||||
sudo systemctl enable "$service" &> /dev/null
|
||||
checkcode $?
|
||||
echo "services: starting $service"
|
||||
sudo systemctl start "$service" &> /dev/null
|
||||
checkcode $?
|
||||
done
|
||||
echo "services: FINISHED"
|
||||
}
|
||||
|
||||
customscripts() {
|
||||
echo "customscripts: START"
|
||||
script="/tmp/install_script.sh"
|
||||
echo "customscripts: downloading general-scripts-and-system-ssssssetup installer"
|
||||
curl -s https://raw.githubusercontent.com/PrincessPi3/general-scripts-and-system-ssssssetup/refs/heads/main/customscripts/install_script.sh > "$script"
|
||||
checkcode $?
|
||||
echo "customscripts: making $script executable"
|
||||
chmod +x "$script"
|
||||
checkcode $?
|
||||
echo "customscripts: running $script"
|
||||
bash -c "$script full"
|
||||
checkcode $?
|
||||
echo "customscripts: running configure_webhook.sh full"
|
||||
bash /usr/share/customscripts/configure_webhook.sh full
|
||||
checkcode $?
|
||||
echo "customscripts: updating user .bashrc"
|
||||
echo 'export PATH="$PATH:/usr/share/customscripts"' >> "$home_username/.bashrc"
|
||||
checkcode $?
|
||||
reload_shell
|
||||
}
|
||||
|
||||
reboot() {
|
||||
echo "reboot: START"
|
||||
echo "reboot: setting to reboot in one minute"
|
||||
sudo shutdown -r +1
|
||||
echo "reboot: FINISHED"
|
||||
}
|
||||
|
||||
# run in order
|
||||
user
|
||||
apt
|
||||
pyenv
|
||||
blesh
|
||||
wordlists
|
||||
services
|
||||
customscripts
|
||||
reboot
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Usage
|
||||
# dirstat <path>
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
path=.
|
||||
else
|
||||
path=$1
|
||||
fi
|
||||
|
||||
echo -e "\nPath: $path"
|
||||
echo "Space used: $(du -h -d 0 $path | awk '{print $1}')"
|
||||
echo "Files: $(find $path -type f -print | wc -l)"
|
||||
echo "Directories: $(find $path -type d -print | wc -l)"
|
||||
uptime
|
||||
@@ -1,13 +0,0 @@
|
||||
gcc -o "donut" "donut.c" -lm
|
||||
|
||||
if [ $? -ne 0 ];
|
||||
echo "fuck da compiling failed fuuuck"
|
||||
else
|
||||
echo "fixing perms"
|
||||
sudo chmod 755 /usr/share/customscripts/donut
|
||||
echo "Fixing ownership"
|
||||
sudo chown princesspi:princesspi
|
||||
echo "Cleaning up"
|
||||
sudo rm -f /usr/share/customscripts/donut
|
||||
echo "done!"
|
||||
fi
|
||||
@@ -1,23 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
int k = 0;double sin()
|
||||
,cos();int main(){float A=
|
||||
0,B=0,i,j,z[1760];char b[
|
||||
1760];printf("\x1b[2J");for(;;
|
||||
){memset(b,32,1760);memset(z,0,7040)
|
||||
;for(j=0;6.28>j;j+=0.07)for(i=0;6.28
|
||||
>i;i+=0.02){float c=sin(i),d=cos(j),e=
|
||||
sin(A),f=sin(j),g=cos(A),h=d+2,D=1/(c*
|
||||
h*e+f*g+5),l=cos (i),m=cos(B),n=s\
|
||||
in(B),t=c*h*g-f* e;int x=40+30*D*
|
||||
(l*h*m-t*n),y= 12+15*D*(l*h*n
|
||||
+t*m),o=x+80*y, N=8*((f*e-c*d*g
|
||||
)*m-c*d*e-f*g-l *d*n);if(22>y&&
|
||||
y>0&&x>0&&80>x&&D>z[o]){z[o]=D;;;b[o]=
|
||||
".,-~:;=!*#$@"[N>0?N:0];}}/*#****!!-*/
|
||||
printf("\x1b[H");for(k=0;1761>k;k++)
|
||||
putchar(k%80?b[k]:10);A+=0.04;B+=
|
||||
0.02;}}/*****####*******!!=;:~
|
||||
~::==!!!**********!!!==::-
|
||||
.,~~;;;========;;;:~-.
|
||||
..,--------,*/
|
||||
@@ -1,63 +0,0 @@
|
||||
#!/bin/bash
|
||||
tmp_links_file="/tmp/links.tmp"
|
||||
tmp_file_download="/tmp/download.tmp"
|
||||
|
||||
nano "$tmp_links_file"
|
||||
read -p "Enter output directory: " outdir
|
||||
|
||||
# manually created arrays for file types and extensions
|
||||
## notes: from twitter downloader mp4 files show as ISO?
|
||||
types_arr=('MPEG' 'ISO' 'JPEG' 'PNG' 'GIF' 'WebM' 'RIFF')
|
||||
exts_arr=('mp4' 'mp4' 'jpg' 'png' 'gif' 'webm' 'webp')
|
||||
|
||||
# create the out dir if not extant
|
||||
if [ ! -d "$outdir" ]; then
|
||||
echo "Output directory does not exist: $outdir Creating"
|
||||
mkdir "$outdir"
|
||||
fi
|
||||
|
||||
# read the input file and loop through it
|
||||
cat "$tmp_links_file" | \
|
||||
while read line; do
|
||||
# get default basename of downloaded file
|
||||
file_basename=$(basename "$line")
|
||||
|
||||
echo "Downloading $line" # to $outdir/$file_basename"
|
||||
|
||||
# download the file to a tmp
|
||||
curl -s -o "$tmp_file_download" "$line"
|
||||
|
||||
# get the file type
|
||||
type=$(file "$tmp_file_download" | awk '{print $2}')
|
||||
|
||||
# md5 hash the file for a deterministic file name
|
||||
namehash=$(md5sum "$tmp_file_download" | awk '{print $1}')
|
||||
|
||||
# map the file type to the corresponding extension
|
||||
count=0
|
||||
# loop through types for patch with file type
|
||||
for item in "${types_arr[@]}"; do
|
||||
if [[ " ${types_arr[@]} " =~ " ${type} " ]]; then
|
||||
# if type matches
|
||||
if [[ "$item" == "$type" ]]; then
|
||||
# rename the downloaded file
|
||||
new_name="$outdir/$namehash.$(echo ${exts_arr[$count]})"
|
||||
echo -e "\tto $new_name"
|
||||
mv "$tmp_file_download" "$new_name"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\nFailed to rename $tmp_file_download to $new_name\n\turl\n\t$line\n\ttype $type\n\tbase name: $file_basename\n"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo -e "\n$file_basename not a supported format: $type $(file $tmp_file_download)!\n\turl: $line\n\ttype: $type\n\tbase name: $file_basename\n\tfile: $(file $tmp_file_download)\n"
|
||||
rm -f "$tmp_file_download"
|
||||
fi
|
||||
|
||||
# increment the count regardless
|
||||
count=$((count + 1))
|
||||
done
|
||||
done
|
||||
|
||||
# cleanup
|
||||
rm -f "$tmp_links_file" >/dev/null 2>&1 # suppress errors or output
|
||||
rm -f "$tmp_file_download" >/dev/null 2>&1 # suppress errors or output
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
links_file_tmp=$(mktemp)
|
||||
nano "$links_file_tmp"
|
||||
cat "$links_file_tmp" | \
|
||||
while read line; do
|
||||
wget -nc "$line" # nc = no clobber, fail if file exists no rename no overwrite
|
||||
done
|
||||
rm -f "$links_file_tmp"
|
||||
@@ -1,40 +0,0 @@
|
||||
#!/bin/bash
|
||||
# todo:
|
||||
# offline option
|
||||
## dd raw .img
|
||||
## enum partitions
|
||||
### file zero fill empty space of good partitions
|
||||
### dd zero fill unformatted space and such
|
||||
### xz compress
|
||||
# online option
|
||||
## enum partitions
|
||||
## attempt to mount all possible
|
||||
## file zero fill them
|
||||
## dd zero fill unformatted space
|
||||
## take offline for xz inline rip
|
||||
|
||||
set -e # fail explicitly on any error
|
||||
|
||||
# todo: interactive, cli options
|
||||
# disk=/dev/sda
|
||||
user=princesspi
|
||||
# outname="test_disk_image_post0_$(date +%Y-%m-%d-%H%M-%Z)"
|
||||
outname="$outname.img.xz"
|
||||
zerofile="/home/$user/0.0"
|
||||
|
||||
echo "zeroing out empty space"
|
||||
sudo if=/dev/zero of="$zerofile" bs=4M status=progress || sudo rf -f "$zerofile"
|
||||
|
||||
# do the disk image dump using inline xz
|
||||
# echo "runnin inline xz on $disk to file $outname"
|
||||
# sudo dd if=$disk status=progress bs=4M | xz -c > "$outname"
|
||||
|
||||
# test xz integrity
|
||||
# echo "testing disk image integrity"
|
||||
# xz -t -v "$outname"
|
||||
|
||||
# make the sha256 file
|
||||
# echo "generating sha256 checksum file"
|
||||
# sha256sum "$outname" | tee "$outname.sha256"
|
||||
|
||||
echo "all donesies :3"
|
||||
@@ -1,193 +0,0 @@
|
||||
#!/bin/bash
|
||||
# todo
|
||||
## x make safe and gay mode optional
|
||||
## dont re-fuck existing sha256 files ig
|
||||
## or ig test and leave as is or append new val and date
|
||||
## x joplin export as pdf
|
||||
## x git (?)
|
||||
## x args normalization
|
||||
# x if args contain FAG (case insensitive) den gay and safe mode enabled
|
||||
# x if args contain NUKE (case insensitive) den nuke all dem sha256 files
|
||||
# x if args contain GIT (case insensitive) den ig do da fuckin asshole git b
|
||||
# x if args contain VALIDATE (case insensitive) then verify sha256 cheksums from pre-calculated files
|
||||
## nosleep start and stop
|
||||
## x clean up/create error.log
|
||||
## test for files missing paired sha256 files, log to error.log
|
||||
## test for mismatches to sha256 files log to error.log
|
||||
## x set error trap to ensure all stderr is tee -a'd to terminal and error.log
|
||||
## fast scan for attributes vs slow scan with sha256
|
||||
## both scans always running, alongside looping restic backups
|
||||
## solve any race conditinos
|
||||
## environment check
|
||||
## sanity checks
|
||||
## duplicate/conflict behavior
|
||||
|
||||
# date shit
|
||||
start_date="$(date)" # date ig
|
||||
|
||||
# sum text colorz
|
||||
RED='\033[0;31m' # anmgry red
|
||||
YELLOW='\033[0;33m' # BOLD yellow :"3
|
||||
GREEN='\033[1;32m' # bold green :3
|
||||
RESET='\033[0m' # reset color
|
||||
|
||||
echo -e "${GREEN}Script Started at $start_date With $SECONDS Seconds Elapsed on Line number: $LINENO${RESET}"
|
||||
|
||||
# get all dem args into one single fuck (space seperated)
|
||||
argz="$@"
|
||||
|
||||
# do you wanna be a safetyfag or be based?
|
||||
shopt -s nocasematch # magic no case match bs
|
||||
set -Eeuo pipefail # fail on any error including pipe fail and use error trap
|
||||
# backup_dir="/mnt/d/Anbernic_Research_Tinkering_Save" # dir to protect
|
||||
backup_dir="/mnt/c/Users/human/Downloads/tint"
|
||||
error_log="${backup_dir}/error.log" # errror log path
|
||||
path_error_log="$error_log" # duplicated cus lazy
|
||||
exec 2> >(tee -a "$path_error_log" >&2) # output any stderror to both screen and error log
|
||||
cd "$backup_dir" # enter dir to work in
|
||||
|
||||
if [ -f $path_error_log ]; then
|
||||
echo -e "${GREEN}Found $path_error_log clearing at $(date) With $SECONDS Elapsed At Line Number $LINENO${RESET}"
|
||||
echo > "$path_error_log" # initialize as empty
|
||||
else
|
||||
echo -e "${GREEN}No $path_error_log fiound, creating at $(date) With $SECONDS Elapsed At Line Number $LINENO${RESET}"
|
||||
touch "$path_error_log" # create and initialize
|
||||
fi
|
||||
|
||||
# on error, fail and dump as much information as possible to terminal, webhook, and error log
|
||||
# trap error_handler ERR
|
||||
error_handler () {
|
||||
infostring="${RED}\n\n\nERROR IN SCRIPT:\n\n\t$SECONDS Seconds Elapsed\n\tDate $(date)\n\tOn Line: $LINENO\n\tUsing command $BASH_COMMAND\n\tReturn Code: $?\n\tError log: $path_error_log\n\tRecorded Args: ${@}${RESET}\n\n"
|
||||
webhook "$infostring" true # dump data to terminal and webhook
|
||||
echo -e >> "$path_error_log" # dump data to error log
|
||||
}
|
||||
|
||||
echo -e "${GREEN}Made it past varr declaratgions and such at $(date) With $SECONDS Elapsed At Line Number $LINENO${RESET}"
|
||||
|
||||
environment_checks () {
|
||||
# tests if backup dir is a directory and available
|
||||
if [ ! -d "$backup_dir" ]; then
|
||||
echo -e "\n\n\n${RED}Supplied backup dir: $backup_dir not present, not available, out of permissions, or is not a directory"
|
||||
|
||||
exit 1
|
||||
else
|
||||
echo -e "${GREEN}OK! Backup Dir GOOD${RESET}"
|
||||
fi
|
||||
|
||||
# tests current location
|
||||
if [[ "$PWD" != "$backup_dir" ]]; then
|
||||
echo -e "\n\n\n${RED}pwd: $PWD does not match specified dir: $backup Dir, FAIL. Exiting.${RESET}\n\n\n" # notify
|
||||
|
||||
exit 1 # exit with error
|
||||
else
|
||||
echo -e "${GREEN}OK! Backup Dir IS Current Location!${RESET}"
|
||||
fi
|
||||
|
||||
# test for error log
|
||||
if [ ! -f "$path_error_log" ]; then
|
||||
echo -e "\n\n\n${RED}error log at path: $path_error_log not present, not available, out of permissions, or is not a directory${RESET}\n\n\n" # notify
|
||||
|
||||
exit 1
|
||||
else
|
||||
echo -e "${GREEN}OK! Error Log GOOD${RESET}"
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}Environment Checks GOOD!${RESET}"
|
||||
}
|
||||
|
||||
# if [[ "$argz" =~ "FAG" ]]; then
|
||||
# echo -e "\n\n\n${RED}OK FAGGOT YOU RAN ARG1 WITH FAG SO NOW YOU GET FUCKFAG SAFE MNODE LIKE THE QUEER U R${RESET}\nOH YE ALL YA GAY LIL ERRORS NOW LOGGIN TO $path_error_log\n\n\n"
|
||||
# # make da error log for further humiliation\
|
||||
# # if error log present, delete it and replace with blank file
|
||||
# if [ -f "$path_error_log" ]; then
|
||||
# rm -f "$path_error_log" # delete
|
||||
# touch "$path_error_log" # make empty file
|
||||
# fi
|
||||
# # notify the user of what a genuine bitch they are
|
||||
# fi
|
||||
|
||||
# makin a trappy to make sure as fuuuck dat no fucky wucky gets dafuq by meeee
|
||||
# trap '\033[0;31m webhook "SHIT SHIT SHIT SHIT DA EXIT TRAP FUCKIN SPRUNG FFUUUCK\n\tLine number: $LINENO\n\tFailing on command $BASH_COMMAND\y\tResponse code: $?\n\tStderr shown on screen and logged to $path_error_log ${RESET}\nArgs returned: $@\n\t\n\n\033[0m' EXIT
|
||||
|
||||
function generate_sha256_checksums () {
|
||||
webhook "${GREEN}startin calculatin all dem gay af sha256 files\n\t$SECONDS seconds elapsed\n\tDate: $(date)${RESET}"
|
||||
|
||||
# use black magic to generatre da sha256 files
|
||||
find "$backup_dir" -type f -name "*.sha256" -prune -o -name ".git" -exec bash -c "for f in \"\$@\"; do; sha256sum \$f | tee -a \$f.sha256; done; _ {} +" \; # aeswrfgv
|
||||
|
||||
### bash -c "for f in \"\$@\"; do if [ -f \"\${f}.sha256\" ]; then continue; fi; sha256sum -c \"\${f}.sha256\" | tee -a \"${path_error_log}\"; done" _ {} + # sum horrifying shitfuck idk
|
||||
|
||||
webhook "${GREEN}finished calculatin all dem gay af sha256 files\n\t$SECONDS seconds elapsed${RESET}"
|
||||
}
|
||||
|
||||
# ig git is unsuited for version controllin fuckhuge fiels ig
|
||||
## so ig i comment it out
|
||||
## sum git shit to maintain archive or sum shit
|
||||
## if arg1 containz GIT then do da gitshit
|
||||
do_git () {
|
||||
# notify the user of this bullshit
|
||||
echo -e "${GREEN}FAggot im doin da fuckin git bullshit even tho is fuckslow${RESET}"
|
||||
webhook "doin sum git"
|
||||
# do da git conditionally if need be init
|
||||
if [ ! -d "${backup_dir}/.git" ]; then # if .git dir not be there, initialize it fag
|
||||
git -C "$backup_dir" init 2>>"$path_error_log" # init git if da shit aint there
|
||||
# git -C "$backup_dir" branch -m master # set branch to main (?)
|
||||
git -C "$backup_dir" add "$backup_dir" 2>>"$path_error_log"
|
||||
git -C "$backup_dir" commit -m "initial auto archive date: $(date +%s)" 2>>"$path_error_log"
|
||||
else
|
||||
git -C "$backup_dir" add "$backup_dir" 2>>"$path_error_log"
|
||||
git -C "$backup_dir" commit -m "auto archive $(date +%s)" 2>>"$path_error_log" # commit wit date
|
||||
# notify finished with fuckgit
|
||||
fi
|
||||
|
||||
webhook "done doin sum git"
|
||||
|
||||
}
|
||||
|
||||
# do da fookin sha256sums first ig
|
||||
# # if arg1 contains NUKE (case insensititve den nuke dem fuckin sha256 fiels)
|
||||
# if [[ "$argz" =~ "NUKE" ]]; then
|
||||
# webhook "startin sha256 clearin\n\t$SECONDS seconds elapsed"
|
||||
# # notify user that they are a fag
|
||||
# echo -e "${RED}FAGGOT MODE ENABLED SO IM NUKIN ALL DEM SHA256 FIELS FUCK U${RESET}"
|
||||
# # nuke da sha256 files finafuckingky
|
||||
# find "$backup_dir" -prune -o -name ".git" -type f -name "*.sha256" -delete # nuke dem fookan fuckfiels
|
||||
# # finished nukan math
|
||||
# webhook "${GREEN}finished clearin sha256 fiels\n\t$SECONDS seconds elapsed${RESET}"
|
||||
#
|
||||
# webhook "Now creating new sha256 sums files"
|
||||
# generate_sha256_checksums
|
||||
# fi
|
||||
|
||||
# check already generated sha256 checksums
|
||||
# if [[ "$argz" =~ "VALIDATE" ]]; then
|
||||
check_generate_checksums () {
|
||||
webhook "Generating new sha256sums files for those that lack one"
|
||||
generate_sha256_checksums
|
||||
|
||||
webhook "\n\nchecking pre-calculated sha256 sums"
|
||||
# find every sha256 file do the checksum
|
||||
find "$backup_dir" -prune -o -name ".git" -type f -iname "*.sha256" -exec bash -c "echo -e \"${GREEN}\nstarting check sha256sums of files\n\tcurrent file: {}\n\t total elpapsed: $SECONDS seconds\n\"; sha256sum -c {} | tee -a \"${path_error_log}\"; echo -e \"ARGS: $@\n\n${RESET}\"" \;
|
||||
}
|
||||
|
||||
restic_backups () {
|
||||
webhook "runnin Anbernic backup restic powershell\n\t$SECONDS seconds elapsed"
|
||||
# may god have mercy on my soul for mixing powershell and bash
|
||||
pwsh.exe -File "D:\Anbernic-Hackin-Archive_restic_backup.ps1" # do da restic backup ps1
|
||||
# finished restic backloops
|
||||
webhook "finished runnin restic Anbernic shit\n\t$SECONDS seconds elapsed"
|
||||
}
|
||||
|
||||
box_force_shutdown () {
|
||||
# shutdown by force of powershell huehhuehue
|
||||
webhook "TIME TO SHUT THE FUCK DOWN WOOOO\n\t$SECONDS Seconds Elapsed\n\tStart Date: $start_date\n\tEnd Date: $(date)" true # true so it pingas mneeee
|
||||
|
||||
# hateful cursed powershell call to shut off box ffs
|
||||
# pwsh.exe -C "Stop-Computer -Force" # i reeally dgaf this is so terribly fuckin cursed
|
||||
}
|
||||
|
||||
environment_checks
|
||||
# do_git
|
||||
check_generate_checksums
|
||||
restic_backups
|
||||
# box_force_shutdown
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
# tmp links file
|
||||
tmpfile="/tmp/links.tmp"
|
||||
|
||||
# get links
|
||||
nano "$tmpfile"
|
||||
|
||||
# download to .
|
||||
cat "$tmpfile" | while read line; do
|
||||
wget "$line"
|
||||
done
|
||||
|
||||
# cleanup
|
||||
rm -f "$tmpfile" 1>/dev/null 2>&1 # suppress errors or output
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
tmp_file="./exts.tmp"
|
||||
exts_study_file="./extension_study.txt"
|
||||
|
||||
echo "" > "$tmp_file"
|
||||
find ./files -type f -exec bash -c "echo \"{}\" | awk -F. '{print \$NF}' | tee -a \"$tmp_file\"" \;
|
||||
cat "$tmp_file" | sort | uniq > "$exts_study_file"
|
||||
rm -f "$tmp_file"
|
||||
|
||||
echo "DONE! Saved to $exts_study_file"
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
if [ -z "$1" -o -z "$2" ]; then
|
||||
echo -e "usage:\n\tfind_bytes <unicode regex> <path> \n\t\tex. find_bytes '[\x{20}]' /path/to/dir\n\tdocs: https://ugrep.com"
|
||||
exit
|
||||
else
|
||||
# ugrep
|
||||
# ugrep docs https://ugrep.com
|
||||
# -W hexdump binary matches, while keeping text matches as text
|
||||
# -z decompress files if need be to scan them
|
||||
# -R recursive
|
||||
# ug -W -z -R <unicode regex> <path>
|
||||
# bytes in sequence '\x{0d}\x{0a}'
|
||||
# mix of bytes sans sequence '[\x{0d}\x{0a}]'
|
||||
# normal regex applies '[\x{0d}\x{0a}]{4,6}'
|
||||
ug -W -z -R $1 $2
|
||||
fi
|
||||
@@ -1,246 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
#initalize globals
|
||||
## prepended space to make final assembly cleaner
|
||||
whitelist_find_str=' \('
|
||||
blacklist_find_str=' -not \('
|
||||
search_dir="$PWD"
|
||||
whitelist=()
|
||||
blacklist=()
|
||||
ending=''
|
||||
action=' -print'
|
||||
|
||||
help_usage () {
|
||||
echo "Usage:"
|
||||
echo -e '\tfind_ext.sh [-w <str whitelisted extentions>] [-b <str blacklisted extensions>] [-[-p] [-c <str path>] [-d <str path>] [-D] [-s] [-h]'
|
||||
echo -e '\t\t-w - Whitelist: Match files with provided extensions'
|
||||
echo -e '\t\t\texample: find_ext.sh -w "txt pdf doc"'
|
||||
echo -e '\t\t-b - Blacklist: Exclude files with provided extensions'
|
||||
}
|
||||
|
||||
# use getopts to parse options
|
||||
## each letter is a flag like -p
|
||||
## letter with : after is is a flag with an arg like -w "txt pdf gif"
|
||||
## first : is for when no flags are added (defaults, error handling)
|
||||
while getopts ":w:b:d:c:Dhps]" opt; do
|
||||
case "$opt" in
|
||||
# directory - path to search in (default $PWD)
|
||||
## find_ext.sh -w "txt jpg" -d /home/princesspi
|
||||
d)
|
||||
search_dir="${OPTARG[@]}"
|
||||
|
||||
if [ ! -d "$search_dir" ]; then
|
||||
echo "Error: Search directory $search_dir not found" >&2
|
||||
help_useage
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
# silent
|
||||
## find_ext -w "txt mp3" -s
|
||||
s)
|
||||
# show error text but silence everything else
|
||||
ending=' 1>/dev/null'
|
||||
;;
|
||||
|
||||
# whitelist - search for files ending in provided extensions
|
||||
## find_ext.sh -w "txt pdf bak" -p
|
||||
w)
|
||||
## break whitelist str into array
|
||||
IFS=' ' read -r -a whitelist <<< "${OPTARG[@]}"
|
||||
|
||||
### start the whitelist group
|
||||
#### whitelist counter so it knows its in the first position (to not add the -o)
|
||||
whitelist_counter=0
|
||||
### loop through array of whitelisted exts
|
||||
for ext in "${whitelist[@]}"; do
|
||||
### only add -o after the first one
|
||||
if [ $whitelist_counter -eq 0 ]; then
|
||||
#### test if array has exactly one item
|
||||
if [ ${#whitelist[@]} -eq 1 ]; then
|
||||
##### Append space because its the only entry
|
||||
whitelist_find_str+=" -iname \"*.${ext}\" "
|
||||
else
|
||||
##### no appended space on first one to make it neat with the -o's
|
||||
whitelist_find_str+=" -iname \"*.${ext}\""
|
||||
fi
|
||||
else
|
||||
whitelist_find_str+=" -o -iname \"*.${ext}\" "
|
||||
fi
|
||||
|
||||
### increment counter
|
||||
whitelist_counter=$(($whitelist_counter + 1));
|
||||
done
|
||||
## finish the whitelist group
|
||||
### appended space to make final assembly cleaner
|
||||
whitelist_find_str+='\) '
|
||||
;;
|
||||
|
||||
# blacklist - exclude provided extensions from search
|
||||
## find_ext.sh -b "txt pdf jpg" -p
|
||||
b)
|
||||
# break blacklist str into array
|
||||
IFS=' ' read -r -a blacklist <<< "${OPTARG[@]}"
|
||||
echo ${#blacklist[@]}
|
||||
# create the blacklist find section text
|
||||
## start the whitelist group
|
||||
## has the -not for blacklisting
|
||||
## whitelist counter so it knows its in the first position (to not add the -o)
|
||||
blacklist_counter=0
|
||||
## loop through array of whitelisted exts
|
||||
for ext in "${blacklist[@]}"; do
|
||||
### test if array has exactly one item
|
||||
if [ ${#blacklist[@]} -eq 1 ]; then
|
||||
#### Append space because its the only entry
|
||||
blacklist_find_str+=" -iname \"*.${ext}\" "
|
||||
else
|
||||
#### no appended space on first one to make it neat with the -o's
|
||||
blacklist_find_str+=" -iname \"*.${ext}\""
|
||||
fi
|
||||
|
||||
### increment counter
|
||||
blacklist_counter=$(($whitelist_counter + 1));
|
||||
done
|
||||
## finish the whitelist group
|
||||
### appended space to make final assembly cleaner
|
||||
blacklist_find_str+=' \) '
|
||||
;;
|
||||
|
||||
# print (default(
|
||||
## find_ext.sh "jpg gif png" -p
|
||||
p)
|
||||
# do nothing here, just do the default print silently
|
||||
# action=' -print'
|
||||
;;
|
||||
|
||||
# delete
|
||||
## find_ext.sh -w "tmp bak" -d
|
||||
D)
|
||||
# verify that user REALLY wants to delete
|
||||
# todo: show list of files before prompting to confirm
|
||||
# send warning as stderr to bypass s
|
||||
echo -e "ARE YOU CERTAIN YOU WISH TO DELETE ALL MATCHING FILES RECURSIVELY IN $search_dir?\n\tPatterns:\n\t\tWhitelist: \"${whitelist[@]}\"\n\t\tBlacklist: \"${blacklist[@]}\"\n\t\tPath: $search_dir" >&2
|
||||
read checkdelete
|
||||
|
||||
# strict case insensitive yes match, no other chars, nothing prepended or appendeed, no doubles, no mispellling
|
||||
regex="^[yY]{1}[eE]{1}[sS]{1}$"
|
||||
if [[ $checkdelete =~ $regex ]]; then
|
||||
echo "WARNING PROCEEDING TO DELETE!"
|
||||
else
|
||||
echo "NOTE: DELETE CANCELLED"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
action+=' -delete'
|
||||
;;
|
||||
|
||||
# copy
|
||||
## find_ext.sh -w "txt" -c /path/somewhere
|
||||
c)
|
||||
action+=" -exec cp \"{}\" \"${OPTARG[@]}\" \\;"
|
||||
;;
|
||||
|
||||
# help
|
||||
## find_ext.sh -h
|
||||
h)
|
||||
help_usage
|
||||
exit 0
|
||||
;;
|
||||
|
||||
# invalid options or flags
|
||||
\?)
|
||||
echo "Error: Invalid Option -$OPTARG" >&2
|
||||
help_usage
|
||||
exit 0;
|
||||
;;
|
||||
|
||||
# arg requiring value not given
|
||||
## like -w without the list of exts
|
||||
:)
|
||||
echo "Error: Option -$OPTARG requires an argument" >&2
|
||||
help_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# assemble the find command
|
||||
## "$PWD" used for dir instead of . to output absolute paths
|
||||
find_str="find \"$search_dir\"${whitelist_find_str}${blacklist_find_str}${action}${ending}";
|
||||
echo $find_str
|
||||
# bash -c "$find_str"
|
||||
|
||||
exit 0
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo -e 'Usage:\n\tfind_ext.sh <str extensions whitelist> <str extensions blacklist>\n\tfind_ext.sh "jpg mp3 png" ["doc pdf svg"]'
|
||||
exit 1
|
||||
else
|
||||
# break whitelist str into array
|
||||
IFS=' ' read -r -a whitelist <<< "$1"
|
||||
|
||||
# create the whitelisted find section text
|
||||
## start the whitelist group
|
||||
## prepended space to make final assembly cleaner
|
||||
whitelist_find_str=' \('
|
||||
## whitelist counter so it knows its in the first position (to not add the -o)
|
||||
whitelist_counter=0
|
||||
## loop through array of whitelisted exts
|
||||
for ext in "${whitelist[@]}"; do
|
||||
### only add -o after the first one
|
||||
if [ $whitelist_counter -eq 0 ]; then
|
||||
#### test if array has exactly one item
|
||||
if [ ${#whitelist[@]} -eq 1 ]; then
|
||||
##### Append space because its the only entry
|
||||
whitelist_find_str+=" -iname \"*.${ext}\" "
|
||||
else
|
||||
##### no appended space on first one to make it neat with the -o's
|
||||
whitelist_find_str+=" -iname \"*.${ext}\""
|
||||
fi
|
||||
else
|
||||
whitelist_find_str+=" -o -iname \"*.${ext}\" "
|
||||
fi
|
||||
|
||||
### increment counter
|
||||
whitelist_counter=$(($whitelist_counter + 1));
|
||||
done
|
||||
## finish the whitelist group
|
||||
### appended space to make final assembly cleaner
|
||||
whitelist_find_str+='\) '
|
||||
fi
|
||||
|
||||
if [ ! -z "$2" ]; then
|
||||
# break blacklist str into array
|
||||
IFS=' ' read -r -a blacklist <<< "$2"
|
||||
|
||||
# create the blacklist find section text
|
||||
## start the whitelist group
|
||||
## has the -not for blacklisting
|
||||
## prepended space to make final assembly cleaner
|
||||
blacklist_find_str=' -not \('
|
||||
## whitelist counter so it knows its in the first position (to not add the -o)
|
||||
blacklist_counter=0
|
||||
## loop through array of whitelisted exts
|
||||
for ext in "${blacklist[@]}"; do
|
||||
### only add -o after the first one
|
||||
if [ $blacklist_counter -eq 0 ]; then
|
||||
#### test if array has exactly one item
|
||||
if [ ${#blacklist[@]} -eq 1 ]; then
|
||||
##### Append space because its the only entry
|
||||
blacklist_find_str+=" -iname \"*.${ext}\" "
|
||||
else
|
||||
##### no appended space on first one to make it neat with the -o's
|
||||
blacklist_find_str+=" -iname \"*.${ext}\""
|
||||
fi
|
||||
else
|
||||
blaclklist_find_str+=" -o -iname \"*.${ext}\" "
|
||||
fi
|
||||
|
||||
### increment counter
|
||||
blacklist_counter=$(($whitelist_counter + 1));
|
||||
done
|
||||
## finish the whitelist group
|
||||
### appended space to make final assembly cleaner
|
||||
blacklist_find_str+='\) '
|
||||
fi
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
[ "root" != "$USER" ] && exec sudo $0 "$@"
|
||||
|
||||
webdir=/var/www
|
||||
www_group=www-data
|
||||
userfriend=princesspi
|
||||
|
||||
find "$webdir" -type d -exec chmod 775 {} \;
|
||||
find "$webdir" -type f -exec chmod 664 {} \;
|
||||
find "$webdir" -type f -iname "*.sh" -exec chmod 775 {} \;
|
||||
chown -R $userfriend:$www_group "$webdir"
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e # bitchass cant be trusted without handholding
|
||||
exec 2>/dev/null # fookin thing gonna be error city bec i cbf so null dem
|
||||
|
||||
echo "Fixan ya fuckin .ssh perms you useless fagat"
|
||||
|
||||
# if ~/.ssh dont exist, maek it
|
||||
if [ ! -d ~/.ssh ]; then
|
||||
echo "bitch u dont even have a fuckin ~/.ssh lemme make dat for you fraggot"
|
||||
mkdir -p ~/.ssh # -p for error control/happydoll
|
||||
fi
|
||||
|
||||
# ~/.ssh dir perms
|
||||
echo "fixin perms on ~/.ssh because you're too dipshitted to do it yourself"
|
||||
chmod 700 ~/.ssh
|
||||
|
||||
# privkey perms
|
||||
echo "now im fixin perms on ya asshole private keys you are an embarassmebt to security"
|
||||
chmod 600 ~/.ssh/id_rsa ~/.ssh/id_ed25519 ~/.ssh/config ~/.ssh/id_edchdsa
|
||||
|
||||
# public and less sensititve fiels perms
|
||||
echo "now im fixin da perms on less sensitive files ig FUCK YOU"
|
||||
chmod 644 ~/.ssh/authorized_keys ~/.ssh/known_hosts ~/.ssh/*.pub
|
||||
|
||||
echo "OK FAGGOT IM FINISHED"
|
||||
echo "NEVER SPEAK OF THIS SHAME, FAGGOT"
|
||||
|
||||
exit 0 # always a friendly exit
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
# usage:
|
||||
## friendlyfriend [int seconds delay]
|
||||
## friendlyfriend 30
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
sleep_seconds=5
|
||||
else
|
||||
sleep_seconds=$1
|
||||
fi
|
||||
|
||||
while (true); do
|
||||
clear
|
||||
ponysay $(polygen /usr/share/polygen/eng/pornsite.grm | awk '{print $3}')
|
||||
sleep $sleep_seconds
|
||||
done
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/bin/bash
|
||||
# packages required: git trufflehog gitsecrets
|
||||
|
||||
github='https://github.com/InfoSecREDD/'
|
||||
|
||||
out_dir="$PWD/redd_repos"
|
||||
mkdir -p "$out_dir"
|
||||
|
||||
repos=("DWipe" "wifipineapplepager-payloads" "ThreatVis" "RadioRef-Export" "REDDs-PCAP-Uploader" "Uptime-Monitor" "Uni-Adblock" "PolyZip" "CVE-Discord-Notify" "shlt-plugins" "DarkGPT-Lite" "RPT-Installer" "YOURLS-Security-Audit-Plugin" "YOURLS-IP-Info" "InfoSecREDD.github.io" "sharkjack-payloads" "ExPW" "DeLookup" "CheckSim" "sb" "REPG-Community-Payloads" "BTSM-Payloads" "Flip-pi" "InvisInk-Encoder" "REPG" "NET-UP" "Adafruit_WebSerial_ESPTool" "BadPS" "omg-payloads" "k" "Flipper" "REDD-Demo" "SecF0EncKey" "SIN-Main" "sj-webui-patch" "MHS35-lcd-64bit-rpi" "verifymd5" "proxmark3" "DHunter" "termux-pm3-helper" "Proxmark3-Amiibo-Emulate" "Termux-Helper-Script" "NFC-Cloner" "Handshake-Transfer" "shark-files" "rtl8812au" "SharkLib" "rtl8812AU_8821AU_linux" "NET-UP-modules" "boot-dev" "RPi-Tweaks" "auto-ssh" "HoppEye" "bashbunny-payloads" "CPUMINER" "bash-no-ip-updater")
|
||||
|
||||
# if [ -d "$out_dir" ]; then
|
||||
# printf "deleting existing $out_dir..."
|
||||
# rm -rf "$out_dir" > /dev/null 2>&1
|
||||
# printf "$?\n"
|
||||
#
|
||||
# printf "remaking $out_dir..."
|
||||
# mkdir -p "$out_dir"
|
||||
# printf "$?\n"
|
||||
# fi
|
||||
#
|
||||
# for repo in "${repos[@]}"; do
|
||||
# printf "cloning $repo into $out_dir/$repo..."
|
||||
# git clone --recursive "$github/$repo" "$out_dir/$repo" > /dev/null 2>&1
|
||||
# printf "$?\n"
|
||||
# done
|
||||
|
||||
for repo in "${repos[@]}"; do
|
||||
cd "$out_dir/$repo"
|
||||
trufflehog git file://. --relative
|
||||
gitleaks detect -v
|
||||
cd -
|
||||
done
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e # die on any error
|
||||
|
||||
# get current directory name without the path
|
||||
reponame=${PWD##*/}
|
||||
|
||||
# init to main branch (github default)
|
||||
git init -b main
|
||||
git add .
|
||||
git commit -m "initial commit via gitinitshit"
|
||||
|
||||
# use github cli to create repo with the dir name
|
||||
gh repo create "$thisdirname" --public --source=. --remote=upstream --push
|
||||
|
||||
# print git link and url
|
||||
git remote -v | sed -n -e 1p | awk '{print "\ngit link:", $2; gsub(".git", "", $2); print "repo url:", $2, "\n"}'
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e # fail on error
|
||||
|
||||
if [ -f './version.txt' ]; then
|
||||
message=$(cat './version.txt')
|
||||
else
|
||||
if [ -z "$1" ]; then
|
||||
message="$(annoy_the_fuck_out_of_commit_message_nerds)"
|
||||
else
|
||||
message="$*"
|
||||
fi
|
||||
fi
|
||||
|
||||
git add .
|
||||
git commit -m "$message"
|
||||
git push
|
||||
@@ -1,72 +0,0 @@
|
||||
#!/bin/bash
|
||||
# sync a local git repo with a remote one over ssh
|
||||
# usage: gitsync <remote_host> <remote_dir>
|
||||
# defaults pi3 and /var/www/html/Media-Viewer
|
||||
|
||||
# handle defaultz
|
||||
handle_args () {
|
||||
if [ -z $1 ]; then
|
||||
remote_host="pi3"
|
||||
else
|
||||
remote_host="$1"
|
||||
fi
|
||||
|
||||
if [ -z $2 ]; then
|
||||
remote_dir="/var/www/html/Media-Viewer"
|
||||
else
|
||||
remote_dir="$2"
|
||||
fi
|
||||
}
|
||||
|
||||
syncstatus () {
|
||||
# view local and remote status before proceeding
|
||||
echo -e "\nLOCAL status\n"
|
||||
git status
|
||||
|
||||
echo -e "\nREMOTE status\n"
|
||||
ssh $remote_host "/bin/bash -c \"git -C $remote_dir status\""
|
||||
}
|
||||
|
||||
# synchronize git repos on local and remote
|
||||
gitsync () {
|
||||
echo "INFO | Starting gitsync"
|
||||
|
||||
# run on remote
|
||||
ssh $remote_host "git -C \"$remote_dir\" pull"
|
||||
echo "REMOTE | Finished git pull on $remote_host:$remote_dir" $?
|
||||
|
||||
ssh $remote_host "git -C \"$remote_dir\" add ."
|
||||
echo "REMOTE | Finished git adding on $remote_host:$remote_dir" $?
|
||||
|
||||
ssh $remote_host "git -C \"$remote_dir\" commit -m \"autosync at $(date +%s)\""
|
||||
echo "REMOTE | Finished git commit on $remote_host:$remote_dir" $?
|
||||
|
||||
ssh $remote_host "git -C \"$remote_dir\" push"
|
||||
echo "REMOTE | Finished git push on $remote_host:$remote_dir" $?
|
||||
|
||||
ssh $remote_host "git -C \"$remote_dir\" status"
|
||||
echo "REMOTE | Finished git status on $remote_host:$remote_dir" $?
|
||||
|
||||
# run on local
|
||||
git pull
|
||||
echo "LOCAL | Finished git pulling" $?
|
||||
|
||||
git add .
|
||||
echo "LOCAL | Finished git adding" $?
|
||||
|
||||
git commit -m "autosync at $(date +%s)"
|
||||
echo "LOCAL | Finished git comitting" $?
|
||||
|
||||
git push
|
||||
echo "LOCAL | Finished git pushing" $?
|
||||
|
||||
git status
|
||||
echo "LOCAL | Finished git status" $?
|
||||
|
||||
echo "INFO | Finished gitsync"
|
||||
}
|
||||
|
||||
handle_args
|
||||
syncstatus
|
||||
gitsync
|
||||
syncstatus
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e # we do noot tolerate failure here
|
||||
|
||||
# aint got no time for no bs
|
||||
if [ -z "$1" ]; then
|
||||
echo -e "ERROR\nUsage: hash_cred_check.sh <email or phone number>"
|
||||
exit 1 # fail with error
|
||||
fi
|
||||
|
||||
# 256 bits of random shit, encoded as base64
|
||||
salt="$(openssl rand -base64 32)"
|
||||
|
||||
# set credential
|
||||
credential="$1"
|
||||
|
||||
# output hex bytes after doi one hell of a argon2id fuckery
|
||||
hash=$(echo -n "$credential" | argon2 "$(base64 -d <<< $salt)" -id -t 8 -m 19 -p 2 -r)
|
||||
|
||||
echo "Hash: $hash"
|
||||
echo "Salt: $salt"
|
||||
echo "Credential: $credential"
|
||||
echo 'Protocol: echo -n "$credential" | argon2 "$(base64 -d <<< $salt)" -id -t 8 -m 19 -p 2 -r'
|
||||
echo
|
||||
echo "Verify with: hash_cred_verify.sh '$credential' '$salt' '$hash'"
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e # mama didnt raise no bitch
|
||||
|
||||
# aint got no time for no bs
|
||||
if [ -z "$1" -o -z "$2" -o -z "$3" ]; then
|
||||
echo -e "ERROR\nUsage: hash_cred_check.sh '<email or phone number>' '<salt>' '<hash>'"
|
||||
exit 1 # fail with error
|
||||
fi
|
||||
|
||||
# set credential
|
||||
credential="$1"
|
||||
#set salt
|
||||
salt="$2"
|
||||
# set hash
|
||||
hash="$3"
|
||||
|
||||
# debug
|
||||
## echo -e "credential $credential"
|
||||
## echo -e "salt $salt"
|
||||
## echo -e "hash $hash"
|
||||
|
||||
# run da fuck
|
||||
hash_check=$(echo -n "$credential" | argon2 "$(base64 -d <<< $salt)" -id -t 8 -m 19 -p 2 -r)
|
||||
|
||||
# debug
|
||||
## echo -e "hash check $hash_check"
|
||||
|
||||
# compare demmm
|
||||
if [[ $hash == $hash_check ]]; then
|
||||
echo -e "\n\e[32mGOOD MATCH! \e[0m\n\t$credential \e[32mVERIFIED\e[0m\n"
|
||||
else
|
||||
echo -e "\n\e[31mBAD MATCH! \e[0m\n\t$credential \e[31mNOT VERIFIED\e[0m\n"
|
||||
fi
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/bin/bash
|
||||
max=65535 # FFFF
|
||||
txtfile="/mnt/e/2025-12-17_hibp_sha1.txt"
|
||||
outdir="/mnt/e/hibp_parsed"
|
||||
|
||||
if [ ! -d "$outdir" ]; then
|
||||
echo "creating $outdir"
|
||||
mkdir "$outdir"
|
||||
else
|
||||
echo "clearing $outdir"
|
||||
rm -f "$outdir/*"
|
||||
fi
|
||||
|
||||
# remove the carriage returns from file
|
||||
# sed -i "s/\x0d//g" "$txtfile"
|
||||
|
||||
for ((i = 0; i <= $max; i++)); do
|
||||
HEX_VAL=$(printf "%04X" $i) # %04X to give padding 0s up to four
|
||||
echo "$HEX_VAL"
|
||||
rg -N "^$HEX_VAL" "$txtfile" >> "$outdir/$HEX_VAL.txt"
|
||||
echo $?
|
||||
done
|
||||
@@ -1,49 +0,0 @@
|
||||
#!/bin/bash
|
||||
# from https://askubuntu.com/questions/3299/how-to-run-cron-job-when-network-is-up
|
||||
# usage in root cron
|
||||
## @reboot bash /usr/share/customscripts/ifnet "/usr/share/customscripts/webhook bootup"
|
||||
|
||||
# Configurable values
|
||||
## How many times we should check if we're online - this prevents infinite looping
|
||||
MAX_CHECKS=10
|
||||
## Seconds to sleep per loop
|
||||
SLEEP_SECONDS=10
|
||||
## error log
|
||||
ERROR_LOG="/var/log/cron.error.log"
|
||||
## any high availability host
|
||||
HA_HOST="www.cloudflare.com"
|
||||
|
||||
# do da checcc
|
||||
check_online () {
|
||||
# check if HA_HOST is reachable, echo 1 if online 0 if offline
|
||||
netcat -z -w 5 $HA_HOST 80 2>/dev/null && echo 1 || echo 0
|
||||
}
|
||||
|
||||
# initial values
|
||||
## Initial starting value for checks
|
||||
CHECKS=1
|
||||
## Initial check to see if we are online
|
||||
IS_ONLINE=$(check_online)
|
||||
|
||||
# Loop while we're not online.
|
||||
while [[ $IS_ONLINE -eq 0 ]]; do
|
||||
echo "$HA_HOST unreachable, loop $CHECKS/$MAX_CHECKS every $SLEEP_SECONDS seconds to run command \"$1\"" # only shows on manual run
|
||||
|
||||
sleep $SLEEP_SECONDS # eepies
|
||||
|
||||
IS_ONLINE=$(check_online) # recheck and update IS_ONLINE
|
||||
|
||||
CHECKS=$(($CHECKS + 1))
|
||||
if [ $CHECKS -gt $MAX_CHECKS ]; then # if checks is over max, break loop
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# only reach this point after being checked in loop, check for 0 again for failure mode
|
||||
if [[ $IS_ONLINE -eq 0 ]]; then
|
||||
# We never were able to get online. Kill script.
|
||||
sudo bash -c "echo \"$(date) | Failed to connect to $HA_HOST after $MAX_CHECKS attempts of $SLEEP_SECONDS seconds\" | tee -a $ERROR_LOG"
|
||||
exit
|
||||
fi
|
||||
|
||||
sudo bash $1 2>> $ERROR_LOG # execute the bash script and log errors to the error log
|
||||
@@ -1,132 +0,0 @@
|
||||
#!/bin/bash
|
||||
# todo:
|
||||
## x environment checks for webhook, xz-tools, and pishrink
|
||||
### install if not found
|
||||
## sanity checks in cleanup error trap to make sure nothing is wrongly deleted
|
||||
## x ERR/TERMINATE traps
|
||||
### x NO cleanup trap on EXIT
|
||||
## x finish the pi query
|
||||
## x add filename query
|
||||
|
||||
set -euo pipefail # fail on fuckups to iterate fasterrr :pope: strict fuk u mode :3
|
||||
|
||||
timestamp="$(date +%Y-%m-%d-%H%M-%Z)"
|
||||
# disk=""
|
||||
# log="${timestamp}_img_dump_testin.log"
|
||||
# img_name="${timestamp}_Kali-Pi5-1TB-Working.img"
|
||||
|
||||
check_command() {
|
||||
if ! command -v "$1" >/dev/null 2>&1; then
|
||||
# output as error to stderr, and append to log only if defined
|
||||
echo "Required command '$1' not found. Install it and retry." >&2
|
||||
if [ -n "${log:-}" ]; then
|
||||
echo "Required command '$1' not found. Install it and retry." >>"$log"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# check da needed cmds~
|
||||
for cmd in webhook xz pishrink sha256sum sudo lsblk dd; do
|
||||
check_command "$cmd"
|
||||
done
|
||||
|
||||
# trap function cleanup
|
||||
cleanup () {
|
||||
webhook "$0 errored! Cleaning up! seconds: $SECONDS line: $LINENO command: $BASH_COMMAND" true
|
||||
# supress errors if they not there
|
||||
# to save me from testing each one or writing a fun :poe:
|
||||
for file in "$img_name" "$img_name.sha256" "$img_name.xz" "$img_name.xz.sha256" "$log"; do
|
||||
if [ -f "$file" ]; then
|
||||
echo "Deleting $file"
|
||||
sudo rm -f "$file" 2>/dev/null
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# cleanup any errant files on error/termination
|
||||
## disable dis shit fo now
|
||||
# trap cleanup ERR
|
||||
# trap cleanup SIGINT
|
||||
# trap cleanup SIGTERM
|
||||
|
||||
echo -e "\n\n\nSTARTING DUMP OPS\n\n\n"
|
||||
|
||||
# get disk
|
||||
lsblk
|
||||
read -p "Enter Disk Name (ex. sda, sdb no /dev or anything else) " disk_choice
|
||||
if [ -z "${disk_choice:-}" ]; then
|
||||
echo "ERROR: No disk entered." >&2
|
||||
exit 1
|
||||
fi
|
||||
disk="/dev/$disk_choice"
|
||||
if [ ! -e "$disk" ]; then
|
||||
echo "ERROR: $disk is not a device." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
read -p "For Raspberry Pi? y\n default y" picheck
|
||||
# set default to 'y' when empty
|
||||
picheck=${picheck:-y}
|
||||
|
||||
# for when ask for tag
|
||||
read -p "Input File Tag" filetag
|
||||
# sanity check it
|
||||
if [ -z "$filetag" ]; then
|
||||
echo "ERROR! File Tag is Empty!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log="${timestamp}_${filetag}.log"
|
||||
echo > "$log" # initialize to empty
|
||||
img_name="${timestamp}_${filetag}.img"
|
||||
clear
|
||||
|
||||
# logging optinos to log file
|
||||
webhook "Selections! filetag: $filetag disk: $disk picheck: $picheck log: $log img_name: $img_name (Script Has Run $SECONDS Seconds Date $(date))" | tee -a "$log"
|
||||
|
||||
webhook "runnan raw dd img on $disk at to $img_name using 4M bs size (Script Has Run $SECONDS Seconds Date $(date))"
|
||||
sudo dd if="$disk" of="$img_name" status=progress bs=4M 2>&1 | tee -a "$log"
|
||||
|
||||
webhook "Changing perms abd ownership on $img_name (Script has run $SECONDS seconds date $(date))"
|
||||
sudo chown princesspi:princesspi "$img_name"
|
||||
sudo chmod 660 "$img_name"
|
||||
|
||||
# fuckin nope rn
|
||||
# webhook "generating sha256 checksum of $img_name (from $disk) to $img_name.sha256 (Script Has Run $SECONDS Seconds Date $(date))"
|
||||
# sha256sum "$img_name" | tee -a "$img_name.sha256"
|
||||
|
||||
if [[ "$picheck" =~ [nN] ]]; then
|
||||
webhook "Doing non-pi xz compression on $img_name into $img_name.xz (Script Has Run $SECONDS Seconds Date $(date))"
|
||||
xz -v -k "$img_name" | tee -a "$log" # keeping for now so fiddle wit later
|
||||
else
|
||||
# pishrink
|
||||
## -v verbose
|
||||
## -r use advanced filesystem repair option if the normal one fails
|
||||
## -Z xz compression
|
||||
## -a compress using multiple cores
|
||||
## -n disable update check
|
||||
## disavble upgrade check
|
||||
webhook "Doing pi compress using pishrink from $img_name ($disk) to $img_name.xz (Script Has Run $SECONDS Seconds Date $(date))"
|
||||
sudo pishrink -v -r -Z -a -n "$img_name" | tee -a "$log"
|
||||
fi
|
||||
|
||||
# fuck yourself
|
||||
# webhook "testing xz integrity: $img_name.xz (Script Has Run $SECONDS Seconds Date $(date))"
|
||||
# xz -t -v "$img_name.xz" | tee -a "$log"
|
||||
# webhook "xz integrity response code: $?"
|
||||
|
||||
msg="Generating sha256 checksums of $img_name.xz to $img_name.xz.sha256"
|
||||
webhook "$msg"
|
||||
echo "$msg" >>"$log"
|
||||
webhook "testing xz integrity: $img_name.xz (Script Has Run $SECONDS Seconds Date $(date))"
|
||||
sha256sum "$img_name.xz" > "$img_name.xz.sha256"
|
||||
|
||||
# do not fuckin deletee this shit till it works right
|
||||
# if [ -f "$img_name" ]; then
|
||||
# webhook "testing xz integrity: $img_name.xz (Script Has Run $SECONDS Seconds Date $(date))"
|
||||
# webhook "$img_name still there! Deleting by force!"
|
||||
# sudo rm -f "$img_name"
|
||||
# fi
|
||||
|
||||
webhook "\n\n\nFUCKING FINAALLY ITS OVER\n\n\n\t$SECONDS Seconds Elapsed\n\tDateTime Started: $timestamp DateTime Finished: $(date +%Y-%m-%d-%H%M-%Z)"
|
||||
Loaded 100 of 151 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user