Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Issues when extracting #1

Open
Xeneht opened this issue Dec 14, 2022 · 5 comments
Open

Issues when extracting #1

Xeneht opened this issue Dec 14, 2022 · 5 comments

Comments

@Xeneht
Copy link

Xeneht commented Dec 14, 2022

In my experience, when you have 90%-99% of the forks extracted, bolt starts extracting tokens from the same fork in a loop and never ends. Valid tokens are lost because you need to close the program to avoid that the file ends up weighing 3GB as it happened to me.
image

I also expect the proxy support, since discord ends up ratelimiting when you check a lot of tokens.

@Shell1010
Copy link
Collaborator

Have never had this happened to me, must be a windows moment. Either way tell me what URL you're extracting that causes this loop.

Proxy support coming in a bit ig.

@Shell1010
Copy link
Collaborator

Shell1010 commented Dec 19, 2022

Just saying what I use to actually search extracts is this

pub async fn search_extract(src: Vec<u8>, count: u32) -> Vec<String> {
    let token_regex = Regex::new(r#"[A-z|0-9]{24,26}\.[A-z|0-9|\W]{6}\.[A-z|0-9|\W]{27,38}"#).unwrap();
    extract(Cursor::new(src),  &PathBuf::from("./data"), false).unwrap();
    let walker = WalkDir::new("./data").into_iter();
    let mut tokens = Vec::new();

    for entry in walker.filter_entry(|e| !is_hidden(e)) {
        let path = match &entry.as_ref() {
            Ok(x) => x.path(),
            Err(_) => continue,
        };
        let md = metadata(&path).await;
        if let Ok(md) = md {
            if md.is_file() {
                if let Ok(file) = fs::read_to_string(&path).await {
                    for token in token_regex.find_iter(&file) {
                        tokens.push(token.as_str().to_string());
                    }
                };
            }
        }
    }
    if let Err(e) = fs::remove_dir_all("./data").await {
        println!("\x1b[0;91mError: {e}\x1b[0m");
    };
    if let Err(e) = fs::create_dir("./data").await {
        println!("\x1b[0;91mError: {e}\x1b[0m");
    }
    println!("\x1b[0;92mFinished searching extract {count}...\x1b[0m");
    tokens
}

There's no way it's actually looping the way you're assuming it is.

@Xeneht
Copy link
Author

Xeneht commented Jan 13, 2023

Compiling hyper v0.14.23
Compiling hyper-tls v0.5.0
Compiling reqwest v0.11.13
Compiling discord_api v0.1.0 (C:\dir\discord_api)
Compiling repl_api v0.1.0 (C:\dir\repl_api)
Compiling bolt-scraper v1.0.0 (C:\dir\bolt-scraper)
Finished release [optimized] target(s) in 1m 55s
Running target\release\bolt-scraper.exe
thread 'main' panicked at 'called Result::unwrap() on an Err value: Error { kind: NotFound, message: "program not found" }', ascii\src\lib.rs:5:48
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
error: process didn't exit successfully: target\release\bolt-scraper.exe (exit code: 101)

Now i get this error always i try to run it

@Xeneht
Copy link
Author

Xeneht commented Jan 13, 2023

    Finished release [optimized] target(s) in 0.27s
     Running `target\release\bolt-scraper.exe`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: NotFound, message: "program not found" }', ascii\src\lib.rs:5:48
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/61a415be590113b4935464ef0aaf3b4e7713a077/library\std\src\panicking.rs:575
   1: core::panicking::panic_fmt
             at /rustc/61a415be590113b4935464ef0aaf3b4e7713a077/library\core\src\panicking.rs:64
   2: core::result::unwrap_failed
             at /rustc/61a415be590113b4935464ef0aaf3b4e7713a077/library\core\src\result.rs:1790
   3: alloc::string::impl$83::fmt
   4: alloc::string::impl$83::fmt
   5: alloc::string::impl$83::fmt
   6: __ImageBase
   7: __ImageBase
   8: alloc::string::impl$83::fmt
   9: core::ops::function::impls::impl$2::call_once
             at /rustc/61a415be590113b4935464ef0aaf3b4e7713a077/library\core\src\ops\function.rs:287
  10: std::panicking::try::do_call
             at /rustc/61a415be590113b4935464ef0aaf3b4e7713a077/library\std\src\panicking.rs:483
  11: std::panicking::try
             at /rustc/61a415be590113b4935464ef0aaf3b4e7713a077/library\std\src\panicking.rs:447
  12: std::panic::catch_unwind
             at /rustc/61a415be590113b4935464ef0aaf3b4e7713a077/library\std\src\panic.rs:140
  13: std::rt::lang_start_internal::closure$2
             at /rustc/61a415be590113b4935464ef0aaf3b4e7713a077/library\std\src\rt.rs:148
  14: std::panicking::try::do_call
             at /rustc/61a415be590113b4935464ef0aaf3b4e7713a077/library\std\src\panicking.rs:483
  15: std::panicking::try
             at /rustc/61a415be590113b4935464ef0aaf3b4e7713a077/library\std\src\panicking.rs:447
  16: std::panic::catch_unwind
             at /rustc/61a415be590113b4935464ef0aaf3b4e7713a077/library\std\src\panic.rs:140
  17: std::rt::lang_start_internal
             at /rustc/61a415be590113b4935464ef0aaf3b4e7713a077/library\std\src\rt.rs:148
  18: main
  19: invoke_main
             at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  20: __scrt_common_main_seh
             at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  21: BaseThreadInitThunk
  22: RtlUserThreadStart
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: process didn't exit successfully: `target\release\bolt-scraper.exe` (exit code: 101)

@Shell1010
Copy link
Collaborator

No point trying to fix this error in particular, there is an issue that makes the tool redundant

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants