karlo

Tmux save all output (history) to file

 Uncategorized  Comments Off on Tmux save all output (history) to file
Feb 042020
 
bind-key P command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'

Add above in tmux.conf. Then do Prefix+Shift+P

 Posted by at 20:31

Excel return last line of multi line cell

 Uncategorized  Comments Off on Excel return last line of multi line cell
Jan 272020
 

=TRIM(RIGHT(SUBSTITUTE(B5,CHAR(10),REPT(” “;200));200))

Especially useful for project trackers. Add a LEFT(XXX;10) for returning dates.

 Posted by at 08:44

Keeping a (GitHub) fork up to date with upstream master

 Uncategorized  Comments Off on Keeping a (GitHub) fork up to date with upstream master
Jan 262020
 

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream

3. Updating your fork from original repo to keep up with their changes:

git pull upstream master

thanks

 Posted by at 09:40

MySQL / MariaDB DB and user creation

 Uncategorized  Comments Off on MySQL / MariaDB DB and user creation
Jan 122020
 

create user ‘nextcloud’@’localhost’ identified by ‘xxx’;

create database nextcloud;

grant all privileges on nextcloud.* to ‘nextcloud’@’localhost’ identified by ‘xxx’;

FLUSH PRIVILEGES;

 Posted by at 20:25

AutoRecon over proxychains

 Uncategorized  Comments Off on AutoRecon over proxychains
Jan 052020
 

Since we have no icmp/ping over proxychains, we have to change syntax a bit

~/svn/proxychains-ng/proxychains4 -f ~/proxychains.conf ~/svn/AutoRecon/autorecon.py –nmap ‘\-sT \-Pn’ 10.1.1.{1,224,235,246,248}

 Posted by at 11:38

GNOME add minimize maximize

 Uncategorized  Comments Off on GNOME add minimize maximize
Dec 202019
 

I think I had a blog like this before. Apparently not. Adding minimize and maximize buttons to gnome (in kali for example, if you cannot update:)

gsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close'

 Posted by at 18:12

Problem building Virtualbox modules on Centos (cannot generate ORC metadata)

 Uncategorized  Comments Off on Problem building Virtualbox modules on Centos (cannot generate ORC metadata)
Nov 282019
 
Guest Additions 6.0.14 module for kernel 4.18.0-80.11.2.el8_0.x86_64.
Error building the module.  Build output follows.
make V=1 CONFIG_MODULE_SIG= -C /lib/modules/4.18.0-80.11.2.el8_0.x86_64/build M=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j2 modules
make[1]: warning: -jN forced in submake: disabling jobserver mode.
Makefile:958: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel".  Stop.
make: *** [/tmp/vbox.0/Makefile-footer.gmk:111: vboxguest] Error 2
Building the main Guest Additions 6.0.14 module for kernel 4.18.0-80.7.1.el8_0.x86_64.thmtrader/status/1199833524699877376

Solution:

yum install elfutils-libelf-devel elfutils-devel

Then rebuild

 Posted by at 08:27

Running compiled code sh: [10665: 4] tcsetattr: Invalid argument error

 Uncategorized  Comments Off on Running compiled code sh: [10665: 4] tcsetattr: Invalid argument error
Nov 162019
 

Compiling exploit and getting the sh: [10665: 4] tcsetattr: Invalid argument error?

It helps to compile on a similar box. Find what linux runs your same kernel version+arch and compile there. Centos 4.4 is a cool one for kernel 2.6.9. That is all.

 Posted by at 11:02

Sample systemd unit file

 Uncategorized  Comments Off on Sample systemd unit file
Nov 122019
 
[Unit]
Description=Sonarr Daemon
After=syslog.target network.target
[Service]
User=sonarr
Group=sonarr
Type=simple
ExecStart=/usr/bin/mono /opt/sonarr/bin/NzbDrone.exe -nobrowser -data /opt/sonarr
TimeoutStopSec=20
[Install]
WantedBy=multi-user.target
 Posted by at 11:43

bash add IP in PWD to variable for easy reference

 Uncategorized  Comments Off on bash add IP in PWD to variable for easy reference
Nov 112019
 

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.

 Posted by at 21:09

Easy AutoRecon summary (bash)

 Uncategorized  Comments Off on Easy AutoRecon summary (bash)
Nov 112019
 

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

 Posted by at 21:08

Proxychains on fedora / centos7

 Uncategorized  Comments Off on Proxychains on fedora / centos7
Nov 052019
 

Clone the repo:

https://github.com/rofl0r/proxychains-ng

./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

 Posted by at 17:34

Thunderbird hidden option: sync all subfolders

 Uncategorized  Comments Off on Thunderbird hidden option: sync all subfolders
Oct 312019
 

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 :)

Source site
 Posted by at 17:20

Bash while loop input (stdin reading from while-input) fix

 Uncategorized  Comments Off on Bash while loop input (stdin reading from while-input) fix
Oct 262019
 

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.

 Posted by at 08:11