Skip to content

Instantly share code, notes, and snippets.

Create duplicate
$ exec 4<&3   # creates duplicate from 3 to 4
Open file for write/read and assign fd
$ exec 3&lt;&gt; file 
@DCx7C5
DCx7C5 / riskcalc.py
Created September 29, 2023 11:39
risk management calculations
class Asset:
def __init__(self, asset_value, ef_before, ef_after, aro, annual_cost):
self.av = asset_value
self.ef_before = ef_before
self.aro = aro
self.ef_after = ef_after
self.annual_cost = annual_cost
@DCx7C5
DCx7C5 / breach.txt
Last active September 2, 2023 08:58 — forked from fawazahmed0/breach.txt
Email and password breach collection list
# Please Note, I am sharing this, hoping this will be used for good public use, such as data analysis, penetration testing etc
# These links are already available all over the internet
# Also Note, Trying to login into someone else's account without their permission is unethical and illegal
# Collection 1
magnet:?xt=urn:btih:B39C603C7E18DB8262067C5926E7D5EA5D20E12E&dn=Collection%201&tr=udp%3a%2f%2ftracker.coppersurfer.tk%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.leechers-paradise.org%3a6969%2fannounce&tr=http%3a%2f%2ft.nyaatracker.com%3a80%2fannounce&tr=http%3a%2f%2fopentracker.xyz%3a80%2fannounce
# Collection 2-5 & Antipublic
magnet:?xt=urn:btih:D136B1ADDE531F38311FBF43FB96FC26DF1A34CD&dn=Collection%20%232-%235%20%26%20Antipublic&tr=udp%3a%2f%2ftracker.coppersurfer.tk%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.leechers-paradise.org%3a6969%2fannounce&tr=http%3a%2f%2ft.nyaatracker.com%3a80%2fannounce&tr=http%3a%2f%2fopentracker.xyz%3a80%2fannounce
@DCx7C5
DCx7C5 / CVE-2019-9053.py
Created July 30, 2023 18:57
CVE-2019-9053 poc rewritten to python3
#!/usr/bin/env python
# Exploit Title: Unauthenticated SQL Injection on CMS Made Simple <= 2.2.9
# Date: 30-03-2019
# Exploit Author: Daniele Scanu @ Certimeter Group
# Vendor Homepage: https://www.cmsmadesimple.org/
# Software Link: https://www.cmsmadesimple.org/downloads/cmsms/
# Version: <= 2.2.9
# Tested on: Ubuntu 18.04 LTS
# CVE : CVE-2019-9053
@DCx7C5
DCx7C5 / useful.md
Last active September 2, 2023 08:59
Collection of nice one liners

find files where SUID or GUID bit is set

find / -type f -a \( -perm -u+s -o -perm -g+s \) -exec ls -l {} \; 2> /dev/null

find all folders with write access

find / -writable 2>/dev/null | cut -d "/" -f 2,3 | grep -v proc | sort -u

Webarchive url extractor

python3 -c "import json,requests;f=open('/tmp/urls.txt','w');f.writelines('\n'.join(set([x[2] for x in json.loads(requests.get(f'https://web.archive.org/cdx/search/cdx?url={input(\"scrape site: \")}*&output=json').content)])));f.close()"

URL regex (opt proto, opt ssl, opt file-locator, opt sub-domain, opt sub-sub)

((http(s)?:)?//)?([a-zA-Z0-9]{1,128}\.)?([a-zA-Z0-9]{1,128}\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)

Email regex

Keybase proof

I hereby claim:

  • I am dcx7c5 on github.
  • I am dcx7c5 (https://keybase.io/dcx7c5) on keybase.
  • I have a public key ASAyVgGNSlkXM4LOwsXRs1vuPb7pY11F3c-XJWlnBW0dQgo

To claim this, I am signing this object: