karlo

Go compile error checksum mismatch (lnd)

 Uncategorized  Comments Off on Go compile error checksum mismatch (lnd)
Oct 162019
 
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'.

Well that is annoying. For me it helped to move the go.sum away (mv go.sum go.sum.bak). Feels insecure, and please research this, but at least it compiled. In this case, the developers let me know it was not a problem.

 Posted by at 05:17

Track data usage using iptables

 Uncategorized  Comments Off on Track data usage using iptables
Oct 122019
 

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

 Posted by at 11:07

Openvas service start timeout

 Uncategorized  Comments Off on Openvas service start timeout
Oct 122019
 

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 )

 Posted by at 10:41

Centos 8 enable cockpit (minimal install)

 Uncategorized  Comments Off on Centos 8 enable cockpit (minimal install)
Oct 112019
 

yum install cockpit && systemctl enable –now cockpit.socket && sleep 4 && ss -nlap | grep 9090 >/dev/null 2>&1 && echo “https://$(hostname -i):9090/”

 Posted by at 14:48

Fix “failed to start jnprTdi”

 Uncategorized  Comments Off on Fix “failed to start jnprTdi”
Oct 072019
 

What I did:

  1. Remove ALL pulse related programs
  2. Also remove activex pulse programs
  3. Reinstall
  4. Import settings again manually
 Posted by at 06:26

LVM device excluded by a filter (mpath / multipath )

 Uncategorized  Comments Off on LVM device excluded by a filter (mpath / multipath )
Oct 022019
 

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:

