Skip to content

Instantly share code, notes, and snippets.

@BuffaloWill
BuffaloWill / cloud_metadata.txt
Last active January 6, 2025 04:25
Cloud Metadata Dictionary useful for SSRF Testing
## IPv6 Tests
http://[::ffff:169.254.169.254]
http://[0:0:0:0:0:ffff:169.254.169.254]
## AWS
# Amazon Web Services (No Header Required)
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/meta-data/iam/security-credentials/dummy
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
@petrkutalek
petrkutalek / self-signed.sh
Last active January 6, 2025 04:22
Making perfect ECDSA self-signed certificate for localhost
#!/bin/sh
openssl ecparam -out localhost.key -name secp256r1 -genkey
openssl req -x509 \
-out localhost.pem -new -key localhost.key -nodes -sha256 -days 30 \
-subj '/C=CZ/L=Prague/O=Petr Kutalek/OU=projectx/CN=localhost' \
-extensions EXT -config <(
printf '[dn]\n';
printf 'CN=localhost\n';
@plembo
plembo / ubiquiti-er-fw-iot-net.md
Last active January 6, 2025 04:21
Ubiquiti EdgeRouter firewall rules for IOT networks

Ubiquiti Edgerouter firewall rules for IOT networks

Just going to present several variations on a theme here, tested with a Ubiquiti EdgeRouter 4 in my home lab.

Several resources were consulted in the process of creating these firewall rules, cited below under "Resources".

In these examples, the "default" or "management" VLAN1 is VLAN1, on 192.168.1.0/24. A separate VLAN8 was created for IOT devices on 192.168.8.0/24, along with its own DHCP service on the router.

The minimum requirements here are to have the IOT devices on VLAN8 network get an address from the VLAN8 DHCP server and access the Internet through the VLAN's gateway (192.168.8.1), allow managment network access to the

@luizomf
luizomf / settings.json
Created October 24, 2022 13:01
Configuração inicial do VS Code
{
"window.zoomLevel": 2,
"workbench.startupEditor": "none",
"explorer.compactFolders": false,
"workbench.iconTheme": "material-icon-theme",
"editor.fontSize": 18,
"workbench.colorTheme": "OM Theme (Default Dracula Italic)",
"code-runner.executorMap": {
"python": "clear ; python -u",
},
@hogjonny
hogjonny / HDR_to_RGBM.py
Last active January 6, 2025 04:15
Converts an input .HDR file, to a RGBM format output as a 8-bit (per-channel), RGBA .tga file. Iteration 1, didn't work so well (looked horrible) so I made some adjustments. This now takes input args, so it can be run from the commandline.
#!/usr/bin/python
#coding:utf-8
# -- This line is 75 characters -------------------------------------------
"""
This script will convert a .HDR (radiance) into a RGBM file,
then save it back out as a 8bit (per-channel) .tga
"""
__author__ = 'HogJonny'
# -------------------------------------------------------------------------
@mariusvniekerk
mariusvniekerk / Download_stats.ipynb
Created June 28, 2019 14:35
Conda-forge download stats
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidzchen
davidzchen / sample-linux.c
Last active January 6, 2025 04:10
Sample C code using the Linux kernel coding style
/*
* Sample file using the Linux kernel coding convention.
*
* https://www.kernel.org/doc/Documentation/CodingStyle
*
* General rules:
* - Indents are tabs and must be 8 spaces wide.
* - Each line must be at most 80 characters long.
* - Use C-style comments.
* - File names should be lower-case.c
@sgeraldes
sgeraldes / Check-Nahimic.ps1
Last active January 6, 2025 04:08
Disable Nahinic Service
# Check Nahimic service status
$nahimicService = Get-Service -Name "Nahimic service" -ErrorAction SilentlyContinue
if ($nahimicService) {
if ($nahimicService.Status -eq "Running") {
Write-Host "Nahimic service is currently running." -ForegroundColor Yellow
Write-Host "Advice: If you're experiencing issues related to Nahimic or high CPU/RAM usage, consider stopping and disabling the service."
}
else {
Write-Host "Nahimic service is present but currently not running." -ForegroundColor Green
@alivx
alivx / ansible.cfg
Created May 23, 2020 15:15
Default Ansible config file
# Example config file for ansible -- https://ansible.com/
# =======================================================
# Nearly all parameters can be overridden in ansible-playbook
# or with command line flags. Ansible will read ANSIBLE_CONFIG,
# ansible.cfg in the current working directory, .ansible.cfg in
# the home directory, or /etc/ansible/ansible.cfg, whichever it
# finds first
# For a full list of available options, run ansible-config list or see the
// ==UserScript==
// @name Absolute Enable Right Click & Copy
// @namespace Absolute Right Click
// @description Force Enable Right Click & Copy & Highlight
// @shortcutKeys [Ctrl + `] Activate Absolute Right Click Mode To Force Remove Any Type Of Protection
// @author Absolute
// @version 1.8.9
// @icon https://i.imgur.com/AC7SyUr.png
// @compatible Chrome Google Chrome + Tampermonkey
// @match https://ecall.vn/*