Skip to content

Instantly share code, notes, and snippets.

@alastorid
alastorid / New MS Teams Profile.cmd
Last active June 7, 2023 07:08 — forked from DanielSmon/New MS Teams Profile.cmd
For running multiple MS Teams accounts side by side. Save this with the name of the MS Teams profile you wish to use. When launched, many folders plus junctions will be created in your user profile. And all running team.exe will be killed to be respawned. See https://danielsmon.com/2020/04/02/multiple-ms-teams-accounts-on-the-desktop/.
@ECHO OFF
echo don't try this at home
SET SHOULD_PAUSE=
REM kill them all !!!
wmic process where name="teams.exe" call terminate || taskkill /f /im teams.exe || echo o.O
REM Uses the file name as the profile name
call :teamsMC "%~n0"
call :teamsMC "default"
@alastorid
alastorid / wmic_cmds.txt
Last active December 29, 2022 07:17 — forked from xorrior/wmic_cmds.txt
Useful Wmic queries for host and domain enumeration
Host Enumeration:
--- OS Specifics ---
wmic os LIST Full (* To obtain the OS Name, use the "caption" property)
wmic computersystem LIST full
--- Anti-Virus ---
wmic /namespace:\\root\securitycenter2 path antivirusproduct
@alastorid
alastorid / CPUKiller.txt
Created January 19, 2022 08:49 — forked from vors/CPUKiller.txt
CPUKiller PowerShell transcript
>> Register-PSSessionConfiguration -SessionType Workflow -Name CPUKiller -SessionTypeOption (New-PSWorkflowExecutionOption -MaxActivityProcesses 100)
114 [C:\windows\system32]
>> $s = New-PSSession -ConfigurationName CPUKiller
115 [C:\windows\system32]
>> icm $s {
>>> workflow Test-Myworkflow {
>>> param
>>> (
@alastorid
alastorid / getedgeII.ps1
Last active December 14, 2020 09:29 — forked from shuax/getedge.py
You may need a large screen to view the full URL
$what_you_like = @{}
foreach($processor_arch in @("x64","x86"))
{
foreach($channel in @("stable", "Beta", "Canary", "Dev"))
{
$versionObj = $null
$RequestArg = @{
TimeoutSec = 1800
Uri = "https://msedge.api.cdp.microsoft.com/api/v1.1/contents/Browser/namespaces/Default/names/msedge-{0}-win-{1}/versions/latest?action=select" -f ($channel, $processor_arch)
Method = "POST"
@alastorid
alastorid / pdbdump.c
Last active July 11, 2020 05:21 — forked from mridgers/pdbdump.c
Small tool to give you the result of ? nt!MiValidateSectionSigningPolicy - nt!PsInitialSystemProcess
//------------------------------------------------------------------------------
// pdbdump.c - dump symbols from .pdb and executable files (public domain).
// - to compile; cl.exe /Ox /Zi pdbdump.c
// -
// - Martin Ridgers, pdbdump 'at' fireproofgravy.co.uk
//------------------------------------------------------------------------------
#include <stdio.h>
#include <Windows.h>
#include <DbgHelp.h>
Name: <%= name %>
Version: <%= version %>
Release: 1%{?dist}
Group: <%= group %>
Summary: <%= summary %>
License: <%= license %>
Packager: <%= author %> <<%= email %>>
Requires: <%= requires %>
BuildRequires: <%= build_requires %>
URL: <%= url %>
@alastorid
alastorid / diskripper.sh
Created November 24, 2017 02:15 — forked from tacofumi/diskripper.sh
This script rips DVD/Blu-ray using makemkvcon. Use udev to invoke this script to auto-rip when disk is inserted. Some variables such as length of string to trim in order to get the title of movie may vary depending on your environment.
#!/bin/bash
{
echo $(date)
echo ">>>Disk found"
echo ">>>Setting the title..."
title=$(makemkvcon -r info)
title=`echo "$title" | grep "DRV:0\+"`
title=${title:53}
@alastorid
alastorid / gettimeofday.cpp
Created October 4, 2017 16:36 — forked from fujin/gettimeofday.cpp
LD_PRELOAD gettimeofday linux speedhack
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <dlfcn.h>
#include <stdio.h>
static timeval * timezero = 0;
typedef int (*go)(timeval *tv, timezone *tz);