title | sidebar_label | hide_table_of_contents |
---|---|---|
Document example calling API |
Document example calling API |
true |
import Rapidoc from "@theme/Rapidoc"
#! /usr/bin/env python3 | |
''' | |
Needs Requests (pip3 install requests) | |
Author: Marcello Salvati, Twitter: @byt3bl33d3r | |
License: DWTFUWANTWTL (Do What Ever the Fuck You Want With This License) | |
This should allow you to detect if something is potentially exploitable to the log4j 0day dropped on December 9th 2021. |
#!/bin/bash | |
# Purpose | |
# grab the jwt token | |
# make API calls as the GitHub App used | |
# get a temporary jwt token from the key file and app id (hardcoded in the file:) | |
generated_jwt=$(./github-app-jwt.sh) | |
github_api_url="https://api.github.com/app" |
# MIT No Attribution | |
# | |
# Copyright 2022 Ben Kehoe | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
# software and associated documentation files (the "Software"), to deal in the Software | |
# without restriction, including without limitation the rights to use, copy, modify, | |
# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | |
# permit persons to whom the Software is furnished to do so. | |
# |
import * as cdk from '@aws-cdk/core'; | |
import * as ec2 from '@aws-cdk/aws-ec2'; | |
export class CdkSsmEc2Stack extends cdk.Stack { | |
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); | |
// import the default VPC | |
const vpc = ec2.Vpc.fromLookup(this, 'VPC', { |
#!/bin/bash | |
# Source: https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html | |
[[ -n "${AWS_ACCESS_KEY_ID}" ]] || { echo "AWS_ACCESS_KEY_ID required" >&2; exit 1; } | |
[[ -n "${AWS_SECRET_ACCESS_KEY}" ]] || { echo "AWS_SECRET_ACCESS_KEY required" >&2; exit 1; } | |
readonly parameterName="SlawekTestParam" | |
readonly method="POST" |
#!/usr/bin/env ts-node | |
// This script uploads your assets to the CDK staging bucket in S3 (just as cdk deploy would) | |
// and writes out two files: | |
// - parameters.ini to use in CLI deployments (see instructions below) | |
// - parameters.json to use in AWS CodePipeline for CloudFormation deployments | |
// | |
// Installation instructions: | |
// - Save this script cdk-package.ts to the root of your CDK repo (i.e. next to cdk.json) and make it executable | |
// - Install script dependencies: npm install jsonpath aws-sdk adm-zip @types/jsonpath @types/adm-zip |
AWSChatbotRole: | |
Type: AWS::IAM::Role | |
Properties: | |
RoleName: AWSChatbotRole | |
AssumeRolePolicyDocument: | |
Version: 2012-10-17 | |
Statement: | |
- Effect: Allow | |
Principal: | |
Service: 'chatbot.amazonaws.com' |
FROM debian:10-slim | |
RUN apt-get update -y && \ | |
apt-get install -y awscli curl gnupg && \ | |
apt-key adv --fetch-keys "https://nginx.org/keys/nginx_signing.key" && \ | |
echo "deb http://nginx.org/packages/debian buster nginx" > /etc/apt/sources.list.d/nginx.list | |
RUN curl --silent --show-error --location --output /tmp/amazon-ssm-agent.deb "https://s3.us-east-1.amazonaws.com/amazon-ssm-us-east-1/latest/debian_amd64/amazon-ssm-agent.deb" && \ | |
dpkg -i /tmp/amazon-ssm-agent.deb |
server: | |
logfile: "" | |
# verbosity: 2 | |
username: "nobody" | |
interface: 0.0.0.0 | |
access-control: 0.0.0.0/0 allow | |
prefetch: yes | |
# include: "/opt/unbound/local.conf" | |
# include: "/opt/unbound/customize.conf" |