This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"syscall" | |
"unsafe" | |
) | |
var ( | |
kernel32 = syscall.NewLazyDLL("kernel32.dll") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"fmt" | |
"os/exec" | |
"strings" | |
) | |
// PowerShell struct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[string]$randNo = Get-Random | |
$tempFolder = $($env:temp)+"\Logs"+"-"+$randNo+"-$(Get-Date -UFormat "%m%d%Y%H%M%S")" | |
New-Item -Path $tempFolder -ItemType Directory | |
$eventLogs = "event-logs" | |
#Copy event logs | |
New-Item -Path "$($tempFolder)\$($eventLogs)" -ItemType Directory | |
Copy-Item -Path "$env:SystemRoot\System32\Winevt\Logs\*" -Destination "$($tempFolder)\$($eventLogs)" -Recurse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Tests http mirrors of cygwin | |
""" | |
import random | |
import time | |
from urllib.request import urlopen | |
import sys | |
__author__ = 'Dmitry Sidorenko' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import fnmatch | |
def recursive_glob(rootdir='.', pattern='*'): | |
"""Search recursively for files matching a specified pattern. | |
Adapted from http://stackoverflow.com/questions/2186525/use-a-glob-to-find-files-recursively-in-python | |
""" | |
matches = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem . -Recurse -Filter "*.inf" | ForEach-Object { PNPUtil.exe /add-driver $_.FullName /install } |