Skip to content

Instantly share code, notes, and snippets.

View winfamy's full-sized avatar

Grady Phillips winfamy

View GitHub Profile
!E1!DZvEVjUYw(pnxP3tdmY7y3pPrciKLrjatm51V(26sIbkc(gJnYUil3)iF2FNtvEP8UjP7zAnTAfa7A5uNLFNLQSxkVCXs7nouNvoHr43P7cjou8B7iUpUJUCQI2sBIVZkpYYvlTFXDdD3YPAduwsHR)6bsOlXFnb7rARG7SlWpiS4fD(lO10ITfUXJeFsOJhJacOK9msjY9VilNQlbF7GZAx)hxo1eAAyWl0DN5gswtDd8xAF5SBV63NnDXWRztXrAWIqN1pDl5WrQdRjJGr1X7jyeUK4S58qN9e71oWSpvEP92aFQn9n4x22xo8SzFLpgq3DCdxAp)6HFBYTlT3767U35qgDPOaeM76aFgTU3XLr9hcIC5K1IzZVEY5lyRpkFAyT8WZhIoU6Vc8fzdafgCK656NrfqFEji0BtxBmmUDQDSbTlTmMOxAp51dHKOOxCEBP9Qa)JrZw9NiZ)zY80v7W7wmBPTxWJU(7H268itz5zhVJK1bECnHWLNBAjjROQmqBG5affD9LB7d)X(XLNpqsXswZuvYuBGSPKjEhvy(G(OkjnqxXuvvvBGUPg)oaDfKqgmj6LXQRAsGCXz7t2hC9rAyvaLgSFUJpXJRe658gSyTjukQszV5q0yNikbK1GW8zsiDoq9ripzLZJmrgOYU)AYZeV5LKUz378s8QOdEUmljyCSt0GhW(Pw8Wlh)Ps8NQWNuHb91zB3grqJq(OW080GFec3nmICDqaf7AAhElPdscxC8XiGfmgLdtsf4WW91eBznCTF0NwEn8mXFtq4fHoVfLxFX1hyzG8fMP)tzKMthGzf0KGzY)Pmkh)L4eNJbwQVPJkFaKHb4pp6)0zKih6XqhkJwIwh6C4Q1Cl9CJxAVOiWsGh19ahAZXJUBKtOioNSEmyaVpYvP(VvKgNoB6eg41rxVn3clRiuFdg7nKW8KC21kpC5VY6JHrbHd9xVdSzGvJJhC5ian9LBbAEpEjXMS4TdaHmC6yae8(X3DRn8bxV8aOMtcx4s9
const {
SlashCommandBuilder,
ActionRowBuilder,
ComponentType,
MessageFlags,
createChannel,
ChannelType,
} = require("discord.js");
const { buildEventMenu } = require("./build-event-menu");
const { getEvents } = require("../../lib/raid-helper/get-events");
import os
from dotenv import load_dotenv
import requests
import json
from requests.auth import HTTPBasicAuth
import pyperclip
from functools import reduce
load_dotenv()

Vectra AI Problems

Initial Briefing

It's Code Red!

Its Saturday morning 3 am and your phone is ringing like a fire alarm. Turns out your organization experienced a major data breach and a large amount of confidential data, roughly 500MB, has been leaked on a public site.

The CISO wants you to run a thorough (and needless to say, a quick) investigation on this incident to find out how this happened. The data was found on "corporateleaks[.]com". You have 1 hour before the debrief meeting with the CISO and she wants answers. Use the best tool in your arsenal to gain as much insight as possible into this incident.

Type "Investigate" to get started with your investigation.

Initial Investigation

@winfamy
winfamy / decorationsForm.js
Created February 8, 2024 17:26
Decorations Form JS
/**
* @author 2d Lt Grady Phillips <grady.phillips.4@spaceforce.mil, grady@unyx.io>
* Pretty jank I won't lie. If you're here reading this code and have questions, feel free to reach out.
*/
var messages = {
"Meritorious Service Medal": {
PCS: {
closing: "The singularly distinctive accomplishments of %RANK% %NAME% reflect great credit upon %PRONOUN%self and the %BRANCH%."
},
@winfamy
winfamy / add-toteams.ps1
Last active January 9, 2024 21:13
adds members from distro list to a teams
$team = get-mgteam -Filter "startswith(displayname, 'S4S - All')"
$group = get-mggroup -Filter "startswith(displayname, 'S4S_All')"
$groupMembers = Get-MgGroupTransitiveMemberAsUser -GroupId $group.id -CountVariable GroupSearchCount -Sort "displayName" -ConsistencyLevel eventual -All
$teamMembers = Get-MgGroupTransitiveMemberAsUser -GroupId $team.id -CountVariable TeamSearchCount -Sort "displayName" -ConsistencyLevel eventual -All
$idsToAdd = (Compare-Object -ReferenceObject $teamMembers.id -DifferenceObject ($groupMembers.id) | where {$_.sideindicator -eq "=>"}).InputObject
foreach ($userid in $idsToAdd) {
new-mggroupmember -groupid $group.id -directoryobjectid $userid
@winfamy
winfamy / sum3.js
Created May 10, 2022 20:07
216. Combination Sum III
/**
* @param {number} k
* @param {number} n
* @return {number[][]}
*/
var combinationSum3 = function(k, n, prev = [], allowed = null) {
if (!allowed) {
allowed = [1,2,3,4,5,6,7,8,9]
}
@winfamy
winfamy / leetcode.js
Created May 9, 2022 19:18
17. Letter Combinations of a Phone Number
/**
* @param {string} digits
* @return {string[]}
*/
var letterCombinations = function(digits) {
if(digits.length == 0) return []
let map = {
"2": ["a", "b", "c"],
"3": ["d", "e", "f"],
import hashlib
import math
charset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
def convert_to_base62(x):
built_str = ""
if (x == 0):
return "0"
import numpy as np
from scipy.spatial.transform import Rotation
import rmsd
from catalog_var import catalog
def parse_file(filename):
entries = []
with open(filename, 'r') as f:
content = f.readlines()