Author: karlo
-
bash add IP in PWD to variable for easy reference
Add to .bashrc: export PROMPT_COMMAND=”${PROMPT_COMMAND:+$PROMPT_COMMAND ;} ip=\$( echo \$PWD | grep -oE ‘[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}’ ) ” Now if you browse to/in a directory which has an ipv4 ip, the IP will be stored in the $ip variable.
-
Easy AutoRecon summary (bash)
echo “===SUMMARY===”;grep . */report/notes.txt| while read line; do IP=$( echo -ne $line|cut -d’/’ -f1| tr -d ‘\n’ ); [[ x$IP != x$PREVIP ]] && echo; echo -n $IP ; echo -n $line | cut -d\] -f2- | grep –color=always ‘ .* found’ ; PREVIP=$IP; done; echo
-
Proxychains on fedora / centos7
Clone the repo: ./configure && make && sudo make install cp src/proxychains.conf /etc/proxychains.conf && vi /etc/proxychains.conf echo “alias p=’/usr/local/bin/proxychains4′” >> ~/.bashrc && . .bashrc p ssh xx@ip
-
Thunderbird hidden option: sync all subfolders
I have a nice procmail setup, but thunderbird by default does not show/update the subfolders: Open the Config Editor (Hamburger menu (top right) –> Preferences –> Preferences -> Advanced –> General -> Config Editor), and change the mail.server.default.check_all_folders_for_new setting to true. It’s like about:config for thunderbird :)
-
Metasploit using grep (no pipes | )
instead of show payloads | grep windows do grep windows show payloads :)
-
Bash while loop input (stdin reading from while-input) fix
while read line <&3; do echo “==== $line ====”; yes y | sqlmap -u http://$line/ –crawl=1; read -p press\ enter; done 3< webservers.ip Using input 3 to read your list, leaving stdin untouched.
-
Cross compiling error mingw32: Windows.h: No such file or directory
Rename Windows.h to windows.h ;) Small letter fixes this. 47176.c:1:10: fatal error: Windows.h: No such file or directory #include ^~~ compilation terminated.
-
Vim jump to specific character (number) in (long) line
2 options to jump to 100th character: Use mouse cursor movement: 100l (small L) Or put cursor in exact column: 100| (pipe character)
-
Go compile error checksum mismatch (lnd)
verifying github.com/btcsuite/btcd@v0.20.0-beta: checksum mismatch Β Β Β Β downloaded: h1:PamBMopnHxO2nEIsU89ibVVnqnXR2yFTgGNc+PdG68o= Β Β Β Β go.sum: Β Β h1:DnZGUjFbRkpytojHWwy6nfUSA7vFrzWXDLpFNzt74ZA= SECURITY ERROR This download does NOT match an earlier download recorded in go.sum. The bits may have been replaced on the origin server, or an attacker may have intercepted the download attempt. For more information, see ‘go help module-auth’.…
-
Track data usage using iptables
iptables -I INPUT 1 -s 1.0.0.9 -j ACCEPT iptables -I OUTPUT 1 -d 1.1.2.2 -j ACCEPT iptables -Z #CLEARCOUNTERS
-
Openvas service start timeout
Make sure to kill all redis apt-get purge –auto-remove openvas* apt-get install openvas wait for background tasks to complete ( watch ‘ps aux| grep -Ei vas|green|redis’) run openvas-setup on kali: the 1% complete problem: reduce concurrency (reset openvas password: openvasmd –user admin –new-password=karlo )
-
Centos 8 enable cockpit (minimal install)
yum install cockpit && systemctl enable –now cockpit.socket && sleep 4 && ss -nlap | grep 9090 >/dev/null 2>&1 && echo “https://$(hostname -i):9090/”
-
nc/netcat smtp servers (tcp/25) not responding to commands
EHLO x.x no reply WHY?! Talking to windows servers? send a CRLF by starting NC with -C
-
Libreoffice delete write protected content
Tools > Options > LibreOffice Writer > Formatting Aids > Remove tick from Protecting Areas / Enable cursor.
-
Fix “failed to start jnprTdi”
What I did: Remove ALL pulse related programs Also remove activex pulse programs Reinstall Import settings again manually
-
LVM device excluded by a filter (mpath / multipath )
first find out what is going on: pvcreate /dev/sdb -vvv 2>&1| less Look for errors. In my case it said the volume was mpath managed. So exclude from mpath, put the vi /etc/multipath.conf && systemctl restart multipathd.service Add a block at the bottom: blacklist { wwid WD40EFRX-68N32N0_WD-WCC7K2KD8PV5 wwid WD40EFRX-68N32N0_WD-WCC7K7NUFLSF } Find the WWID by doing:…
-
Virtualbox copy files and clipboard
right-ctrl – s (to open settings) general advanced shared clipboard bidirectional drag’n’drop bidirectional
-
Rpmfusion fedora and h264/codecs
yum install https://download1.rpmfusion.org/{free/fedora/rpmfusion-free,nonfree/fedora/rpmfusion-nonfree}-release-$(rpm -E %fedora).noarch.rpm yum install install compat-ffmpeg28 ffmpeg-libs
-
xfce terminal unsafe paste
Disable: open terminal preferences -> clipboard (bottom first tab) -> uncheck