Skip to content

Instantly share code, notes, and snippets.

View gubed's full-sized avatar

debug gubed

View GitHub Profile
/// <summary>
/// Name: Cloudflare Bypass
/// Author: debug
/// About: Creates a webclient that will bypass Cloudflare bot protection
/// Date: 6/10/16
/// Credit: sizzuz
/// NOTE: A few minor things have been broken to prevent leeching. Thanks
/// </summary>
class CloudflareBypass
{
''' <summary>
''' Name: Cloudflare Bypass
''' Author: debug
''' About: Creates a webclient that will bypass Cloudflare bot protection
''' Date: 6/10/16
''' Credit: sizzuz
''' NOTE: A few minor things have been broken to prevent leeching. Thanks
''' </summary>
Class CloudflareBypass
Private Shared _UserAgent As String
@gubed
gubed / SecureRandom.vb
Last active September 8, 2018 15:43
A secure alternative to System.Random
Public Class SecureRandom : Inherits Security.Cryptography.RandomNumberGenerator
Private ReadOnly rng As New Security.Cryptography.RNGCryptoServiceProvider()
Private Function GetRandomBytes() As Byte()
Dim data As Byte() = New Byte(4 - 1) {}
rng.GetBytes(data)
Return data
End Function
@gubed
gubed / SecureRandom.cs
Last active September 8, 2018 15:43
A secure alternative to System.Random
class SecureRandom : RandomNumberGenerator
{
private readonly RandomNumberGenerator rng;
public SecureRandom()
{
this.rng = new RNGCryptoServiceProvider();
}
public int Next()
{