Skip to content

Instantly share code, notes, and snippets.

View tthtlc's full-sized avatar

Peter Teoh tthtlc

View GitHub Profile
# Top ten (or whatever) memory utilizing processes (with children aggregate) - Can be done without the multi-dimensional array
ps axo rss,comm,pid | awk '{ proc_list[$2] += $1; } END { for (proc in proc_list) { printf("%d\t%s\n", proc_list[proc],proc); }}' | sort -n | tail -n 10
# Download last file from index of
NAME=`wget --quiet URL -O - | grep util-vserver | tail -n 1 | sed 's|</a>.*||;s/.*>//'`; wget URL$UTILVSERVER;
# Delete newline
tr -d "\n" < file1 > file2
# which procs have $PATH_REGEX open?
find /proc -regex '/proc/[0-9]+/smaps' -exec grep -l "$PATH_REGEX" {} \; | cut -d'/' -f2
# Adding formatting to an xml document for easier reading
xmllint --format <filename> > <output file>
@tthtlc
tthtlc / MongoDbNotes
Created January 19, 2025 16:20 — forked from vvardhanz/MongoDbNotes
MongoDbNotes
MongoDB University notes.
Mongo Db is a document.
Mongo Db uses JSON object/data.
Mongo Db supports scaling out using sharing technique.
Mongo Db supports scaling out vs scaling up.
BSON:
Mongo Db stores the data in the format of BSON. On the application side manogdb drivers map the BSON data into the native data types.

How to pass the OSCP

  1. Recon
  2. Find vuln
  3. Exploit
  4. Escalate
  5. Document it

Time yourself

@tthtlc
tthtlc / offsec.md
Created January 25, 2025 02:37 — forked from santosomar/offsec.md
Penetrating Testing/Assessment Workflow

Penetrating Testing/Assessment Workflow & other fun infosec stuff

https://github.com/jivoi/pentest

My feeble attempt to organize (in a somewhat logical fashion) the vast amount of information, tools, resources, tip and tricks surrounding penetration testing, vulnerability assessment, and information security as a whole*