This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Sometimes you need an 'xpub' when you've been given a 'zpub'. i.e. some multisig wallet generators. | |
| # Converting a zpub to an xpub involves changing the prefix to match the Bitcoin mainnet extended | |
| # public key format. Both are BIP32 extended public keys, but zpub is typically used for SegWit (BIP84), | |
| # while xpub is for legacy addresses (BIP44). The conversion requires adjusting the version bytes. | |
| from base58 import b58decode, b58encode | |
| from hashlib import sha256 | |
| zpub = "zpub..." | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // package.json: | |
| // { | |
| // "dependencies": { | |
| // "@grpc/grpc-js": "^1.12.6", | |
| // "@grpc/proto-loader": "^0.7.13", | |
| // "amqplib": "^0.10.5" | |
| // } | |
| //} | |
| const fs = require('fs'); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python | |
| import sys | |
| import requests | |
| import json | |
| # Take first argument as address to send satoshis to | |
| email = sys.argv[1].split("@") | |
| username = email[0] | |
| domain = email[1] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | :global int2chr do={ | |
| :local symbolsHex {"\00";"\01";"\02";"\03";"\04";"\05";"\06";"\07";"\08";"\09";"\0A";"\0B";"\0C";"\0D";"\0E";"\0F";"\10";"\11";"\12";"\13";"\14";"\15";"\16";"\17";"\18";"\19";"\1A";"\1B";"\1C";"\1D";"\1E";"\1F";"\20";"\21";"\22";"\23";"\24";"\25";"\26";"\27";"\28";"\29";"\2A";"\2B";"\2C";"\2D";"\2E";"\2F";"\30";"\31";"\32";"\33";"\34";"\35";"\36";"\37";"\38";"\39";"\3A";"\3B";"\3C";"\3D";"\3E";"\3F";"\40";"\41";"\42";"\43";"\44";"\45";"\46";"\47";"\48";"\49";"\4A";"\4B";"\4C";"\4D";"\4E";"\4F";"\50";"\51";"\52";"\53";"\54";"\55";"\56";"\57";"\58";"\59";"\5A";"\5B";"\5C";"\5D";"\5E";"\5F";"\60";"\61";"\62";"\63";"\64";"\65";"\66";"\67";"\68";"\69";"\6A";"\6B";"\6C";"\6D";"\6E";"\6F";"\70";"\71";"\72";"\73";"\74";"\75";"\76";"\77";"\78";"\79";"\7A";"\7B";"\7C";"\7D";"\7E";"\7F";"\80";"\81";"\82";"\83";"\84";"\85";"\86";"\87";"\88";"\89";"\8A";"\8B";"\8C";"\8D";"\8E";"\8F";"\90";"\91";"\92";"\93";"\94";"\95";"\96";"\97";"\98";"\99";"\9A";"\9B";"\9C";"\9D";"\9E";"\9F";"\A0";"\A1";"\A2";"\ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | :global previousIP 1.2.3.4 | |
| :global ipAddressCheckURL "http://ifconfig.me/ip" | |
| # or... :global ipAddressCheckURL "http://icanhazip.com" | |
| :global ipChangedEventURL "https://webhook.site/12345678-9610-4f57-9bfe-a3c5e2551d26" | |
| /system/script/add name=reportDynamicIPChanged source={ | |
| :global ipAddressCheckURL | |
| :global ipChangedEventURL | |
| :local result [/tool fetch url=$ipAddressCheckURL mode=http as-value output=user]; | |
| :if ($result->"status" = "finished") do={ | |
| :local currentIP ($result->"data"); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env bash | |
| # Settings | |
| WG_IFACE=wg0 | |
| WG_PEER=<peer_id> | |
| WG_PORT=12345 | |
| HOSTNAME=yourhostname.dynamicip.example.com | |
| # File to store the last IP | |
| last_ip_file="/tmp/last_ip.txt" | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | [PARSER] | |
| Name ubuntu-syslog-with-pid | |
| Format regex | |
| Regex /^(?<timestamp>\S+\s+\d{1,2}\s+\d{2}:\d{2}:\d{2})\s(?<hostname>\S+)\s(?<process>\S+)\[(?<pid>\d+)\]:\s(?<message>.*)$/ | |
| Time_Key time | |
| Time_Format %b %d %H:%M:%S | |
| Time_Keep On | |
| [PARSER] | |
| Name ubuntu-syslog-without-pid | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env bash | |
| # | |
| # Run this in the Terraform folder for the instance to reconstruct the Administator password. | |
| # | |
| # Example usage: | |
| # | |
| # get-windows-administrator-password | |
| # | |
| INSTANCE_ID=$1 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | [PARSER] | |
| Name syslog-rfc3164-safe | |
| Format regex | |
| Regex /\<(?<pri>[0-9]+)\>(?<time>\w{3}\s+\d+\s\d{2}:\d{2}:\d{2})\s(?<host>[^ ]*)\s(?<ident>[a-zA-Z0-9_\/\.\-\+,]*)(\[(?<pid>\d+)\])*:?\s(?<message>.*)/ | |
| Time_Key time | |
| Time_Format %b %d %H:%M:%S | |
| Time_Keep On | |
| [PARSER] | |
| Name ssh_access_logs_mikrotik | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -- Hack to workaround lack of precision in RFC3164 dates. | |
| require "os" | |
| function rfc3164_to_timestamp(rfc3164_log) | |
| local month_names = { | |
| Jan = "01", Feb = "02", Mar = "03", Apr = "04", | |
| May = "05", Jun = "06", Jul = "07", Aug = "08", | |
| Sep = "09", Oct = "10", Nov = "11", Dec = "12" | |
| } | 
NewerOlder