Skip to content

Instantly share code, notes, and snippets.

@cicero343
cicero343 / getsessionkey.py
Last active August 19, 2024 21:14 — forked from khr0x40sh/random_session_key_calc.py
Get Session Key for encrypted traffic in PCAP (Interactive)
#!/usr/bin/env python3
"""
This is a Python3 improved/interactive version of the script made by khr0x40sh for decrypting encrypted session keys in a PCAP file to view encrypted traffic.
If you don't specify the parameters, it should ask you for the parameter values.
It will check to see if pycryptodomex is installed, and if not, it will install it.
It can also accept NTML hashes directly as well as passwords.
@cicero343
cicero343 / MacPopUp.sh
Created July 19, 2024 15:29
Mac Notification PopUp
#!/bin/bash
# This script contains an if function which will open the Software Update section on the user's Mac when they select OK, please feel free to remove or change this as you wish.
# Function to display the warning message using AppleScript
display_warning() {
local window_title="<WINDOW TITLE HERE>"
osascript -e 'display dialog "<YOUR TEXT HERE>" with icon POSIX file "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AppleTraceFile.icns" buttons {"OK", "Cancel"} default button "OK" with title "'"$window_title"'"' -e 'button returned of result' 2>/dev/null
}
@cicero343
cicero343 / ListMSTeamsNumbers.ps1
Created July 19, 2024 15:12
Export CSV file of all assigned MS Teams phone numbers
# Connect to Microsoft Teams PowerShell module
Import-Module MicrosoftTeams
# Connect to Microsoft Teams
Connect-MicrosoftTeams
# Get a list of all the users who currently have Teams phone numbers assigned
$phoneNumber = Get-csonlineuser | where-object { $_.LineURI -notlike $null } | select UserPrincipalName, LineURI
# Create a CSV file with these phone numbers
@cicero343
cicero343 / PrintDisk.sh
Last active July 14, 2024 06:30
Print Available Disk Space (Linux)
#!/bin/bash
total=$(df -h /dev/sda5 --output=size | tail -1)
used=$(df -h /dev/sda5 --output=used,pcent | tail -1)
available=$(df -h /dev/sda5 --output=avail | tail -1)
echo "Total Disk Space: $total"
echo "Space Used: $used"
@cicero343
cicero343 / SelectionBox.ps1
Created July 14, 2024 05:48
PowerShell Selection Box
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
$form = New-Object System.Windows.Forms.Form
$form.Text = 'Select a Computer'
$form.Size = New-Object System.Drawing.Size(300,200)
$form.StartPosition = 'CenterScreen'
$okButton = New-Object System.Windows.Forms.Button
$okButton.Location = New-Object System.Drawing.Point(75,120)