首页
社区
课程
招聘
[转帖]WIN7激活程序代码是怎么炼成的?!
发表于: 2010-1-2 10:35 10742

[转帖]WIN7激活程序代码是怎么炼成的?!

2010-1-2 10:35
10742
从网上看见,自己学习后深有感触,特别分享给大家,希望大家跟我一样有所得!

===================引文====================

网络上的某WIN7激活程序,看样子是批处理文件加密过的,弄了下,想看看是怎么实现的。。
@shift
@shift
@echo off
title    Win7 通用激活工具 V7.0    │   Oem7 V7.0

if not exist %windir%\system32\slmgr.vbs echo 请确定在Win7或PE下运行│Are You Under Win7 or PE?
if not "%username%" == "Administrator" echo 请确定用右键管理员身份运行,否则可能无法激活!如果导入证书失败,请进入菜单E开启Administrator用户进行激活。
echo 使用本工具之前请卸载其他激活工具,否则可能无法激活。
pause

:menu
cls
Echo   欢迎使用Win7通用激活工具  │ Welcome to Oem7 All Activator
Echo  -------------------------- │ -----------------------------
Echo                版本号 V 7.0 │                   Version 7.0
Echo  版权   中国智造:605356316 │ Created in China By 605356316
Echo  -------------------------- │ -----------------------------
Echo  A: 智能一键激活Win7旗舰版  │ A: Active Your Win7 (U) Now!
Echo  自动选择分区,默认旗舰版key │  Auto Identify Partition
Echo                             │
Echo  B: 智能激活可选其他系统key │ B: Active Other Windows NT6
Echo  手动选择分区,针对某些本子  │  For Some Notebook
Echo                             │
Echo  C: 硬刷BIOS后激活          │ C: Active BIOS Fresh
Echo  D: 升级序列号              │ D: Update Key
Echo  E: PE下恢复系统引导        │ E: Recover Leader in PE
Echo  F: 不能激活时延长使用时间  │ F: Extend the Test Time
Echo  G: 如何进入管理员帐号      │ G: How to Login Administrator
Echo  H: 检测系统是否激活        │ H: Check System Actived
Echo  I: 下载新版本              │ I: Download the New Version
Echo  J: 卸载本激活              │ J: Uninstall Activator
Echo  Z: 退出                    │ Z: Exit
Echo  -------------------------- │ -----------------------------

set s=
set /p s=  请输入您的选择并回车:       │ Please choose and hit Enter:
IF not "%s%"=="" SET s=%s:~0,1%
if /I "%s%"=="a" goto :onekey
if /I "%s%"=="b" goto :allsys
if /I "%s%"=="c" goto :bios
if /I "%s%"=="d" goto :updatekey
if /I "%s%"=="e" goto :recover
if /I "%s%"=="f" goto :extend
if /I "%s%"=="g" goto :commandprompt
if /I "%s%"=="h" goto :check
if /I "%s%"=="i" goto :new
if /I "%s%"=="j" goto :uninstall
if /I "%s%"=="z" (
del /f /q %myfiles%\boot*.exe>NUL 2>NUL
del /f /q %myfiles%\win7ldr*>NUL 2>NUL
del /f /q %myfiles%\*.bin>NUL 2>NUL
del /f /q %myfiles%\*.xrm-ms>NUL 2>NUL
exit
)
goto :menu

