Skip to content

Instantly share code, notes, and snippets.

View KevinLiebergen's full-sized avatar
🎯
Focusing

KevinLiebergen

🎯
Focusing
View GitHub Profile
@KevinLiebergen
KevinLiebergen / python_types.txt
Last active May 27, 2021 09:28
Declare python types
>>> t = [25, "mayo", 19]
>>> type(t)
<class 'list'>
>>> t = (25, "mayo", 19)
>>> type(t)
<class 'tuple'>
>>> t = {25, "mayo", 19}
>>> type(t)
@KevinLiebergen
KevinLiebergen / reconnect.sh
Last active August 2, 2021 16:54
Script to restart network daemon when it fucking fails
#!/bin/bash
ping -c 1 -W 1 1.1.1.1 || sudo systemctl restart NetworkManager.service
@KevinLiebergen
KevinLiebergen / Pentesting good environment
Last active December 29, 2021 20:14
Configure good work environment when it's time to do some pentesting!
Some ideas are based from S4vitar and takito.
$ tmux new -s <mysession-machine_name>
Rename current window:
$ Ctrl + b , : VPN
$ Ctrl + b , : Scanning
$ Ctrl + b , : Exploitation
$ Ctrl + b , : Escalation
@KevinLiebergen
KevinLiebergen / stuff
Created April 29, 2022 08:46
Stuff sort by length line (AWK and forward part)
cut -f 1,21 some.tsv | grep -E "([a-z]*\|[0-9]*[\^]?){3}" | \
awk -F '\t' '{print length(), $0 | "sort -rn"}' | cut -d ' ' -f 2 > new_staff.tsv
@KevinLiebergen
KevinLiebergen / compile if change
Created July 15, 2022 10:16
Shell command to complie in Latex when I change any file
while inotifywait -q -e modify --excludei './.git/' -r .; do make all_latexmk > /dev/null && python -c "print('#'*80)"; done

Tips for writing a paper

  1. e.g. is an abbreviation for exempli greti, it has a comma after.

There exist many malware types (e.g., ransomware, spyware, worm)

  1. Same with i.e.

  2. With three or more objects use a comma before and.

Tools to check first

  • file
  • strings
  • hexdump: Show the content of a binary
  • objdump: Show the elements (structure) of a binary
  • ltrace: Intercepts dynamic library calls
  • strace: Intercepts any syscall