【破解】Jetbrains系列软件破解

前言

Jetbrains系列软件破解

squallliu/Jetbrains-Help

下载项目

1
2
git clone https://github.com/squallliu/Jetbrains-Help.git
cd Jetbrains-Help

下载依赖

MacOS

1
brew install oracle-jdk@21

运行项目

  • 运行JetbrainsHelpApplication.java

访问页面

  • 解压ja-netfilter.zip
1
2
cd ~/Downloads
unzip ja-netfilter.zip -d ja-netfilter

修改VM配置文件

  • 点击IDE.vmoptions复制配置

  • 追加到~/Library/Application Support/JetBrains/IntelliJIdea2024.3/idea.vmoptions文件末尾

/ja-netfilter/ja-netfilter.jar:指定上一步骤解压后得到的ja-netfilter.jar文件绝对路径

~/Library/Application Support/JetBrains/IntelliJIdea2024.3/idea.vmoptions
1
2
3
-javaagent:/ja-netfilter/ja-netfilter.jar
--add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
--add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED

复制指定产品的激活码

重新激活

  • Help->Register

  • Active Another License

  • Paid license->Activation code->粘贴上一步骤复制激活码->Active

完成

  • 截图纪念

setup.ps1

源代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<#
.SYNOPSIS
JetBrains 一键激活
#>

# --- 配置区 ---
$jarUrl = "https://git.ustc.edu.cn/file/share/-/raw/main/ja-netfilter.jar" # 替换为你的直链
$installDir = "$env:APPDATA\ja-netfilter"
$jarPath = "$installDir\ja-netfilter.jar"
$utf8NoBom = [System.Text.UTF8Encoding]::new($false)

function Show-Menu {
Clear-Host
Write-Host "==========================================" -ForegroundColor Cyan
Write-Host " JetBrains 一键激活" -ForegroundColor Cyan
Write-Host "==========================================" -ForegroundColor Cyan
Write-Host " 1. 执行一键安装 (Install)"
Write-Host " 2. 执行一键卸载 (Uninstall)"
Write-Host " 3. 退出 (Exit)"
Write-Host "==========================================" -ForegroundColor Cyan
return Read-Host "请选择操作 [1-3]"
}

function Manage-Agent ([string]$mode) {
$agentLine = "-javaagent:${jarPath}=jetbrains" -replace '\\', '/'
$searchPaths = @("$env:ProgramFiles\JetBrains", "${env:ProgramFiles(x86)}\JetBrains", "$env:LOCALAPPDATA\JetBrains", "$env:APPDATA\JetBrains")

$count = 0
$failedPaths = @() # 收集无权限修改的路径

if ($mode -eq "install") {
if (-not (Test-Path $installDir)) { New-Item -Path $installDir -ItemType Directory | Out-Null }
Write-Host "⬇️ 正在下载依赖文件..." -ForegroundColor Cyan
Invoke-WebRequest -Uri $jarUrl -OutFile $jarPath -UseBasicParsing
}

foreach ($path in $searchPaths) {
if (-not (Test-Path $path)) { continue }
Get-ChildItem -Path $path -Filter "*.vmoptions" -Recurse -File -ErrorAction SilentlyContinue | Where-Object { $_.FullName -notmatch "jetbrains-client|runtime" } | ForEach-Object {
$filePath = $_.FullName
try {
$content = [System.IO.File]::ReadAllLines($filePath, $utf8NoBom)
$newContent = @()
$changed = $false

# 清理旧配置
foreach ($line in $content) {
if ($line -match "ja-netfilter\.jar") { $changed = $true; continue }
if ($line.Trim() -ne "") { $newContent += $line }
}

if ($mode -eq "install") {
$newContent += $agentLine
$changed = $true
}

if ($changed) {
[System.IO.File]::WriteAllLines($filePath, $newContent, $utf8NoBom)
$count++
Write-Host " [OK] 已处理: $filePath" -ForegroundColor Green
}
} catch [System.UnauthorizedAccessException] {
# 捕获权限不足的错误并记录
$failedPaths += $filePath
Write-Host " [跳过] 无权限修改: $filePath" -ForegroundColor DarkGray
} catch {
Write-Host " [跳过] 文件被占用或未知错误: $filePath" -ForegroundColor DarkGray
}
}
}

if ($mode -eq "uninstall" -and (Test-Path $installDir)) {
Remove-Item -Path $installDir -Recurse -Force -ErrorAction SilentlyContinue
Write-Host "🗑️ 已清理本地缓存文件。" -ForegroundColor Yellow
}

Write-Host "`n📊 操作完成,成功处理 $count 个配置文件。" -ForegroundColor Cyan

# ==========================================
# 核心:自动生成无权限时的保姆级教程
# ==========================================
if ($failedPaths.Count -gt 0 -and $mode -eq "install") {
Write-Host "`n⚠️ 发现部分系统级目录由于权限不足,未能自动写入。" -ForegroundColor Yellow
Write-Host "👉 请不要慌,按以下步骤手动补充即可:" -ForegroundColor Yellow
Write-Host "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" -ForegroundColor Cyan
Write-Host " 第一步:请复制下方这行绿色的代码 (选中后按 Ctrl+C)"
Write-Host " $agentLine " -ForegroundColor Green -BackgroundColor Black
Write-Host ""
Write-Host " 第二步:依次打开以下文件 (建议使用记事本打开)"
foreach ($p in $failedPaths) {
Write-Host " 📄 $p" -ForegroundColor White
}
Write-Host ""
Write-Host " 第三步:将复制的代码粘贴到文件的【最后一行】,保存关闭即可。"
Write-Host " (如果提示无权限保存,请将记事本拖到桌面,保存后再拖回原文件夹覆盖)"
Write-Host "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" -ForegroundColor Cyan
}

Write-Host "`n💡 按回车键继续..." -ForegroundColor Gray
Read-Host
}

# --- 主循环 ---
while ($true) {
$choice = Show-Menu
switch ($choice) {
"1" { Manage-Agent "install" }
"2" { Manage-Agent "uninstall" }
"3" { exit }
}
}

完成

  • 截图纪念

完成