:onekey
call :chooseoem
set diskyes=diskn
for %%A in (Z: Y: X: W: V: U: T: S: R: Q: P: O: N: M: L: K: J: I: H: G: F: E: D: C: B:) do (
                if exist %%A\bootmgr goto :onekey2
)
echo.
echo 发现隐藏分区... │ Find the hidden partition...
echo.
set diskyes=disky
del /f /q %myfiles%\part.txt>NUL 2>NUL
echo select disk 0 >>%myfiles%\part.txt
echo select partition 1 >>%myfiles%\part.txt
echo assign letter=B >>%myfiles%\part.txt
echo exit >>%myfiles%\part.txt
diskpart /s %myfiles%\part.txt
del /f /q %myfiles%\part.txt>NUL 2>NUL
:onekey2
for %%A in (Z: Y: X: W: V: U: T: S: R: Q: P: O: N: M: L: K: J: I: H: G: F: E: D: C: B:) do (
        if exist %%A\bootmgr (
                if not exist %%A\setup.exe (
                        echo.
                        echo 正在写入%%A盘引导... │ writing %%A leader...
                        echo.
                        if exist %%A\menu.lst attrib %%A\menu.lst -h -r -s
                        if exist %%A\menu.lst ren %%A\menu.lst menu_lst.bak
                        if exist %%A\grldr attrib %%A\grldr -h -r -s
                        copy %myfiles%\win7ldr1 /b + %myfiles%\%oe%.bin /b + %myfiles%\win7ldr2 /b %%A\grldr /b>NUL 2>NUL
                        attrib %%A\grldr +h +s +r
                        %myfiles%\bootinst.exe /nt60 %%A
                )
        )
)
if "%diskyes%"=="disky" (
del /f /q %myfiles%\unpart.txt>NUL 2>NUL
echo select disk 0 >>%myfiles%\unpart.txt
echo select partition 1 >>%myfiles%\unpart.txt
echo remove all >>%myfiles%\unpart.txt
echo exit >>%myfiles%\unpart.txt
diskpart /s %myfiles%\unpart.txt>NUL 2>NUL
del /f /q %myfiles%\unpart.txt
)
call :license
set ke="342DG-6YJR8-X92GV-V7DCV-P4K27"
call :key
echo.
echo Windows已经激活,系统将在60秒内重新启动 │ Success,restart in 60s
pause
shutdown -r
exit

:allsys
call :chooseoem
call :choosekey
call :leader
call :license
call :key
echo.
echo Windows已经激活,系统将在60秒内重新启动 │ Success,restart in 60s
pause
shutdown -r
exit

:bios
call :chooseoem
call :choosekey
call :license
call :key
echo.
echo Windows已经激活,系统将在60秒内重新启动 │ Success,restart in 60s
pause
shutdown -r
exit

:updatekey
del /f /q %myfiles%\boot*.exe>NUL 2>NUL
del /f /q %myfiles%\win7ldr*>NUL 2>NUL
del /f /q %myfiles%\*.bin>NUL 2>NUL
del /f /q %myfiles%\*.xrm-ms>NUL 2>NUL
call :choosekey
call :key
echo.
echo 序列号已经成功替换 │ Succeed
pause
exit

:recover
cls
Echo  -------------------------- │ -----------------------------
Echo  修复系统启动               │ recover the leader
Echo                             │
Echo  A: 直接卸载                │ A: unistall
Echo  B: 还原启动信息            │ B: recover grub
Echo  Z: 返回主菜单              │ M: Back to main menu
Echo  -------------------------- │ -----------------------------

set s=
set /p s=  请输入您的选择并回车:       │ Please choose and hit Enter:
IF not "%s%"=="" SET s=%s:~0,1%
if /I "%s%"=="a" goto :uninstall
if /I "%s%"=="b" goto :rec
if /I "%s%"=="z" goto :menu
goto :recover

:rec
call :chooseoem
call :leader
echo.
echo 启动引导已成功修复 │ Success
pause
exit

:chooseoem
cls
Echo  -------------------------- │ -----------------------------
Echo  请选择你想要的OEM          │ Please choose OEM
Echo                             │
Echo  注意:OEM并不需要一一对应, │ Notice: If you can't active,
Echo  如果你用了其中一种不成功, │ you'd better try other OEM.
Echo  请尝试使用其它OEM激活,基  │
Echo  本没有影响,Dell的机型需要 │
Echo  多试几个Dell的OEM。        │
Echo  -------------------------- │ -----------------------------
Echo  A: 戴尔-WN09 B: 戴尔-FX09  │ A: Dell-WN09 B: Dell-FX09  
Echo  C: 戴尔-M09  D: 戴尔-QA09  │ C: Dell-M09  D: Dell-QA09
Echo  E: 戴尔-B10K F: 富士通     │ E: Dell-B10K F: Fujistu
Echo  G: 惠普      H: 惠普-MPC   │ G: HP        H: HP-MPC
Echo  I: 联想      J: 微星       │ I: Lenovo    J: MSI
Echo  K: 东芝      L: 方正       │ K: Toshiba   L: Founder
Echo  M: 宏基      N: 华硕       │ M: Acer      N: Asus
Echo  Z: 返回主菜单              │ Z: Back to menu
Echo  -------------------------- │ -----------------------------