ls -al /dev/disk/by-id/*

in my case:

lrwxrwxrwx. 1 root root 9 Oct 2 19:24 /dev/disk/by-id/ata-WDC_WD40EFRX-68N32N0_WD-WCC7K2KD8PV5 -> ../../sdb
lrwxrwxrwx. 1 root root 9 Oct 2 17:13 /dev/disk/by-id/ata-WDC_WD40EFRX-68N32N0_WD-WCC7K7NUFLSF -> ../../sdc

 Posted by at 17:38

Rpmfusion fedora and h264/codecs

 Uncategorized  Comments Off on Rpmfusion fedora and h264/codecs
Sep 162019
 

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

 Posted by at 16:52

Spotify on fedora

 Uncategorized  Comments Off on Spotify on fedora
Sep 162019
 
dnf config-manager --add-repo=http://negativo17.org/repos/fedora-spotify.repo && yum update && yum -y install spotify-client 
 Posted by at 16:46

xfce4 terminal shortcut

 Uncategorized  Comments Off on xfce4 terminal shortcut
Sep 162019
 

open xfce4-settings-manager

keyboard

(while you are there, set Restore Num Lock on startup)

application shortcuts

add

xfce4-terminal

shortcut

 Posted by at 16:44

Fix: Digital ID name cannot be found by underlying security system

 Uncategorized  Comments Off on Fix: Digital ID name cannot be found by underlying security system
Jun 252019
 

I got this error when sending signed emails using my outlook cert by Digicert.

Solution:

  1. Open certmgt
  2. Navigate to Personal/Certificates
  3. Delete the signing cert
  4. Import your cert from backup (or request a new one)
  5. Select again in Security center in outlook

 Posted by at 06:12

Bash array operations and examples

 Uncategorized  Comments Off on Bash array operations and examples
Jun 112019
 

Split to array:

while IFS=’;’ read -ra ADDR; do
for i in “${ADDR[@]}”; do
# process “$i”
done
done <<< “$IN”

Define:

distro=(“redhat” “debian” “gentoo”)

Element:


${ArrayName[subscript]}

Length:


echo “${#distro[@]}”

Example

!/bin/bash

define array

name server names FQDN

NAMESERVERS=(“ns1.nixcraft.net.” “ns2.nixcraft.net.” “ns3.nixcraft.net.”)

get length of an array

tLen=${#NAMESERVERS[@]}

use for loop read all nameservers

for (( i=0; i<${tLen}; i++ ));
do
echo ${NAMESERVERS[$i]}
done

 Posted by at 06:58

Bash color variables

 Uncategorized  Comments Off on Bash color variables
Apr 112019
 
# Reset
Color_Off='\033[0m'       # Text Reset

# Regular Colors
Black='\033[0;30m'        # Black
Red='\033[0;31m'          # Red
Green='\033[0;32m'        # Green
Yellow='\033[0;33m'       # Yellow
Blue='\033[0;34m'         # Blue
Purple='\033[0;35m'       # Purple
Cyan='\033[0;36m'         # Cyan
White='\033[0;37m'        # White

# Bold
BBlack='\033[1;30m'       # Black
BRed='\033[1;31m'         # Red
BGreen='\033[1;32m'       # Green
BYellow='\033[1;33m'      # Yellow
BBlue='\033[1;34m'        # Blue
BPurple='\033[1;35m'      # Purple
BCyan='\033[1;36m'        # Cyan
BWhite='\033[1;37m'       # White

# Underline
UBlack='\033[4;30m'       # Black
URed='\033[4;31m'         # Red
UGreen='\033[4;32m'       # Green
UYellow='\033[4;33m'      # Yellow
UBlue='\033[4;34m'        # Blue
UPurple='\033[4;35m'      # Purple
UCyan='\033[4;36m'        # Cyan
UWhite='\033[4;37m'       # White

# Background
On_Black='\033[40m'       # Black
On_Red='\033[41m'         # Red
On_Green='\033[42m'       # Green
On_Yellow='\033[43m'      # Yellow
On_Blue='\033[44m'        # Blue
On_Purple='\033[45m'      # Purple
On_Cyan='\033[46m'        # Cyan
On_White='\033[47m'       # White

# High Intensity
IBlack='\033[0;90m'       # Black
IRed='\033[0;91m'         # Red
IGreen='\033[0;92m'       # Green
IYellow='\033[0;93m'      # Yellow
IBlue='\033[0;94m'        # Blue
IPurple='\033[0;95m'      # Purple
ICyan='\033[0;96m'        # Cyan
IWhite='\033[0;97m'       # White

# Bold High Intensity
BIBlack='\033[1;90m'      # Black
BIRed='\033[1;91m'        # Red
BIGreen='\033[1;92m'      # Green
BIYellow='\033[1;93m'     # Yellow
BIBlue='\033[1;94m'       # Blue
BIPurple='\033[1;95m'     # Purple
BICyan='\033[1;96m'       # Cyan
BIWhite='\033[1;97m'      # White

# High Intensity backgrounds
On_IBlack='\033[0;100m'   # Black
On_IRed='\033[0;101m'     # Red
On_IGreen='\033[0;102m'   # Green
On_IYellow='\033[0;103m'  # Yellow
On_IBlue='\033[0;104m'    # Blue
On_IPurple='\033[0;105m'  # Purple
On_ICyan='\033[0;106m'    # Cyan
On_IWhite='\033[0;107m'   # White
 Posted by at 11:41

Get x11 forwarding working on Centos 7 & Putty & Xming

 Uncategorized  Comments Off on Get x11 forwarding working on Centos 7 & Putty & Xming
Jan 042019
 
  1. Install xming
  2. Set up putty, use x forwarding, diplay loc localhost:0.0, rest is default
  3. Start xming
  4. On centos:
yum install xorg-x11-fonts* libXtst xorg-x11-xauth xorg-server xclock

Test using xclock. If $DISPLAY is not set you did it wrong. You can also test mobaxterm, it works well.

 Posted by at 07:38

Auto root login Centos 7 / EL 7

 Uncategorized  Comments Off on Auto root login Centos 7 / EL 7
Nov 222018
 
sed -i '/ExecStart/ s/agetty/agetty --autologin root/' /etc/systemd/system/getty.target.wants/getty@tty1.service
 Posted by at 07:07