Skip to content

Instantly share code, notes, and snippets.

@10maurycy10
Last active October 13, 2020 18:59
Show Gist options
  • Save 10maurycy10/112a68e0150e7810dbf35828cee64ebc to your computer and use it in GitHub Desktop.
Save 10maurycy10/112a68e0150e7810dbf35828cee64ebc to your computer and use it in GitHub Desktop.
virtual key smash

virtual key smash

This is a way to generate key smash virtually.

Do I need to say more?

[package]
name = "virtual-key-smash"
version = "0.1.0"
authors = ["10maurycy10 <10maurycy10@users.noreply.github.com>"]
edition = "2018"
[dependencies]
rand = "*"
//put at ./src/main.rs
use rand::{thread_rng, Rng};
use rand::distributions::Alphanumeric;
fn random_string(n: usize) -> String {
thread_rng().sample_iter(&Alphanumeric)
.take(n)
.collect()
}
fn main() {
println!("{}", random_string(2048));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment