Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
What is Bash?

Avinash H. Duduskar Strykar

💭
What is Bash?
  • India
View GitHub Profile
View check-ip-ignored.py
#!/usr/bin/env python3
import sys
import dns.resolver
def resolve_ips(domain, resolver):
ips = []
try:
ips += [str(rdata) for rdata in resolver.resolve(domain, 'A')]
except (dns.resolver.NoAnswer, dns.resolver.Timeout):
@Strykar
Strykar / weechat.conf
Last active December 25, 2022 07:35
A single file config for adding bots that probe Weechat's relay port to a Fail2ban jail (/etc/fail2ban/jail.d/weechat.conf)
View weechat.conf
[weechat]
filter =
enabled = false
banaction = nftables
action = nftables-allports[name=weechat]
backend = auto
logpath = /home/user/.local/share/weechat/logs/core.weechat.weechatlog
logencoding = utf-8
port = 9000
protocol = tcp
@Strykar
Strykar / gist:8db4f0e060e3811acee208686bf58a34
Created November 8, 2022 13:08 — forked from helloingob/gist:3efc7c4babaea3f921525a74e8f063b2
How to use aircrack-ng run by archlinux on a raspberry pi
View gist:8db4f0e060e3811acee208686bf58a34
Based on https://miloserdov.org/?p=659
Hardware:
- TP-Link TL-WN722N + TP-Link TL-ANT2408CL
- Raspberry Pi 3
1.) Get Archlinux für Raspberry
RaspArch Build 181117 (http://raspex.exton.se/?p=983)
Download (https://sourceforge.net/projects/rasparch/files/latest/download)
@Strykar
Strykar / weechat_cert.sh
Last active November 3, 2022 21:02
acme.sh reloadcmd for Weechat relay SSL cert
View weechat_cert.sh
#!/bin/bash
# Acme.sh reloadcmd file
set -euf -o pipefail
# Setup the TLS file the way Weechat expects it
/usr/bin/cat /home/strykar/.acme.sh/i5.xxx.in/i5.xxx.in.key > /home/strykar/.config/weechat/ssl/relay.pem
/usr/bin/cat /home/strykar/.acme.sh/i5.xxx.in/fullchain.cer >> /home/strykar/.config/weechat/ssl/relay.pem
# Run the /relay sslcertkey command via Weechat's FIFO to reload the new cert
# Weechat's FIFO plugin must be loaded and running
View pyradio.log
2022-04-01 20:52:37,777 - pyradio.radio - INFO - <<<===--- Program start ---===>>>
2022-04-01 20:52:37,777 - pyradio.radio - INFO - TUI initialization on python v. 3.10.4 (main, Mar 23 2022, 23:05:40) [GCC 11.2.0] on Arch Linux (AUR)
2022-04-01 20:52:37,777 - pyradio.radio - INFO - Terminal supports 256 colors
2022-04-01 20:52:37,777 - pyradio.themes - DEBUG - _do_init_pairs: {'Stations': [7, 0], 'Status Bar': [0, 2], 'Normal Cursor': [0, 5], 'Active Cursor': [0, 2], 'Active Station': [2, 0], 'PyRadio URL': [4, 0], 'Messages Border': [3, 0], 'Edit Cursor': [7, 5], 'Colors': 8, 'Name': 'dark', 'Path': ''}
2022-04-01 20:52:37,778 - pyradio.player - INFO - Probing available multimedia players...
2022-04-01 20:52:37,778 - pyradio.player - INFO - Implemented players: mpv, mplayer, vlc
2022-04-01 20:52:37,779 - pyradio.player - INFO - <class 'pyradio.player.VlcPlayer'> supported.
2022-04-01 20:52:37,779 - pyradio.radio - DEBUG - body starts at line 2, ends at line 66
2022-04-01 20:52:37,782 - pyradio.radio - DEBU
View gist:2cb2cca0eea339d6a4ce05042db4d064
IP Address Location
89.187.177.134 NYC
89.187.177.138 NYC
89.187.177.196 NYC
89.187.178.130 NYC
89.187.179.35 NYC
89.187.185.130 LAX
89.187.185.153 LAX
@Strykar
Strykar / environment
Created September 30, 2021 11:39
Livepeer systemd environment
View environment
ethaddr=0x1a00000000000000000000000000000000000000
ethurl=https://mainnet.infura.io/v3/00000000000011111111110000000000
ethpass=mywalletpassword
maxgas=40000000000
unitprice=800
serviceaddr=my.livepeer.node:8935
sesh=6
cliaddr=192.168.10.1:7935
rew=false
mon=false
@Strykar
Strykar / livepeer.service
Last active September 30, 2021 11:58
Livepeer systemd service
View livepeer.service
[Unit]
Description=Start the Go-Livepeer Orchestrator and Transcoder service
After=network.target
Wants=network-online.target
# See https://www.cyberciti.biz/faq/linux-hide-processes-from-other-users/
[Service]
Restart=always
Type=simple
EnvironmentFile=/etc/go-livepeer/environment
View livepeer-bin PKGBUILD
# Maintainer: Strykar <strykar@hotmail.com>
pkgname=go-livepeer-bin
_pkgname=go-livepeer
pkgver=0.5.21
pkgrel=1
pkgdesc='Official Go binaries of the Livepeer protocol'
arch=('x86_64')
url='https://github.com/livepeer/go-livepeer'
license=('MIT')
@Strykar
Strykar / upgrade_livepeer.sh
Last active July 17, 2023 14:35
Upgrade Livepeer Go binaries. Run as: $ upgrade_livepeer.sh 4efbda6d5e6586e7eb1e6ccbd526da65cdbe2e4e27a01cb76b1f2893fe790fdb
View upgrade_livepeer.sh
#!/bin/bash
# Download, extract and update Livepeer binary from Github to a pre-existing directory you set below
# It assumes you have extracted the previous livpeer tar.gz in it and run livepeer from the same directory
# Not intended to be run as root
#
# Expects bash, jq, curl, grep, sed, sha256sum and tar to be installed, usually available even on embedded systems
# Windows Subsystem for Linux (WSL) or Cygwin should provide every utility on Windows
# shellcheck disable=SC2015
set -euf -o pipefail