Skip to content

Instantly share code, notes, and snippets.

@aguytech
aguytech / cmp-options.md
Last active June 14, 2022 10:06
[cmp] Compares binary files #bash #help #forensic #malware
-b, --print-bytes # print differing bytes
-i, --ignore-initial=SKIP # skip first SKIP bytes of both inputs
-i, --ignore-initial=SKIP1:SKIP2 # skip first SKIP1 bytes of FILE1 and first SKIP2 bytes of FILE2
-l, --verbose # output byte numbers and differing byte values
-n, --bytes=LIMIT # compare at most LIMIT bytes
-s, --quiet, --silent # suppress all normal output
@aguytech
aguytech / forensic-disk-info.md
Last active June 18, 2022 22:37
[forensic-disk] forensic tips for disk analysis #bash #malware #forensic #tips #disk

file

file ${file} # show informations

fdisk

fdisk -x ${file} # show informations
@aguytech
aguytech / doc.md
Last active August 28, 2022 03:55
[bash-completion] personal bash completions #bash #bashroot #tips

https://opensource.com/article/18/3/creating-bash-completion-script

COMPREPLY

an array variable used to store the completions. The completion mechanism uses this variable to display its contents as completions

COMPREPLY=( $(compgen -W "now tomorrow never" -- ${COMP_WORDS[COMP_CWORD]}) ) # propose given words at each let choose the first completion from given words and repeat it after (replace)
COMPREPLY=( $(compgen -W "now tomorrow never" "${COMP_WORDS[1]}") ) # let choose the first completion from given words and repeat it after (replace)
@aguytech
aguytech / xxd-install.sh
Last active June 14, 2022 09:51
[xxd] help for xxd #bash #help #malware #forensic
#!/bin/bash
sudo apt install bsdmainutils
@aguytech
aguytech / tsurugi-conf.sh
Last active June 21, 2022 22:24
[tsurugi] modifications tsurugi vm #forensic #disk #memory #network
#!/bin/bash
#### system
sudo swapoff -av
sudo sh -c 'echo vm.swappiness=5 > /etc/sysctl.d/99-swappiness.conf'
#### volatility
# https://github.com/volatilityfoundation/volatility/wiki/Installation
@aguytech
aguytech / mongodb--syntax.md
Last active July 20, 2022 20:21
[mongodb] #db #tips

client

list users

mongo
	use admin
	db.getUsers()
	exit