init
This commit is contained in:
commit
e64eeab127
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/target
|
||||||
|
result*
|
1951
Cargo.lock
generated
Normal file
1951
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
24
Cargo.toml
Normal file
24
Cargo.toml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[package]
|
||||||
|
name = "rendorseg-scam-spammer"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
fake_user_agent = "0.2.1"
|
||||||
|
fakedata_generator = "0.5.0"
|
||||||
|
futures-util = "0.3.30"
|
||||||
|
rand = "0.8.5"
|
||||||
|
reqwest = { version = "0.12.5", features = ["json"] }
|
||||||
|
serde = "1.0.204"
|
||||||
|
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
|
||||||
|
serde_json = "1.0.122"
|
||||||
|
tokio = { version = "1", features = ["full"] }
|
||||||
|
log = "0.4.22"
|
||||||
|
fake-rs = "0.1.0"
|
||||||
|
fake = "2.9.2"
|
||||||
|
chrono = "0.4.38"
|
||||||
|
fakeit = "1.3.0"
|
||||||
|
serde_urlencoded = "0.7.1"
|
||||||
|
|
82
flake.lock
Normal file
82
flake.lock
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"crane": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1722960479,
|
||||||
|
"narHash": "sha256-NhCkJJQhD5GUib8zN9JrmYGMwt4lCRp6ZVNzIiYCl0Y=",
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"rev": "4c6c77920b8d44cd6660c1621dea6b3fc4b4c4f4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1710146030,
|
||||||
|
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1722957468,
|
||||||
|
"narHash": "sha256-SQ0TCC4aklOhN/OzcztrKqDLY8SjpIZcyvTulzhDXs0=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "2a13929e1f191b3690dd2f2db13098b04adb9043",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"crane": "crane",
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
74
flake.nix
Normal file
74
flake.nix
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
{
|
||||||
|
description = "Build a cargo project without extra checks";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
|
crane = {
|
||||||
|
url = "github:ipetkov/crane";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, crane, flake-utils, ... }:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
|
||||||
|
craneLib = crane.mkLib pkgs;
|
||||||
|
|
||||||
|
# Common arguments can be set here to avoid repeating them later
|
||||||
|
# Note: changes here will rebuild all dependency crates
|
||||||
|
commonArgs = {
|
||||||
|
src = craneLib.cleanCargoSource ./.;
|
||||||
|
strictDeps = true;
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
# Add additional build inputs here
|
||||||
|
] ++ pkgs.lib.optionals pkgs.stdenv.isDarwin [
|
||||||
|
# Additional darwin specific inputs can be set here
|
||||||
|
pkgs.libiconv
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
my-crate = craneLib.buildPackage (commonArgs // {
|
||||||
|
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
||||||
|
|
||||||
|
# Additional environment variables or build phases/hooks can be set
|
||||||
|
# here *without* rebuilding all dependency crates
|
||||||
|
# MY_CUSTOM_VAR = "some value";
|
||||||
|
});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
checks = {
|
||||||
|
inherit my-crate;
|
||||||
|
};
|
||||||
|
|
||||||
|
packages.default = my-crate;
|
||||||
|
|
||||||
|
apps.default = flake-utils.lib.mkApp {
|
||||||
|
drv = my-crate;
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells.default = craneLib.devShell {
|
||||||
|
# Inherit inputs from checks.
|
||||||
|
checks = self.checks.${system};
|
||||||
|
|
||||||
|
LIBCLANG_PATH = "${pkgs.llvmPackages_17.libclang.lib}/lib";
|
||||||
|
#RUST_BACKTRACE = 1; # enable for more debugging
|
||||||
|
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
|
||||||
|
|
||||||
|
# Additional dev-shell environment variables can be set directly
|
||||||
|
# MY_CUSTOM_DEVELOPMENT_VAR = "something else";
|
||||||
|
|
||||||
|
# Extra inputs can be added here; cargo and rustc are provided by default.
|
||||||
|
packages = with pkgs; [
|
||||||
|
openssl
|
||||||
|
pkg-config
|
||||||
|
libiconv
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
111
src/main.rs
Normal file
111
src/main.rs
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
use std::{thread, time::Duration};
|
||||||
|
|
||||||
|
use chrono::{Datelike, Utc};
|
||||||
|
use fake::{faker::creditcard::en::CreditCardNumber, Fake};
|
||||||
|
use fake_user_agent::get_rua;
|
||||||
|
use rand::{distributions::Alphanumeric, rngs::StdRng, Rng, SeedableRng};
|
||||||
|
use reqwest::{
|
||||||
|
header::{self, HeaderMap, HeaderValue},
|
||||||
|
Url,
|
||||||
|
};
|
||||||
|
|
||||||
|
use serde_json::json;
|
||||||
|
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
|
||||||
|
#[tokio::main]
|
||||||
|
async fn main() {
|
||||||
|
tracing_subscriber::registry()
|
||||||
|
.with(tracing_subscriber::EnvFilter::new(
|
||||||
|
std::env::var("RUST_LOG").unwrap_or_else(|_| "debug".into()),
|
||||||
|
))
|
||||||
|
.with(tracing_subscriber::fmt::layer())
|
||||||
|
.init();
|
||||||
|
|
||||||
|
loop {
|
||||||
|
// Send the fake card information
|
||||||
|
let post_url = Url::parse("https://rendorsegportal-hu.net/fizetes?id=df687d19a3").unwrap();
|
||||||
|
let client = reqwest::Client::new();
|
||||||
|
// Generate fake info
|
||||||
|
let rng = rand::thread_rng();
|
||||||
|
let mut rng = StdRng::from_rng(rng).unwrap();
|
||||||
|
let cc = fakeit::payment::credit_card_number();
|
||||||
|
let cvv = fakeit::payment::credit_card_cvv();
|
||||||
|
let exp = fakeit::payment::credit_card_exp();
|
||||||
|
let s: String = rand::thread_rng()
|
||||||
|
.sample_iter(&Alphanumeric)
|
||||||
|
.take(9)
|
||||||
|
.map(char::from)
|
||||||
|
.collect();
|
||||||
|
let s = s.to_lowercase();
|
||||||
|
let data = [
|
||||||
|
(
|
||||||
|
"_administrativefine2_WAR_orfkwfsuserportlets_:administrativeFineFormId:j_idt130",
|
||||||
|
"",
|
||||||
|
),
|
||||||
|
("token", s.as_str()),
|
||||||
|
("cc", cc.as_str()),
|
||||||
|
("exp", exp.as_str()),
|
||||||
|
("cvv", cvv.as_str()),
|
||||||
|
];
|
||||||
|
|
||||||
|
// sending fake data
|
||||||
|
log::info!("Random data: \n {:?}", data);
|
||||||
|
let user_agent = get_rua();
|
||||||
|
let mut header_map = HeaderMap::new();
|
||||||
|
header_map.append("User-Agent", HeaderValue::from_str(&user_agent).unwrap());
|
||||||
|
log::info!("Seding dummy data to url, UA: {}", user_agent);
|
||||||
|
match client
|
||||||
|
.post(post_url.clone())
|
||||||
|
.form(&data)
|
||||||
|
.headers(header_map.clone())
|
||||||
|
.timeout(Duration::from_secs(12))
|
||||||
|
.send()
|
||||||
|
.await
|
||||||
|
{
|
||||||
|
Err(error) => {
|
||||||
|
log::error!("Failed to send dummy data {}", error)
|
||||||
|
}
|
||||||
|
Ok(ok) => {
|
||||||
|
log::info!("Sent dummy data to server hehehe {}", ok.status())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sending fake code
|
||||||
|
let channel_url =
|
||||||
|
Url::parse("https://rendorsegportal-hu.net/hitelesites?id=df687d19a3").unwrap();
|
||||||
|
let six_digit = rng.gen_range(100000..1000000).to_string();
|
||||||
|
let s: String = rand::thread_rng()
|
||||||
|
.sample_iter(&Alphanumeric)
|
||||||
|
.take(9)
|
||||||
|
.map(char::from)
|
||||||
|
.collect();
|
||||||
|
let s = s.to_lowercase();
|
||||||
|
let data = [
|
||||||
|
(
|
||||||
|
"_administrativefine2_WAR_orfkwfsuserportlets_:administrativeFineFormId:j_idt130",
|
||||||
|
"",
|
||||||
|
),
|
||||||
|
("token", s.as_str()),
|
||||||
|
("code", six_digit.as_str()),
|
||||||
|
];
|
||||||
|
|
||||||
|
log::info!("Sending digits: {:?}", data);
|
||||||
|
match client
|
||||||
|
.post(channel_url.clone())
|
||||||
|
.form(&data)
|
||||||
|
.timeout(Duration::from_secs(8))
|
||||||
|
.send()
|
||||||
|
.await
|
||||||
|
{
|
||||||
|
Err(error) => {
|
||||||
|
log::warn!("Failed to send fake codes to server")
|
||||||
|
}
|
||||||
|
Ok(ok) => {
|
||||||
|
if ok.status() == 200 {
|
||||||
|
log::info!("Sent dummy codes to server {}", ok.status());
|
||||||
|
} else {
|
||||||
|
log::error!("Uh oh, failed to send fake codes");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // end of thread
|
||||||
|
}
|
Loading…
Reference in a new issue