Skip to content

Instantly share code, notes, and snippets.

View dcgithub's full-sized avatar
💭
for those about to rock!..

dcgithub

💭
for those about to rock!..
  • None
  • Brisbane
View GitHub Profile
@Minionguyjpro
Minionguyjpro / OS.md
Created February 17, 2023 17:59
Get the OS in Windows batch

You can get the OS with the following script:

@ECHO OFF
echo You are using %OS%!
@paulirish
paulirish / log-all-mutations.js
Created January 25, 2023 22:44
Log all DOM mutations to console
// Log all DOM mutations to console.
// Modern interpretation of https://github.com/kdzwinel/DOMListenerExtension
observer = new MutationObserver(onMutation);
observerSettings = {
subtree: true,
childList: true,
attributes: true,
attributeOldValue: true,
function Disable-Indexing {
Param($Drive)
$obj = Get-WmiObject -Class Win32_Volume -Filter "DriveLetter='$Drive'"
$indexing = $obj.IndexingEnabled
if("$indexing" -eq $True){
write-host "Disabling indexing of drive $Drive"
$obj | Set-WmiInstance -Arguments @{IndexingEnabled=$False} | Out-Null
}
}
function Get-XmlFileTreeAppend
{
param(
[Parameter(ParameterSetName='Path', Mandatory=$true, Position=0, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)]
[string[]]
${Path},
[Parameter(ParameterSetName='LiteralPath', Mandatory=$true, ValueFromPipelineByPropertyName=$true)]
[Alias('PSPath')]
[string[]]
@Placidina
Placidina / gist:3018ac3e0a5a8166d02f97f92dbee4a0
Last active May 30, 2023 14:08
WOTLK - Warrior Protection Macros
#showtooltip
/castsequence reset=1 Devastar, Golpe Heroico
/cast Devastar
/startattack
#showtooltip
/castsequence reset=2 Escudada, Golpe Heroico
/startattack
#showtooltip
@u1f992
u1f992 / getProcessID.js
Last active April 22, 2023 05:34
実行中のプロセスIDを取得するJScript
/**
* JSON polyfill
* https://www.bugbugnow.net/2018/05/wshjscriptjson.html
*/
var global = Function('return this')();
if (!global.JSON) {
global.JSON = {
parse: function (sJSON) { return eval('(' + sJSON + ')'); },
stringify: (function () {
var toString = Object.prototype.toString;
@OlivierLaflamme
OlivierLaflamme / calls.cs
Last active April 26, 2023 04:16
C# code that sets up an x64 syscall stub as a byte array, allocate that stub into memory, replace the syscall ID with a user-defined one, create a delegate for the stub, and then execute the syscall
using System;
using System.Runtime.InteropServices;
namespace SyscallStub
{
// Define the syscall stub as a byte array
static readonly byte[] syscallStub = new byte[] {
0x48, 0x31, 0xc0, // xor rax, rax
0x48, 0xbb, 0x01, 0x00, 0x00, 0x00, 0x00, // mov rbx, user-defined syscall ID
0x0f, 0x05 // syscall
@hirman74
hirman74 / walkerMinute.js
Last active September 13, 2023 04:39
Per Minute SNMPwalk
var IPHosts = ["192.168.13.128"];
var cmdSNMP = '.\\bin\\snmpwalk.exe -v 2c -c public -r 2 -t 1 -Ovqs -M .\\UPSonlyMIBS\\ ';
var SNMPBranch = ['.1.3.6.1.2.1.1.3'];
//run cscript snmpPoller_007.js
function returnMinutesDate () {
var today = new Date();
return (today.getFullYear() + "" + (today.getMonth()+1) + "" + today.getDate() + "" + today.getHours() + "" + today.getMinutes())
}
// ==UserScript==
// @name @chaoticvibing Twitter Blue Nerd - twitter.com
// @namespace Violentmonkey Scripts
// @match *://*.twitter.com/*
// @match *://*.x.com/*
// @grant none
// @version 1.9.2
// @author @chaoticvibing - GH @busybox11
// @description 11/9/2022, 11:45:28 PM
// @updateURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw
@albertzsigovits
albertzsigovits / wscript.txt
Last active May 4, 2023 14:17
Suspicious keywords in wscript/cscript scripts
ActiveXObject
ActiveXObject("WScript.Shell")).Run(
WScript.Shell
.Run(
Document.Open()
shell.run(
WinExec
DownloadToFile(
New-Object -COMObject
RunProgram="