Skip to content

Instantly share code, notes, and snippets.

View daCyuubi's full-sized avatar
😛
Programming. Isn't that what you're suppose to do as a programmer?

Cyuubi daCyuubi

😛
Programming. Isn't that what you're suppose to do as a programmer?
  • United States
View GitHub Profile

Keybase proof

I hereby claim:

  • I am qwirk on github.
  • I am qwirk (https://keybase.io/qwirk) on keybase.
  • I have a public key whose fingerprint is 1DE5 D35F FC06 82F7 867B A181 E014 6711 9992 CBCC

To claim this, I am signing this object:

<?php
function prudp_calculate_checksum($hex) {
$hex_dump = str_split($hex, 2); // split hex string into an array every 2 parts
var_dump($hex_dump);
$checksum_result = 1; // 1 because the final output of the checksum is a bit off
foreach ($hex_dump as &$value) { // foreach hex stuff
$checksum_result += hexdec($value); // sum up of all the hex in decimal
}
$checksum_result = $checksum_result % 256; // mod by 256, this is where the magic begins
return dechex($checksum_result); // this should probably be hex?
@daCyuubi
daCyuubi / taskmgr.c
Created July 16, 2018 06:05
shitty threading clone
#include "taskmgr.h"
void taskmgr_UpdateCurrentTime(int Time)
{
//set taskmgr current time
taskmgr_Time = Time;
}
int taskmgr_RegisterTask(int ExecuteAt, void* Function)
{

Keybase proof

I hereby claim:

  • I am cyuubi on github.
  • I am cyuubi (https://keybase.io/cyuubi) on keybase.
  • I have a public key ASB9KkiLybnjuDD9voFbQwZEAi-RrjorjLltSq9NKLXRYwo

To claim this, I am signing this object:

@daCyuubi
daCyuubi / CustomRules.js
Last active June 3, 2024 19:06
Fortnite 1.8 custom rules for Fiddler (outdated)
import System;
import System.Web;
import System.Windows.Forms;
import Fiddler;
class Handlers
{
static var SquadPlayground = false;
static var RegionOverride = "NAE";
@daCyuubi
daCyuubi / BetterBuffer.js
Created March 1, 2019 18:20
Node.js buffers which don't suck ass.
const BigIntBuffer = require('bigint-buffer');
function BetterBuffer() {
this.buffer = Buffer.alloc(0);
this.reset();
};
BetterBuffer.prototype.reset = function() {
if (this.buffer.length != 0)
this.buffer = Buffer.alloc(0);
// Class
class_OsuMain : #=zBRYjX1sAnSp374hhdQ== // osu
class_pWebRequest : #=z$EsbtAnd5xviPAfNWFHq4pw= // osu_common.Helpers
// Field
field_pWebRequest_url : #=zpJXEsgU=
// Method
method_OsuMain_FullPath : #=znpskdrI4O6kK
method_OsuMain_Filename : #=zNLZjf3mRdacx
@daCyuubi
daCyuubi / YEEHAW.md
Last active April 7, 2019 13:33
How to hash Nintendo Network passwords
@daCyuubi
daCyuubi / NNHash.cs
Created April 7, 2019 13:32
Nintendo Network password hash function in C#
public string HashPassword(int Pid, string Password)
{
MemoryStream Stream = new MemoryStream();
BinaryWriter Writer = new BinaryWriter(Stream);
Writer.Write(Pid);
Writer.Write(new byte[] { 0x02, 0x65, 0x43, 0x46 }); // Salt
Writer.Write(Encoding.ASCII.GetBytes(Password));
byte[] Hash = Sha256.ComputeHash(Stream.ToArray());
// Class
class_OsuMain : #=zwUcvxk6E$YaBc9Oqwg== // osu
class_pWebRequest : #=zawBUTzzVo8MlrU_OpuOIvuM= // osu_common.Helpers
// Field
field_pWebRequest_url : #=zeRKBP5w=
// Method
method_OsuMain_FullPath : #=zZsp5QLX1vgJj
method_OsuMain_Filename : #=zGiNP_NgMc7Rh