Skip to content

Instantly share code, notes, and snippets.

View Neio's full-sized avatar

Neio Zhou Neio

  • Cyberark
  • San Francisco Bay Area
View GitHub Profile
@Neio
Neio / SigningAssembly.md
Created June 1, 2024 01:24 — forked from cezarypiatek/SigningAssembly.md
Signing assembly
  1. Generate SNK file (you need to run console as admin)
& "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\sn.exe" -k ./MyKeys.snk
  1. Converting SNK file to base64 text file using PowerShell
@Neio
Neio / pf.xml
Last active June 1, 2018 05:20
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Gather action="http://neiodev.serveo.net/security/TwilioPhoneChallengeCompleted" timeout="45" finishOnKey="#">
<Say voice="woman">This is Centrify's Multifactor authentication. Please press any key followed by pound sign to complete your authentication</Say>
</Gather>
<!-- Will only come here after timeout expires -->
<Say voice="woman">We didn't receive any input. Goodbye!</Say>
<Hangup/>
</Response>
@Neio
Neio / testcancel.go
Last active April 18, 2018 03:00
[GO] Run with cancellation
package main
import (
"context"
"fmt"
"time"
)
func main() {
ctx, cancel := context.WithCancel(context.Background())
class CipherHelper
{
[DllImport("Bcrypt.dll", CharSet = CharSet.Unicode)]
static extern uint BCryptEnumContextFunctions(uint dwTable, string pszContext, uint dwInterface, ref uint pcbBuffer, ref IntPtr ppBuffer);
[DllImport("Bcrypt.dll")]
static extern void BCryptFreeBuffer(IntPtr pvBuffer);
[StructLayout(LayoutKind.Sequential)]
struct CRYPT_CONTEXT_FUNCTIONS
@Neio
Neio / proxy-filter1.xslt
Last active January 12, 2017 15:51
proxy-filter1
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="no"/>
<xsl:template match="/">[<xsl:for-each select="//div[@class='table-container']/table[@class='sortable']/tbody/tr">"<xsl:value-of select="normalize-space(td[1])"/>:<xsl:value-of select="normalize-space(td[2])"/>",</xsl:for-each>""]</xsl:template>
</xsl:stylesheet>
@Neio
Neio / OsVersion.cs
Created June 2, 2016 09:27 — forked from emoacht/OsVersion.cs
A partial wrapper class of Restart Manager API
namespace RestartManagerWrapper
{
using System;
public static class OsVersion
{
private static readonly Version ver = Environment.OSVersion.Version;
/// <summary>
/// Whether OS is Windows Vista or newer
@Neio
Neio / urls.js
Last active January 14, 2017 16:25
China url filter
{"filters": [
// Test IP
"http://*.ip138.com*",
// Just changing headers of these URLs will be sufficient.
"http://v.api.hunantv.com/*",
"http://live.gslb.letv.com/*",
"http://ac.qq.com/*",
"http://*.ssports.com/*",
"http://ssports.com/*",
from Crypto.Cipher import AES
from StringIO import StringIO
from bplist import BPlistReader #https://github.com/farcaller/bplist-python
import M2Crypto
import gzip
import struct
def xor_strings(s, key):
res = ""
for i in xrange(len(s)):
from Crypto.Cipher import AES
from StringIO import StringIO
from bplist import BPlistReader #https://github.com/farcaller/bplist-python
import M2Crypto
import gzip
import struct
def xor_strings(s, key):
res = ""
for i in xrange(len(s)):