Skip to content

Commit f20c307

Browse files
committed
V2 In rust out )
1 parent b46580a commit f20c307

File tree

6 files changed

+156
-63
lines changed

6 files changed

+156
-63
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/target
2+
Cargo.lock

Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[package]
2+
name = "bypass"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
[dependencies]
7+
walkdir = "2.3"
8+
rayon = "1.7"
9+
colored = "2"

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# --- Stage 1: Build statically with MUSL
2+
FROM rust:1.87 AS builder
3+
4+
# Install musl tools and add target
5+
RUN apt-get update && \
6+
apt-get install -y musl-tools && \
7+
rustup target add x86_64-unknown-linux-musl
8+
9+
WORKDIR /usr/src/bypass
10+
COPY Cargo.toml Cargo.lock ./
11+
COPY src ./src
12+
13+
# Build for the MUSL target (static binary)
14+
RUN cargo build --release --target x86_64-unknown-linux-musl
15+
16+
# --- Stage 2: Minimal runtime
17+
FROM scratch AS prod
18+
19+
# Copy the static binary
20+
COPY --from=builder /usr/src/bypass/target/x86_64-unknown-linux-musl/release/bypass /usr/local/bin/bypass
21+
22+
# Default mount point
23+
ENTRYPOINT ["/usr/local/bin/bypass"]
24+
CMD ["node_modules"]

README.md

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,38 @@
1-
# Nuxt UI Pro Bypass
1+
# Nuxt UI Pro Bypass V2
22

3-
**The repository exists only to show the problem do not use this script in production !!!**
3+
> [!WARNING]
4+
> TThis script is intended only for demonstrating the problem and should not be used in production.
5+
6+
> [!CAUTION]
7+
> Never use this in production — it may be illegal. :)
8+
9+
### Instructions
10+
1. Install Docker on your system.
11+
2. Build the bypass image:
412

5-
Instruction
6-
1. Place bypass.py into your repository with nuxt-ui-pro template
7-
```
8-
Project structure
9-
- .nuxt
10-
- app
11-
- content
12-
- node_modules
13-
- public
14-
- server
15-
.env
16-
bypass.py <---
17-
and other files...
18-
```
19-
2. Install packages via npm
2013
```
21-
npm i
14+
docker build https://github.com/qweme32/nuxt-ui-pro-license-bypass.git#main -t nuxt-pro-ui-bypass
2215
```
23-
3. Create .env file with content
16+
3. In your Nuxt project, create a `.env` file with the following content:
17+
2418
```
2519
# Production license for @nuxt/ui-pro, get one at https://ui.nuxt.com/pro/purchase
26-
NUXT_UI_PRO_LICENSE=any-string
20+
NUXT_UI_PRO_LICENSE=XD_BYPASSED
2721
```
28-
4. Run python script
22+
4. Run the bypass:
23+
2924
```
30-
python3 bypass.py
25+
docker run --rm -v "$(pwd)/node_modules:/node_modules" nuxt-pro-ui-bypass
3126
```
27+
28+
### Change log
29+
- `Aug 21, 2024`
30+
31+
First bypass written as a small Python script.
32+
- `June 10, 2025`
33+
34+
Nuxt rewrote some build logic and added chunks. Second bypass rewritten in Rust and dockerized for easy use.
3235
36+
---
37+
38+
> Enjoy 😉

bypass.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

src/main.rs

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
use walkdir::WalkDir;
2+
use rayon::prelude::*;
3+
use colored::*;
4+
use std::{fs, io, path::{Path, PathBuf}, time::Instant};
5+
6+
const HEADER_PART_1: &str = r#"
7+
_ __ __ __ ______
8+
/ | / /_ ___ __/ /_ / / / / _/
9+
/ |/ / / / / |/_/ __/ / / / // /
10+
/ /| / /_/ /> </ /_ / /_/ // /
11+
/_/ |_/\__,_/_/|_|\__/ \____/___/
12+
"#;
13+
14+
const HEADER_PART_2: &str = r#"
15+
____ ____
16+
/ __ \_________ / __ )__ ______ ____ ___________
17+
/ /_/ / ___/ __ \ / __ / / / / __ \/ __ `/ ___/ ___/
18+
/ ____/ / / /_/ / / /_/ / /_/ / /_/ / /_/ (__ |__ )
19+
/_/ /_/ \____/ /_____/\__, / .___/\__,_/____/____/
20+
/____/_/
21+
"#;
22+
23+
const VERIFY_URL: &str = "https://api.nuxtlabs.com/ui-pro/verify";
24+
const BYPASS_URL: &str = "https://httpbin.org/status/200";
25+
const TARGET: &str = "node_modules/@nuxt";
26+
27+
fn main() -> io::Result<()> {
28+
control::set_override(true);
29+
30+
let start = Instant::now();
31+
32+
print!("{}", HEADER_PART_1.bright_blue());
33+
println!("{}", HEADER_PART_2.bright_green());
34+
println!("{} {}", "[i]".bright_yellow(), "This script is intended only for showing the problem".bright_black());
35+
println!("{} {}", "[!]".bright_red(), "Never use it in production it is illegal xd!!!)".bright_black());
36+
println!("{} {}", "[@]".bright_cyan(), "By qweme32 ( https://github.com/qweme32 )".bright_black());
37+
38+
let root = Path::new(TARGET);
39+
40+
if !root.exists() || !root.is_dir() {
41+
println!("{} {}", "[X]".bright_red(), format!("Dir {} does not exist or is not accessible.", TARGET));
42+
43+
return Ok(());
44+
}
45+
46+
println!("{} {} {}", "[?]", "Scanning dir:".bright_black(), TARGET.bright_black());
47+
48+
// Collect paths
49+
let paths: Vec<PathBuf> = WalkDir::new(&root)
50+
.into_iter()
51+
.filter_map(Result::ok)
52+
.filter(|entry| {
53+
entry.file_type().is_file()
54+
&& matches!(
55+
entry.path().extension().and_then(|e| e.to_str()),
56+
Some("js") | Some("mjs") | Some("ts") | Some("mts")
57+
)
58+
})
59+
.filter(|entry| {
60+
fs::read_to_string(entry.path())
61+
.map(|content| content.contains(VERIFY_URL))
62+
.unwrap_or(false)
63+
})
64+
.map(|entry| entry.into_path())
65+
.collect();
66+
67+
// Zero paths check
68+
if paths.len() == 0 {
69+
println!("{} {}", "[X]".bright_red(), "It looks like you have already bypassed the check or the script is outdated");
70+
return Ok(());
71+
}
72+
73+
// Rewrite for bypass
74+
paths.par_iter().for_each(|path| {
75+
match fs::read_to_string(path) {
76+
Ok(content) => {
77+
let new_content = content.replace(VERIFY_URL, BYPASS_URL);
78+
match fs::write(path, new_content) {
79+
Ok(_) => println!("{} {} {}", "[+]".green(), "Bypassed", path.as_path().to_str().unwrap().bright_black()),
80+
Err(err) => eprintln!("{} {} {}", "[X]".bright_red(), "Rewrite failed", err),
81+
}
82+
}
83+
Err(err) => eprintln!("{} {} {}", "[X]".bright_red(), "Rewrite failed", err),
84+
}
85+
});
86+
87+
// Finish
88+
let dur = start.elapsed().as_millis();
89+
println!("\n{} {}", "[T]".bright_magenta(), format!("{}ms elapsed", dur.to_string()).bright_black());
90+
91+
Ok(())
92+
}
93+

0 commit comments

Comments
 (0)