Skip to content

Instantly share code, notes, and snippets.

View MaurizioCasciano's full-sized avatar
👨‍💻
Turning Bits ON & OFF

Maurizio Casciano MaurizioCasciano

👨‍💻
Turning Bits ON & OFF
View GitHub Profile
#!/bin/bash
KC_REALM=<insert realm name here>
KC_USERNAME=<username here>
KC_PASSWORD=<password here>
KC_CLIENT=<client name here>
KC_CLIENT_SECRET=<client secret here>
KC_SERVER=<server address and port here>
KC_CONTEXT=auth
@adulau
adulau / taxii-curl.md
Last active November 14, 2022 15:11
TAXII using curl

Using curl to get data from TAXII

curl -H "Content-Type: application/xml" -H "X-TAXII-Accept: urn:taxii.mitre.org:message:xml:1.1" -H "X-TAXII-Content-Type: urn:taxii.mitre.org:message:xml:1.1" -X POST -d "@post.data" hailataxii.com/taxii-data

And the XML query (assuming you know the collection_name):

@kekru
kekru / 1-Enable Docker Remote API with TLS client verification.md
Last active October 11, 2024 14:44
Docker Remote API with client verification via daemon.json

Enable Docker Remote API with TLS client verification

Docker's Remote API can be secured via TLS and client certificate verification.
First of all you need a few certificates and keys:

  • CA certificate
  • Server certificate
  • Server key
  • Client certificate
  • Client key

Create certificate files

@folt
folt / gist:a98e9368dbe1dcbfce7198c16b862c92
Last active February 27, 2025 16:33
Balsamiq Mockups 3 crack
Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676
Thank you!
@nblair
nblair / nexus-repo-manager-privilege-example.groovy
Last active November 13, 2023 17:54
A groovy script to create Content Selectors, privileges, and roles programmatically via the Nexus Repository Manager 3 Scripting API.
import org.sonatype.nexus.common.entity.*
import org.sonatype.nexus.security.*
import org.sonatype.nexus.security.authz.*
import org.sonatype.nexus.selector.*
import com.google.common.collect.ImmutableMap
// use container.lookup to fetch internal APIs we need to use
def selectorManager = container.lookup(SelectorManager.class.name)
def securitySystem = container.lookup(SecuritySystem.class.name)
@SanderTheDragon
SanderTheDragon / postman-deb.sh
Last active April 1, 2025 19:10
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <[email protected]>
#
# SPDX-License-Identifier: MIT
arch=$(dpkg --print-architecture)
echo "Detected architecture: $arch"
case "$arch" in
@EHJ-52n
EHJ-52n / install_lets-encrypt_jenkins-jdks.sh
Last active January 22, 2023 18:29
Install Let's Encrypt Cross Signed Root Certificates in all Jenkins JDKs
#!/bin/bash
#
# Description
# This scripts downloads the latest certificates available and installs them
# to all keystores available
#
# Get all installed JDKs
#
PWD=$(pwd)
JDKS_HOME=/var/lib/jenkins/tools/hudson.model.JDK/
public class AnnotationHelper {
private static final String ANNOTATIONS = "annotations";
public static final String ANNOTATION_DATA = "annotationData";
public static boolean isJDK7OrLower() {
boolean jdk7OrLower = true;
try {
Class.class.getDeclaredField(ANNOTATIONS);
} catch (NoSuchFieldException e) {
//Willfully ignore all exceptions
@teocomi
teocomi / .gitignore
Created September 13, 2016 15:01
Gitignore for Unity projects
# =============== #
# Unity generated #
# =============== #
[Tt]emp/
[Oo]bj/
[Bb]uild
/[Bb]uilds/
/[Ll]ibrary/
sysinfo.txt
*.stackdump
#!/bin/bash
set -e
JAVA_HOME=${1-text}
[ $# -eq 0 ] && { echo "Usage: sudo $0 \$(/usr/libexec/java_home -v '1.8*')" ; exit 1; }
KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts
wget https://letsencrypt.org/certs/letsencryptauthorityx1.der
wget https://letsencrypt.org/certs/letsencryptauthorityx2.der