Skip to content

Instantly share code, notes, and snippets.

View aptitudepi's full-sized avatar
:octocat:

Devkumar Banerjee aptitudepi

:octocat:
View GitHub Profile
#!/usr/bin/ruby
first_line = true
while line = STDIN.gets
line.chomp!
if line =~ /^>/
puts unless first_line
print line[1..-1]
@aptitudepi
aptitudepi / diseaseprediction.ipynb
Created July 16, 2021 15:21
DiseasePrediction
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aptitudepi
aptitudepi / checklist.md
Last active September 24, 2023 04:18 — forked from bobpaw/checklist.md
Linux Checklist for Cyberpatriot idk

Install updates (Covered)

apt-get update && apt-get upgrade && apt-get dist-upgrade

Automatic updates in GUI (Not covered)

Firewall (Covered)

apt-get install ufw && ufw enable

SSH settings

Turn off root in sshd_config (Covered)

if grep -qF 'PermitRootLogin' /etc/ssh/sshd_config; then sed -i 's/^.*PermitRootLogin.*$/PermitRootLogin no/' /etc/ssh/sshd_config; else echo 'PermitRootLogin no' >> /etc/ssh/sshd_config; fi

PermitRootLogin no

@aptitudepi
aptitudepi / all.txt
Created November 22, 2023 06:12 — forked from jhaddix/all.txt
all wordlists from every dns enumeration tool... ever. Please excuse the lewd entries =/
This file has been truncated, but you can view the full file.
.
..
........
@
*
*.*
*.*.*
🐎
@aptitudepi
aptitudepi / all.txt
Created November 22, 2023 06:12 — forked from jhaddix/all.txt
all wordlists from every dns enumeration tool... ever. Please excuse the lewd entries =/
This file has been truncated, but you can view the full file.
.
..
........
@
*
*.*
*.*.*
🐎
@aptitudepi
aptitudepi / eml2domain.sh
Last active March 13, 2024 21:24
After downloading all emails from a folder in .eml format from ~~gmail~~ Thunderbird, format it such that every email is separated by a pipe (" | ") instead of a newline so that I can update the Gmail filter rule for new spam emails. Remember to check for false positives!
find . -type f -exec cat {} \; | nl | grep "From" | grep -o '[[:alnum:]+\.\_\-]*@[[:alnum:]+\.\_\-]*' | sort -fu | awk '{printf "%s | ",$0} END {print ""}' | rev | cut -c 4- | rev
@aptitudepi
aptitudepi / GHAnonymizer.sh
Last active March 16, 2024 06:10
Use gh cli and git to rewrite commit history and anonymize commits
# pip3 install git-filter-repo
gh repo list --json name -q '.[].name' --limit 1000 | while read -r repo; do ─╯
gh repo clone "$repo"
cd "$repo"
git-filter-repo --email-callback 'return email.replace(b"old@email.com", b"new@email.com")'
git push
cd ..
done