set s=
set /p s=  请输入您的选择并回车:       │ Please choose and hit Enter:
IF not "%s%"=="" SET s=%s:~0,1%
if /I "%s%"=="a" set oe="Dell-WN09"&&goto :eof
if /I "%s%"=="b" set oe="DELL-FX09"&&goto :eof
if /I "%s%"=="c" set oe="DELL-M09"&&goto :eof
if /I "%s%"=="d" set oe="DELL-QA09"&&goto :eof
if /I "%s%"=="e" set oe="DELL-B10K"&&goto :eof
if /I "%s%"=="f" set oe="Fujistu"&&goto :eof
if /I "%s%"=="g" set oe="HP"&&goto :eof
if /I "%s%"=="h" set oe="HP-MPC"&&goto :eof
if /I "%s%"=="i" set oe="Lenovo"&&goto :eof
if /I "%s%"=="j" set oe="MSI"&&goto :eof
if /I "%s%"=="k" set oe="Toshiba"&&goto :eof
if /I "%s%"=="l" set oe="Founder"&&goto :eof
if /I "%s%"=="m" set oe="Acer"&&goto :eof
if /I "%s%"=="n" set oe="Asus"&&goto :eof
if /I "%s%"=="z" goto :menu
goto :chooseoem

:choosekey
cls
Echo  -------------------------- │ -----------------------------
Echo  请选择序列号               │ Update your key
Echo                             │
Echo  A: Win7 戴尔旗舰版         │ A: Win7 Dell Ultimate
Echo  B: Win7 宏基旗舰版         │ B: Win7 Acer Ultimate
Echo  C: Win7 戴尔专业版         │ C: Win7 Dell Professional
Echo  D: Win7 宏基专业版         │ D: Win7 Acer Professional
Echo  E: Win7 NEC家庭高级版      │ E: Win7 NEC Premium
Echo  F: Win7 华硕家庭高级版     │ F: Win7 Asus Premium
Echo  G: 2008 标准版             │ G: 2008 Standard
Echo  H: 2008 标准版             │ H: 2008 Standard
Echo  I: 2008 企业版             │ I: 2008 Enterprise
Echo  J: 2008 小企业服务器       │ J: 2008 Small Business Server
Echo  K: Vista 旗舰版            │ K: Vista Ultimate
Echo  L: Vista 家庭初级版        │ L: Vista Basic
Echo  M: Vista 家庭高级版        │ M: Vista Premium
Echo  N: Vista 商业版            │ N: Vista Business
Echo  O: Vista 初级版            │ O: Vista Starter
Echo  Z: 返回主菜单              │ Z: Back to main menu
Echo  -------------------------- │ -----------------------------

set s=
set /p s=  请输入您的选择并回车:       │ Please choose and hit Enter:
IF not "%s%"=="" SET s=%s:~0,1%
if /I "%s%"=="a" set ke="342DG-6YJR8-X92GV-V7DCV-P4K27"&&goto :eof
if /I "%s%"=="b" set ke="FJGCP-4DFJD-GJY49-VJBQ7-HYRR2"&&goto :eof
if /I "%s%"=="c" set ke="32KD2-K9CTF-M3DJT-4J3WC-733WD"&&goto :eof
if /I "%s%"=="d" set ke="YKHFT-KW986-GK4PY-FDWYH-7TP9F"&&goto :eof
if /I "%s%"=="e" set ke="VQB3X-Q3KP8-WJ2H8-R6B6D-7QJB7"&&goto :eof
if /I "%s%"=="f" set ke="7JQWQ-K6KWQ-BJD6C-K3YVH-DVQJG"&&goto :eof
if /I "%s%"=="g" set ke="223PV-8KCX6-F9KJX-3W2R7-BB2FH"&&goto :eof
if /I "%s%"=="h" set ke="28QVP-KR6WC-PW76Q-YVX4X-FM3BM"&&goto :eof
if /I "%s%"=="i" set ke="26Y2H-YTJY6-CYD4F-DMB6V-KXFCQ"&&goto :eof
if /I "%s%"=="j" set ke="76GGM-4MQ6T-XCJH9-6R2XQ-PW2D2"&&goto :eof
if /I "%s%"=="k" set ke="6F2D7-2PCG6-YQQTB-FWK9V-932CC"&&goto :eof
if /I "%s%"=="l" set ke="762HW-QD98X-TQVXJ-8RKRQ-RJC9V"&&goto :eof
if /I "%s%"=="m" set ke="8XPM9-7F9HD-4JJQP-TP64Y-RPFFV"&&goto :eof
if /I "%s%"=="n" set ke="72PFD-BCBK8-R7X4H-6F2XJ-VVMP9"&&goto :eof
if /I "%s%"=="o" set ke="26VQB-RP3T9-63FVV-VD7RF-H7M2Q"&&goto :eof
if /I "%s%"=="z" goto :menu
goto :choosekey

:extend
cls
Echo  -------------------------- │ -----------------------------
Echo  使用3次slmgr延时后,必须用 │ After you use the slmgr 3
Echo  B重置延时次数才能延时(8次) │ times,you'd use B to continue
Echo                             │
Echo  A: slmgr延时               │ A: slmgr to extend
Echo  B: 重置延时次数            │ B: extend from register
Echo  Z: 返回主菜单              │ Z: Back to main menu
Echo  -------------------------- │ -----------------------------

set s=
set /p s=  请输入您的选择并回车:       │ Please choose and hit Enter:
IF not "%s%"=="" SET s=%s:~0,1%
if /I "%s%"=="a" %windir%\system32\slmgr.vbs -rearm
if /I "%s%"=="b" (
echo Windows Registry Editor Version 5.00 >extend.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform]>>extend.reg
echo "SkipRearm"=dword:00000001>>extend.reg
regedit.exe /s extend.reg
del /F /Q extend.reg>NUL 2>NUL
cls
echo 重置延时次数成功
pause
goto :menu
)
if /I "%s%"=="z" goto :menu
goto :extend

:commandprompt
cls
Echo  -------------------------- │ -----------------------------
Echo  请用Administrator运行      │ Please run as Administrator
Echo                             │
Echo  本工具会自动为你打开管理。 │ Waiting for the ComManager
Echo  --打开本地用户和组,用户, │ -Local users and groups,
Echo  Administrator,右键属性,去│ -users,-Administrator,
Echo  掉账户已禁用然后保存,注销 │ RightClick -properties,
Echo  当前用户,并登陆Admin帐户,│ "Account is disabled" set not
Echo  再次运行本软件即可。       │ -Save it,log off,log in Admin
Echo                             │ Then run me again.
Echo  -------------------------- │ -----------------------------
start compmgmt.msc
pause
exit

:check
%windir%\system32\slmgr.vbs -xpr
%windir%\system32\slmgr.vbs -dli
%windir%\system32\slmgr.vbs -dlv
goto :menu

:new
START IEXPLORE http://hi.baidu.com/jjkcomputer/blog/category/Win7active
goto :menu

:uninstall
call :100
for %%A in (Z: Y: X: W: V: U: T: S: R: Q: P: O: N: M: L: K: J: I: H: G: F: E: D: C: B:) do (
        if exist %%A\grldr (
                echo.
                echo 正在卸载... │ Uninstalling from drive %%A
                echo.
                attrib %%A\grldr -h -s -r
                del %%A\grldr
                %myfiles%\bootrest.exe /nt60 %%A
        )
)
if "%diskyes%"=="disky" (
del /f /q %myfiles%\unpart.txt>NUL 2>NUL
echo select volume %target% >>%myfiles%\unpart.txt
echo remove all >>%myfiles%\unpart.txt
echo exit >>%myfiles%\unpart.txt
diskpart /s %myfiles%\unpart.txt
del /f /q %myfiles%\unpart.txt>NUL 2>NUL
)
del /f /q %myfiles%\boot*.exe>NUL 2>NUL
del /f /q %myfiles%\win7ldr*>NUL 2>NUL
del /f /q %myfiles%\*.bin>NUL 2>NUL
del /f /q %myfiles%\*.xrm-ms>NUL 2>NUL
echo 卸载成功,软件将退出... │ Succeed, Exit...
pause
exit

