Skip to content

Instantly share code, notes, and snippets.

View flatlinebb's full-sized avatar
🏠
Working from home

flatlinebb

🏠
Working from home
View GitHub Profile
@flatlinebb
flatlinebb / RemoveWebroot.ps1
Created January 9, 2023 18:00 — forked from mark05e/RemoveWebroot.ps1
PowerShell script to forcefully remove Webroot SecureAnywhere. It is recommended to run the script twice, with a reboot after the first run.
# Removes Webroot SecureAnywhere by force
# Run the script once, reboot, then run again
# Webroot SecureAnywhere registry keys
$RegKeys = @(
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\WRUNINST",
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\WRUNINST",
"HKLM:\SOFTWARE\WOW6432Node\WRData",
"HKLM:\SOFTWARE\WOW6432Node\WRCore",
"HKLM:\SOFTWARE\WOW6432Node\WRMIDData",
All the various ways to obtain the WAN IP of a Windows or Linux computer:
curl ifconfig.me
(curl ifconfig.me).Content
wget -qO- http://ipecho.net/plain | xargs echo
host myip.opendns.com resolver1.opendns.com
dig +short myip.opendns.com @resolver1.opendns.com.
dig +short txt ch whoami.cloudflare @1.0.0.1
nslookup myip.opendns.com. resolver1.opendns.com
(Invoke-WebRequest -uri "http://ifconfig.me/ip").Content
@flatlinebb
flatlinebb / psftp automate sftp file transfers
Last active March 17, 2022 16:50 — forked from countnazgul/psftp_automate_sftp_server.bat
Using psftp to automate tasks from batch file to sftp server
psftp username@sftp.server.com -pw password -noagent -4 -batch -be -b commands.txt > log_file_%date:~10,4%-%date:~7,2%-%date:~4,2%-%time:~0,2%%time:~3,2%%time:~6,2%.txt 2>&1
# log_file_%date:~10,4%-%date:~7,2%-%date:~4,2%-%time:~0,2%%time:~3,2%%time:~6,2%.txt = log file with a timestamp
# -pw = password
# -4 = use IPv4
# -batch = disable all interactive prompts
# -be = don't stop batchfile processing if errors
# -b filename = use specified batchfile
# -noagent = disable use of Pageant
# -bc = output batchfile commands
@flatlinebb
flatlinebb / rename-to-folder.sh
Created October 29, 2020 15:48
Rename files to the folder name. Move all files from subfolders to root. Remove empty folders.
# To verify first, just echo instead of move:
for f in */* ; do fp=$(dirname "$f"); ext="${f##*.}" ; echo "$f" "$fp"/"$fp"."$ext" ; done
# Rename for realz:
for f in */* ; do fp=$(dirname "$f"); ext="${f##*.}" ; mv "$f" "$fp"/"$fp"."$ext" ; done
# Move all files to root:
mv *.mkv */*.mkv .
# Delete all empty folders in current directory:
@flatlinebb
flatlinebb / .bashrc
Last active March 15, 2024 01:03
bash.rc login info
# Display some useful info at login
echo
# Display your IP hostname & IP addresses
#echo
echo " -------------------------------------------------------------------"
echo " Hostname: `hostname`"
#echo " Your IPv4 Address: `ifconfig | grep 'inet addr:' | grep -v 127.0.0.1 | grep -v 10.32. | grep -v 192.168. | cut -d: -f2 | cut -d' ' -f1`"
echo " Your IPv4 Address: `ip a | grep eth0 | grep inet | cut -d' ' -f8`"
echo " Your IPv6 Address: `ip a | grep inet6 | grep global | cut -d' ' -f6`"
echo
@flatlinebb
flatlinebb / letsplay.txt
Created March 13, 2020 01:56
Useful Let's Play links, videos, and articles
My Channel: Don't Sleep, Game On!
https://www.youtube.com/channel/UC_0LXPKmBlSeHVkAPs-D3kA/
Free Video Editing Software list:
https://www.oberlo.com/blog/best-free-video-editing-software
OBS Studio 110 - MIXER MASTER - How to use OBS Mixer for Multiple Audio Tracks & Balanced Audio, by EposVox:
https://www.youtube.com/watch?v=nd739DyqSV4
OBS Studio - Advanced Mic Settings (Noise Removal, Compressor, Noise Gate), by Gaming Careers:
@flatlinebb
flatlinebb / extract-audio.bat
Last active May 26, 2024 08:26
How to extract audio from video with ffmpeg, into separate files
REM This script will check all MP4 files in the current folder
REM and process them to extract audio into separate files (M4A).
REM The audio files use the same file name as the original video file, with a number, and the M4A extension
REM This is a batch file, to be run on Windows, in Command Line.
REM For Linux, see the "extract-audio.sh" gist below
REM In this example, there are 2 audio tracks, which get split out to 2 separate audio files.
REM The original video file remains unchanged.
REM If you want have a video file with more than 2 audio tracks,
REM just add more "-map 0:a:0 -c copy "%~na audio track 1.m4a"" sections:
REM -map 0:a:0 -c copy "%~na audio track 1.m4a"
@flatlinebb
flatlinebb / switch-port-test.bat
Last active January 28, 2020 23:30
For testing switch ports
@ECHO OFF
:top
ping 8.8.8.8
ECHO.
ECHO File start %time%
ECHO.
:: wget -O - "http://ipv4.download.thinkbroadband.com/100MB.zip"
:: wget -O - "http://ipv4.download.thinkbroadband.com/50MB.zip"
:: wget -O - "http://ipv4.download.thinkbroadband.com/20MB.zip"
:: wget -O - "http://speedtest-ca.turnkeyinternet.net/100mb.bin"
@flatlinebb
flatlinebb / sorter.sh
Created December 23, 2019 01:44
File extension sorter
#!/bin/bash
set -e
set -u
set -o pipefail
start=$SECONDS
exts=$(ls -dp *.*| grep -v / | sed 's/^.*\.//' | sort -u) # not folders
ignore=""
@flatlinebb
flatlinebb / nmap_TEMPLATE.sh
Created December 10, 2019 19:25
NMAP scan script for repeatable scans of the same target. Can target hosts or range of hosts
#!/bin/bash
# This script allows you to perform an nmap scan against targets listed in a TXT file.
# Target can be a single IP, a hostname, or a network range (i.e. 192.168.2.0/24; 10.1.2.10-25)
# Nmap will output in XML file, which then will be converted to HTML for web viewing.
# The file will be copied to the web server folder when it can be viewed in a browser.
# It may be publically viewable, so choose wisely!
# Scan can be run on a schedule, it will save old scan copies
# Optionally, use mailx or sendmail or whatever you want to email yourself when the scan is done
# Exit script on error
set -ex