Skip to content

Instantly share code, notes, and snippets.

@kyapp69
kyapp69 / xor-ddos-decryption.py
Created September 6, 2018 09:52 — forked from christophetd/xor-ddos-decryption.py
Tool to decrypt configuration values and network communications of malwares of the Xor Ddos family
import binascii
import itertools
# XORs two byte strings together
def xor_bytes(bytes1, bytes2):
return [ chr(ord(a) ^ b) for (a, b) in zip(bytes1, bytes2) ]
# XORs a ciphertext with the malware's hardcoded key, and repeats it until it's long enough to match the ciphertext length.
def decrypt(cipher, key_hex = 'BB2FA36AAA9541F0'):
key_bytes = [ ord(a) for a in key_hex ]
@kyapp69
kyapp69 / Embedded_HTTP_Header.txt
Created September 6, 2018 10:00 — forked from Morketh/Embedded_HTTP_Header.txt
XORDDOS Generation 2
^@/etc/init.d/%s^@/etc/cron.hourly/gcc.sh^@/etc/rc%d.d/S90%s^@/etc/rc.d/rc%d.d/S90%s^@--add^@chkconfig^@defaults^@update-rc.d^@^@sed -i '/\/etc\/cron.hourly$
Accept-Language: zh-cn
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; TencentTraveler ; .NET CLR 1.1.4322)
^@Connection: Keep-Alive
^@http://^@^@POST %s HTTP/1.1
%sHost: %s
Content-Type: application/x-www-form-urlencoded
Content-Length: %d
%s%s^@GET %s HTTP/1.1
@kyapp69
kyapp69 / Texture2DArraySurface.Shader
Created January 2, 2020 03:18 — forked from unitycoder/Texture2DArraySurface.Shader
GPU Instancing + Texture2DArray
Shader "Custom/Texture2DArraySurfaceShader"
{
Properties
{
_Textures("Textures", 2DArray) = "" {}
}
SubShader
{
Tags { "RenderType"="Opaque" }
@kyapp69
kyapp69 / SkinnedMeshCombiner.cs
Created January 23, 2020 01:37 — forked from radiatoryang/SkinnedMeshCombiner.cs
example code for combining SkinnedMeshRenderers at runtime (for optimization reasons usually), which I use in my games for Mixamo Fuse models specifically... PLEASE DON'T ASK ME FOR HELP WITH THIS, this is more for learning purposes, and it's not really an easy-to-use Asset Store thing? also I have a lot of weird hacks specific for my uses... ag…
// this code is under MIT License, by Robert Yang + others (credits in comments)
// a lot of this is based on http://wiki.unity3d.com/index.php?title=SkinnedMeshCombiner
// but I removed the atlasing stuff because I don't need it
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
@kyapp69
kyapp69 / SkinnedMeshObjectPreviewExample.cs
Created January 23, 2020 01:39 — forked from radiatoryang/SkinnedMeshObjectPreviewExample.cs
An example of a custom ObjectPreview rendering out a SkinnedMesh for Unity Editor C#... I used it for facial expressions and blendshape editing, you might want to use it for something else. I hereby place it under MIT License. Full write-up here: http://www.blog.radiator.debacle.us/2016/06/working-with-custom-objectpreviews-and.html
using UnityEngine;
using UnityEditor;
using System;
using System.Collections;
[CustomPreview(typeof(YourCustomScriptableObject))] // THIS IS VERY IMPORTANT, this is so the editor knows what this is supposed to be previewing at all
public class SkinnedMeshObjectPreviewExample : ObjectPreview {
PreviewRenderUtility m_PreviewUtility;
@kyapp69
kyapp69 / DualQuaternion.cs
Created February 17, 2020 07:54 — forked from maxattack/DualQuaternion.cs
Dual Quaternion Sample Implementation for Unity3D
using UnityEngine;
/*
Dual-Quaternions are an alternate encoding for rigid transforms (translation + rotation),
with the special property that linear combinations will "arc" the translation in response
to rotation, producing a skinning interpolation that prevents the kind of collapsing you
get from simple linear interpolation of translations in their native coordinates.
Copyright (c) 2018 Max Kaufmann
@kyapp69
kyapp69 / Half.cs
Created February 18, 2020 09:28 — forked from vermorel/Half.cs
C# Half-precision data type
/// ================ Half.cs ====================
/// The code is free to use for any reason without any restrictions.
/// Ladislav Lang (2009), Joannes Vermorel (2017)
using System;
using System.Diagnostics;
using System.Globalization;
namespace SystemHalf
{
@kyapp69
kyapp69 / UniversalPipelineTemplateShader.shader
Created April 22, 2020 04:49 — forked from phi-lira/UniversalPipelineTemplateShader.shader
Template shader to use as guide to create Universal Pipeline ready shaders. This shader works with Universal Render Pipeline 7.1.x and above.
// When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME!
// However, if you want to author shaders in shading language you can use this teamplate as a base.
// Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader.
// This shader works with URP 7.1.x and above
Shader "Universal Render Pipeline/Custom/Physically Based Example"
{
Properties
{
// Specular vs Metallic workflow
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0
@kyapp69
kyapp69 / LightweightLightSorting.cs
Created April 22, 2020 04:50 — forked from phi-lira/LightweightLightSorting.cs
Old example of LWRP that sorted lights using the LightIndexMap
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
#if UNITY_EDITOR
using UnityEditor.Experimental.Rendering.LightweightPipeline;
#endif
using UnityEngine.Experimental.GlobalIllumination;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;
@kyapp69
kyapp69 / CustomRenderPassFeature.cs
Created April 22, 2020 04:50 — forked from phi-lira/CustomRenderPassFeature.cs
Custom Render Feature script template to be added to a LWRP Renderer. Drag 'n Drop this script to your project, write the desired rendering code. It now it's available to be added to a LWRP renderer by clicking on the + icon under renderer features in the Renderer inspector.
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.LWRP;
public class CustomRenderPassFeature : ScriptableRendererFeature
{
class CustomRenderPass : ScriptableRenderPass
{
// This method is called before executing the render pass.
// It can be used to configure render targets and their clear state. Also to create temporary render target textures.