|
@@ -0,0 +1,123 @@
|
|
|
|
|
+# Datad alias
|
|
|
|
|
+alias ddd="source /home/CITRITE/manjeshn/manscript/datad.sh"
|
|
|
|
|
+alias datad="source /home/CITRITE/manjeshn/manscript/datad.sh"
|
|
|
|
|
+alias datadd="source /home/CITRITE/manjeshn/manscript/datadd.sh"
|
|
|
|
|
+
|
|
|
|
|
+# conFetch alias
|
|
|
|
|
+alias show="python /home/CITRITE/manjeshn/manscript/show.py"
|
|
|
|
|
+alias showd="python /home/CITRITE/manjeshn/manscript/showd.py"
|
|
|
|
|
+alias conFetch="python /home/CITRITE/manjeshn/manscript/conFetch_Wrapper.py"
|
|
|
|
|
+
|
|
|
|
|
+# bigCap alias
|
|
|
|
|
+alias bigcap="python /home/CITRITE/manjeshn/manscript/bigcap.py"
|
|
|
|
|
+
|
|
|
|
|
+# disposableToys
|
|
|
|
|
+alias dt="python /home/CITRITE/manjeshn/manscript/disposableToys/Project_dT/dt.py"
|
|
|
|
|
+
|
|
|
|
|
+# Parv style of tshoot
|
|
|
|
|
+alias ls="ls -ltrha"
|
|
|
|
|
+
|
|
|
|
|
+# allnewnslog alias
|
|
|
|
|
+alias allnewnslog='function _allnewnslog() { base_dir="$(pwd | sed '\''s|\(.*collector[^/]*\)/.*|\1|'\'')"; find "$base_dir/var/nslog/" -maxdepth 1 -type d -name "newnslog*" -print0 | while IFS= read -r -d "" i; do echo -e "\033[1;33m------------------------ $i ------------------------\033[0m"; nsconmsg -K "$i" -d "$1" -s disptime=1; done; }; _allnewnslog'
|
|
|
|
|
+
|
|
|
|
|
+alias ..="cd .."
|
|
|
|
|
+alias ...="cd ../../"
|
|
|
|
|
+alias ....="cd ../../../"
|
|
|
|
|
+alias .....="cd ../../.././"
|
|
|
|
|
+alias .1="cd .."
|
|
|
|
|
+alias .2="cd ../../"
|
|
|
|
|
+alias .3="cd ../../../"
|
|
|
|
|
+alias .4="cd ../../../../"
|
|
|
|
|
+
|
|
|
|
|
+alias h='history'
|
|
|
|
|
+alias gh="history | grep "
|
|
|
|
|
+alias c="clear"
|
|
|
|
|
+
|
|
|
|
|
+alias zzgrep='grep -i --color=always'
|
|
|
|
|
+alias zzless='less -R'
|
|
|
|
|
+alias countcol="awk -F, '{for(i=1;i<=NF;i++) { print i, \$i } exit}'"
|
|
|
|
|
+
|
|
|
|
|
+# =============== APPENDED SECTION: PCAP SSLKEYS INJECTOR ===============
|
|
|
|
|
+# Parv's PCAP SSLKEYS Injector (Version v0.23)
|
|
|
|
|
+# Requires Wireshark utilities (editcap)
|
|
|
|
|
+alias pcap-ssl='editcap --inject-secrets tls'
|
|
|
|
|
+
|
|
|
|
|
+pcap-inject() {
|
|
|
|
|
+ if [ $# -ne 2 ] && [ $# -ne 3 ]; then
|
|
|
|
|
+ echo "Usage: pcap-inject <ssl_keys_file> <input_pcap> [output_pcapng]"
|
|
|
|
|
+ echo "If output_pcapng is omitted, uses input name with .pcapng extension"
|
|
|
|
|
+ return 1
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
|
|
+ local ssl_keys="$1"
|
|
|
|
|
+ local input_pcap="$2"
|
|
|
|
|
+ local output_pcapng="${3:-}"
|
|
|
|
|
+
|
|
|
|
|
+ # Validate files exist
|
|
|
|
|
+ if [ ! -f "$ssl_keys" ]; then
|
|
|
|
|
+ echo -e "\033[31m? ERROR: SSL keys file not found: $ssl_keys\033[0m"
|
|
|
|
|
+ return 1
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
|
|
+ if [ ! -f "$input_pcap" ]; then
|
|
|
|
|
+ echo -e "\033[31m? ERROR: Input PCAP not found: $input_pcap\033[0m"
|
|
|
|
|
+ return 1
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
|
|
+ # Generate safe output filename
|
|
|
|
|
+ if [ -z "$output_pcapng" ]; then
|
|
|
|
|
+ if [[ "$input_pcap" == *.* ]]; then
|
|
|
|
|
+ output_pcapng="${input_pcap%.*}.pcapng"
|
|
|
|
|
+ else
|
|
|
|
|
+ output_pcapng="${input_pcap}.pcapng"
|
|
|
|
|
+ fi
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
|
|
+ # Prevent accidental overwrites
|
|
|
|
|
+ if [ -f "$output_pcapng" ]; then
|
|
|
|
|
+ read -rp "$(echo -e "\033[33m?? Output file '$output_pcapng' exists. Overwrite? (y/n) \033[0m")" confirm
|
|
|
|
|
+ if [[ ! "$confirm" =~ [yY] ]]; then
|
|
|
|
|
+ echo -e "\033[33mAborted by user\033[0m"
|
|
|
|
|
+ return 1
|
|
|
|
|
+ fi
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
|
|
+ # Execute injection
|
|
|
|
|
+ editcap --inject-secrets "tls,$ssl_keys" "$input_pcap" "$output_pcapng"
|
|
|
|
|
+
|
|
|
|
|
+ if [ $? -eq 0 ]; then
|
|
|
|
|
+ echo -e "\n\033[32m? SUCCESS: Created $output_pcapng\033[0m"
|
|
|
|
|
+ echo " Input PCAP: $input_pcap"
|
|
|
|
|
+ echo " SSL Keys: $ssl_keys"
|
|
|
|
|
+ echo " Output Size: $(du -h "$output_pcapng" 2>/dev/null | awk '{print $1}')"
|
|
|
|
|
+ else
|
|
|
|
|
+ echo -e "\n\033[31m? FAILED: editcap returned error status\033[0m"
|
|
|
|
|
+ echo " Command: editcap --inject-secrets tls,$ssl_keys $input_pcap $output_pcapng"
|
|
|
|
|
+ return 1
|
|
|
|
|
+ fi
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+# Auto-completion setup
|
|
|
|
|
+_pcap-inject-completion() {
|
|
|
|
|
+ local cur prev
|
|
|
|
|
+ COMPREPLY=()
|
|
|
|
|
+ cur="${COMP_WORDS[COMP_CWORD]}"
|
|
|
|
|
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
|
|
|
+
|
|
|
|
|
+ case $COMP_CWORD in
|
|
|
|
|
+ 1) # SSL keys file completion
|
|
|
|
|
+ COMPREPLY=( $(compgen -f -X '!*@(sslkeys|keys|log)' -- "$cur") )
|
|
|
|
|
+ ;;
|
|
|
|
|
+ 2) # Input PCAP completion
|
|
|
|
|
+ COMPREPLY=( $(compgen -f -X '!*@(pcap|cap|pcapng|trace)' -- "$cur") )
|
|
|
|
|
+ ;;
|
|
|
|
|
+ 3) # Output file completion
|
|
|
|
|
+ COMPREPLY=( $(compgen -f -- "$cur") )
|
|
|
|
|
+ ;;
|
|
|
|
|
+ esac
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+# Enable completion with error suppression for older shells
|
|
|
|
|
+shopt -s extglob 2>/dev/null
|
|
|
|
|
+complete -F _pcap-inject-completion pcap-inject 2>/dev/null
|
|
|
|
|
+echo -e "\033[36m?? PCAP TLS Injector loaded. Use 'pcap-inject' with tab-completion.\033[0m"
|