:leader
call :100
for %%A in (Z: Y: X: W: V: U: T: S: R: Q: P: O: N: M: L: K: J: I: H: G: F: E: D: C: B:) do (
        if exist %%A\bootmgr (
                if not exist %%A\setup.exe (
                        echo.
                        echo 正在写入%%A盘引导... │ writing %%A leader...
                        echo.
                        if exist %%A\menu.lst attrib %%A\menu.lst -h -r -s
                        if exist %%A\menu.lst ren %%A\menu.lst menu_lst.bak
                        if exist %%A\grldr attrib %%A\grldr -h -r -s
                        copy %myfiles%\win7ldr1 /b + %myfiles%\%oe%.bin /b + %myfiles%\win7ldr2 /b %%A\grldr /b>NUL 2>NUL
                        attrib %%A\grldr +h +s +r
                        %myfiles%\bootinst.exe /nt60 %%A
                )
        )
)
if "%diskyes%"=="disky" (
del /f /q %myfiles%\unpart.txt>NUL 2>NUL
echo select volume %target% >>%myfiles%\unpart.txt
echo remove all >>%myfiles%\unpart.txt
echo exit >>%myfiles%\unpart.txt
diskpart /s %myfiles%\unpart.txt
del /f /q %myfiles%\unpart.txt>NUL 2>NUL
)
goto :eof

:100
set diskyes=diskn
for %%A in (Z: Y: X: W: V: U: T: S: R: Q: P: O: N: M: L: K: J: I: H: G: F: E: D: C: B:) do (
                if exist %%A\bootmgr goto :eof
)
                        echo.
                        echo 发现隐藏分区... │ Find the hidden partition...
                        echo.
                        set diskyes=disky
                        diskpart /s %myfiles%\list.txt
:settarget
set target=
set /p target=  请输入100MB隐藏分区所在卷序号(0/1..)│Which is the 100MB:
IF not "%target%"=="" SET target=%target:~0,1%
if "%target%"=="" goto :settarget
del /f /q %myfiles%\part.txt>NUL 2>NUL
echo select volume %target% >>%myfiles%\part.txt
echo assign letter=B >>%myfiles%\part.txt
echo exit >>%myfiles%\part.txt
diskpart /s %myfiles%\part.txt
del /f /q %myfiles%\part.txt>NUL 2>NUL
goto :eof

:license
echo.
echo 正在导入证书文件... │ setup license...
echo.
cscript %windir%\system32\slmgr.vbs -ilc %myfiles%\%oe%.xrm-ms
del /f /q %myfiles%\boot*.exe>NUL 2>NUL
del /f /q %myfiles%\win7ldr*>NUL 2>NUL
del /f /q %myfiles%\*.bin>NUL 2>NUL
del /f /q %myfiles%\*.xrm-ms>NUL 2>NUL
goto :eof

:key
echo.
echo 正在导入序列号... │ setup key...
echo.
cscript %windir%\system32\slmgr.vbs -ipk %ke%
goto :eof

[课程]FART 脱壳王!加量不加价!FART作者讲授!

收藏
免费 0
支持
分享
最新回复 (8)
雪    币: 563
活跃值: (95)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
学习下批处理命令用法
2010-1-13 15:26
0
雪    币: 37
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
谁能讲一下它是如何硬刷的bios,我只看到每个版本有一个key, 但是只有一个key,真的可行吗?如果都用这个脚本激活,key岂不是都一样了?
2010-1-13 16:04
0
雪    币: 391
活跃值: (10)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
4
把系列号导出来自己就可以激活了吧
2010-1-19 17:39
0
雪    币: 216
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
正在为win7头痛
2010-5-23 19:56
0
雪    币: 660
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
- - 不行的.
2010-8-14 16:50
0
雪    币: 114
活跃值: (180)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
7
看不懂,膜拜一下
2010-8-27 13:25
0
雪    币: 230
活跃值: (17)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
tgs
8
没有刷BIOS 完全软改
2010-8-29 13:25
0
雪    币: 207
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
9
不用激活啊,直接下免激活的旗舰版的win7
2010-8-30 17:09
0
游客
登录 | 注册 方可回帖
返回
//