Skip to content

Instantly share code, notes, and snippets.

View UlyssesWu's full-sized avatar
💤
working til death

Ulysses UlyssesWu

💤
working til death
View GitHub Profile
About Locale Emulator and the concept of locale emulation itself

I came across this program a while ago myself, and was just as amazed by its premise. I looked at the source code, and saw lots of involved low-level NT kernel voodoo I don't understand, instead of the code I tend to use to solve this kind of problem. Truly, this must be an amazing piece of software, I thought... until I tested it with th135 and noticed that it rendered the Music Room text as exactly the same garbage you see when running the game without any locale emulation. Yeah, it did display 東方心綺楼 in the title bar and correctly referenced the 御首頂戴帳 folder, but overall I'd consider this to be a worse alternative to AppLocale.

So I did some research, and it turns out that this thing merely implements the bare minimum of functionality necessary (namely, changing the system ANSI code page in memory) to purportedly keep games from crashing. Anything just a bit more involved

@UlyssesWu
UlyssesWu / eternalblue8_exploit.py
Created May 25, 2017 06:15 — forked from worawit/eternalblue8_exploit.py
Eternalblue exploit for Windows 8/2012
#!/usr/bin/python
from impacket import smb
from struct import pack
import os
import sys
import socket
'''
EternalBlue exploit for Windows 8 and 2012 by sleepya
The exploit might FAIL and CRASH a target system (depended on what is overwritten)
@UlyssesWu
UlyssesWu / eternalblue7_exploit.py
Created May 25, 2017 06:15 — forked from worawit/eternalblue7_exploit.py
Eternalblue exploit for Windows 7/2008
#!/usr/bin/python
from impacket import smb
from struct import pack
import os
import sys
import socket
'''
EternalBlue exploit for Windows 7/2008 by sleepya
The exploit might FAIL and CRASH a target system (depended on what is overwritten)
@UlyssesWu
UlyssesWu / Inject.cpp
Created January 24, 2018 02:04 — forked from capntrips/Inject.cpp
Unity 2017.1.0p5 type information
// A quick and dirty DLL injector
// This method relies on static linkage and the fact that kernel32 doesn't move
// Compile with the same bitness as the target and the dll.
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <Psapi.h>
#include <stdio.h>
int GetPid(char *modName)
{
@UlyssesWu
UlyssesWu / test.tjs
Created September 10, 2018 09:43 — forked from rednaxelafx/test.tjs
TJS2 examples. Just a reminder. docs: http://devdoc.kikyou.info/tvp/docs/tjs2doc/contents/
class Foo {
var val;
property p {
getter {
return val;
}
setter(v) {
this.val = v;
}
@UlyssesWu
UlyssesWu / Liquid.shader
Created December 7, 2018 05:33
Liquid shader
//https://twitter.com/minionsart/status/986374665399685121
Shader "Unlit/SpecialFX/Liquid"
{
Properties
{
_Tint ("Tint", Color) = (1,1,1,1)
_MainTex ("Texture", 2D) = "white" {}
_FillAmount ("Fill Amount", Range(-10,10)) = 0.0
[HideInInspector] _WobbleX ("WobbleX", Range(-1,1)) = 0.0
@UlyssesWu
UlyssesWu / Privacy Policy.md
Created February 17, 2020 18:17
Privacy Policy

Privacy Policy of NightCorer

I, as UlyssesWu (wdwxy12345@gmail.com), do not collect any data from NightCorer users. NightCorer is a complete offline software.

@UlyssesWu
UlyssesWu / xamarinandroidbindings.md
Created November 20, 2020 15:08 — forked from JonDouglas/xamarinandroidbindings.md
Xamarin Android Bindings Troubleshooting

Approaching a Xamarin.Android Bindings Case

1. Investigation

One of the best ways to investigate a problematic Xamarin.Android Binding is to first ensure you have the proper tooling available:

@UlyssesWu
UlyssesWu / xamarinandroidbindings.md
Created November 20, 2020 15:08 — forked from JonDouglas/xamarinandroidbindings.md
Xamarin Android Bindings Troubleshooting

Approaching a Xamarin.Android Bindings Case

1. Investigation

One of the best ways to investigate a problematic Xamarin.Android Binding is to first ensure you have the proper tooling available:

public static string FormatAsHex(ReadOnlySpan<byte> data, int lineWidth = 16, int byteWidth = 1)
{
byte ReplaceControlCharacterWithDot(byte character) => character < 31 || character >= 127 ? (byte)46 /* dot */ : character;
byte[] ReplaceControlCharactersWithDots(byte[] characters) => characters.Select(ReplaceControlCharacterWithDot).ToArray();
IEnumerable<BigInteger> Chunk(IReadOnlyList<byte> source, int size) => source.Select((item, index) => source.Skip(size * index).Take(size).ToArray()).TakeWhile(bucket => bucket.Any()).Select(e => new BigInteger(e));
var result = new StringBuilder();
for(var pos = 0; pos < data.Length;)
{
var line = data.Slice(pos, Math.Min(lineWidth * byteWidth, data.Length - pos)).ToArray();