This file contains 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
import { randomUUID } from "crypto"; | |
import { S3Client } from "@aws-sdk/client-s3"; | |
import { Upload } from "@aws-sdk/lib-storage"; | |
import { PassThrough } from "stream"; | |
const s3Client = new S3Client({}); | |
(async () => { | |
const passThrough = new PassThrough(); | |
for (const person of ["person-1", "person-2", "person-3"]) { |
This file contains 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
export interface ClientResponse { | |
statusCode: number, | |
headers: Headers, | |
body: any | |
} | |
export const Methods = { | |
GET: "GET", | |
POST: "POST", | |
PUT: "PUT", |
This file contains 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
<Project Sdk="Microsoft.NET.Sdk.Worker"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>net7.0</TargetFramework> | |
<ImplicitUsings>enable</ImplicitUsings> | |
<Nullable>enable</Nullable> | |
<PublishSingleFile>true</PublishSingleFile> | |
<SelfContained>true</SelfContained> | |
<PublishTrimmed>true</PublishTrimmed> |
This file contains 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
# citing sources: https://trac.ffmpeg.org/wiki/CompilationGuide/Centos | |
# citing sources: https://gist.github.com/felipecsl/cecfece3075312174e92592d4231e971 | |
sudo yum install autoconf automake bzip2 bzip2-devel cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel -y | |
mkdir ~/ffmpeg_sources | |
# nasm | |
cd ~/ffmpeg_sources | |
curl -O -L https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.bz2 | |
tar xjvf nasm-2.14.02.tar.bz2 |
This file contains 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
#!/bin/sh | |
random_string() { | |
STR_LENGTH=${1:-20} | |
INCLUDE_SYMBOLS=${2:-0} | |
FILTER='A-Za-z0-9' | |
SYMBOLS=${3:-'!@#%^&*'} | |
if [ $INCLUDE_SYMBOLS -eq 0 ]; then | |
FILTER="$FILTER$SYMBOLS" | |
fi |
This file contains 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
Write-Host "Install command has been executed. Nessus Agent will be installed" | |
$serviceName = 'Tenable Nessus Agent' | |
$nameE = "Enable Nessus Agent" | |
$operationE = "Starting Nessus Agent" | |
$messageE = "Enable Nessus agent" | |
function DownloadFile { | |
Param( | |
[Parameter(Mandatory = $True)] | |
[hashtable]$Params, |
This file contains 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
import boto3 | |
from botocore.exceptions import ClientError | |
import json | |
from pprint import pprint | |
from tenable.dl import Downloads | |
from zipfile import ZipFile | |
import re | |
import hashlib | |
import logging |
This file contains 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
FROM amazonlinux:2.0.20210721.2 | |
RUN touch $HOME/.bashrc | |
RUN yum -y update | |
RUN yum -y install tar gzip unzip | |
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \ | |
&& unzip awscliv2.zip \ |
This file contains 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
#!/bin/bash | |
UBUNTU_64='13147' | |
UBUNTU_64_NAME='NessusAgent-8.3.0-ubuntu1110_amd64.deb' | |
WHICH_OS=$(awk -F= '$1=="ID" { print $2 ;}' /etc/os-release) | |
WHICH_CHIP=$(uname -m) | |
if [ "$WHICH_OS" = "ubuntu" ]; then | |
echo 'using ubuntu' | |
curl -v https://www.tenable.com/downloads/api/v1/public/pages/nessus-agents/downloads/$UBUNTU_64/download?i_agree_to_tenable_license_agreement=true --output $UBUNTU_64_NAME | |
dpkg -i $UBUNTU_64_NAME |
This file contains 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
def orchestrator_function(context: df.DurableOrchestrationContext): | |
logging.info('starting orchestrator') | |
# Persistent state stored with a Durable Entity | |
entityId = df.EntityId("TenableExportJob", "currentJobInfo") | |
state = yield context.call_entity(entityId, "get") | |
state = json.loads(state) | |
logging.info('got current state') | |
logging.info(state) |
NewerOlder