Skip to content

Instantly share code, notes, and snippets.

View Saket-Upadhyay's full-sized avatar
🔬
Trying to understand computers.

Saket Upadhyay Saket-Upadhyay

🔬
Trying to understand computers.
View GitHub Profile
@Saket-Upadhyay
Saket-Upadhyay / DDoSim.cc
Last active August 5, 2020 15:44
For NS3 DDoS article
/*
* LICENSE : GNU General Public License v3.0 (https://github.com/Saket-Upadhyay/ns3-cybersecurity-simulations/blob/master/LICENSE)
* REPOSITORY : https://github.com/Saket-Upadhyay/ns3-cybersecurity-simulations
* =================================================================================
*
* In this we follow the following setup / node placement
*
* (n1)
* \
* \
@Saket-Upadhyay
Saket-Upadhyay / MainActivity.java
Created August 18, 2020 10:27
SCTF ANDROID CHALLENGE
package com.sctf2020.vault101;
import a.b.k.e;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.graphics.drawable.AnimatedVectorDrawable;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
@Saket-Upadhyay
Saket-Upadhyay / b.java
Last active August 18, 2020 11:35
SCTF ANDROID CHALLENGE
public interface b extends IInterface {
public static abstract class a extends Binder implements b {
public static b b(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.sctf2020.vault101.IVault");
return (queryLocalInterface == null || !(queryLocalInterface instanceof b)) ? new C0039a(iBinder) : (b) queryLocalInterface;
}
package b.c.a;
public class a {
/* renamed from: a reason: collision with root package name */
public static byte[] f821a;
public static byte[] a(byte[] bArr) {
Class<a> cls = a.class;
try {
package b.c.a;
public class c {
/* renamed from: a reason: collision with root package name */
public static int f823a;
public static char a(char c, int i) {
return (char) (c & ((1 << i) ^ 65535));
}
@Saket-Upadhyay
Saket-Upadhyay / SOLUTION.java
Last active August 19, 2020 05:59
SCTF ANDROID CHAL SOL 1
package com.x64mayhem;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Array;
@Saket-Upadhyay
Saket-Upadhyay / a.java
Last active August 18, 2020 11:50
SCTF ANDROID CHAL SOL 1
package com.x64mayhem;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
@Saket-Upadhyay
Saket-Upadhyay / GeneticStringEvolution.cpp
Created October 2, 2020 03:54
Nature Inspired Genetic Mutation based "String Evolution" Algorithm
/*
MIT License
-----------
Copyright (c) 2020 Saket Upadhyay
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell

Keybase proof

I hereby claim:

  • I am saket-upadhyay on github.
  • I am saketupadhyay (https://keybase.io/saketupadhyay) on keybase.
  • I have a public key ASBSn_xdicrPmrVcBwiDTqMihM0_f0OczKmNYKeilfi2mwo

To claim this, I am signing this object:

@Saket-Upadhyay
Saket-Upadhyay / 95oemCheck.c
Last active May 13, 2021 15:48
Windows95 OEM key check code.
// Credits and Thanks to Thomas Roth (https://github.com/nezza)
undefined2 __stdcall16far check_oem_key(char *key,int len)
{
int key_length;
int is_oem;
int first_3_digits_int;
int second_2_digits_int;
undefined2 check_result;
int i;