Skip to content

Instantly share code, notes, and snippets.

View 1upbyte's full-sized avatar

Pablo Comino 1upbyte

View GitHub Profile
@0xNDI
0xNDI / configure_krb5.py
Last active April 20, 2025 08:49 — forked from opabravo/configure_krb5.py
This script can easily configure /etc/krb5.conf for evil-winrm, by providing a domain fqdn and domain controller name
#!/usr/bin/env python3
"""
This script can easily configure /etc/krb5.conf for evil-winrm, by providing a domain fqdn and domain controller name
So that evil-winrm can be used with kerberos authentication
Evil-winrm Example:
```bash
export KRB5CCNAME=Administrator.ccache
evil-winrm -i forest.htb.local -r htb.local
@cobryan05
cobryan05 / webcamDetect.py
Last active April 22, 2024 11:40
Query registry for active webcam
# 2024-04-17: Stole changese from @Timmo on stackoverflow to get this working with Windows Apps
import winreg
class WebcamDetect:
REG_KEY = winreg.HKEY_CURRENT_USER
WEBCAM_REG_SUBKEY = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\webcam\\"
WEBCAM_TIMESTAMP_VALUE_NAME = "LastUsedTimeStop"
def __init__(self):
@4abhinavjain
4abhinavjain / reinstall_VPS_from_inside.txt
Last active March 30, 2025 18:33 — forked from ClashTheBunny/reinstall_VPS_from_inside.sh
DIY install debian on Oracle Cloud Infrastructure ( Free Tier ) - ARM64
# should works on any cloud-init enabled hypervisor (openstack.. )
# start from a normal ubuntu 20.04 install as minimal was not available for ARM64
# Since ARM64 machines has higher RAM, Shrinking is desired but not necessary. Instead we will increase tmpfs to 1700MB
# Getting root (if sudo -i doesn't work then set a root password beforehand using 'sudo passwd root'
sudo -i
# make sure we are on the highest kernel, so we can delete all the others ...
@nitred
nitred / optimal_mtu.md
Last active April 17, 2025 06:34
Wireguard Optimal MTU

About

  • I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
  • I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
  • Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.

Testing

  • On WG server, I started an iperf3 server
  • On WG peer, I wrote a script that does the following:
    • wg-quick down wg0
  • Edit MTU in the /etc/wireguard/wg0.conf file
@balazsbotond
balazsbotond / notify.ps1
Last active February 15, 2025 23:13
PowerShell script for sending Windows 10 notifications
$ErrorActionPreference = "Stop"
$notificationTitle = "Build Succeeded"
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null
$template = [Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent([Windows.UI.Notifications.ToastTemplateType]::ToastText01)
$toastXml = [xml] $template.GetXml()
$toastXml.GetElementsByTagName("text").AppendChild($toastXml.CreateTextNode($notificationTitle)) > $null
$xml = New-Object Windows.Data.Xml.Dom.XmlDocument
$xml.LoadXml($toastXml.OuterXml)
$toast = [Windows.UI.Notifications.ToastNotification]::new($xml)
$toast.Tag = "Test1"
@palmerc
palmerc / no.corporate.wireguard.plist
Last active February 21, 2025 13:41
WireGuard LaunchD Startup
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>no.corporate.wireguard</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<dict>

Villager mechanics in 1.14. All this data has been deduced by using the following commands:

/data get entity @e[type=minecraft:villager,limit=1,sort=nearest] Brain.memories
/execute as orlp at orlp run tellraw @s {"nbt":"Brain.memories","entity":"@e[type=villager,sort=nearest,limit=1]"}

A villager is awake from 0-11999 and tries to sleep between 12000 and 23999.

A villager will claim a bed if:

@Bilka2
Bilka2 / webhook.py
Last active February 27, 2025 18:31
Simple discord webhook with python
import requests # dependency
url = "<your url>" # webhook url, from here: https://i.imgur.com/f9XnAew.png
# for all params, see https://discordapp.com/developers/docs/resources/webhook#execute-webhook
data = {
"content" : "message content",
"username" : "custom username"
}
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 19, 2025 17:17 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@jhorsman
jhorsman / how-to-convert.md
Last active June 21, 2024 16:32
How to convert a VMware virtual disk to VirtualBox disk

How to convert a VMware virtual disk to VirtualBox disk

Context

  • On my workstation running a VirtualBox machine with a VMDK (VMware virtual disk) failed.
  • I tried again by converting the VMDK into a VDI (VirtualBox virtual disk)

Steps