Announcement

Collapse
No announcement yet.

wana extrack the password in the comment of Winrar archive and extract the files allready passworded

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gallaxial
    Administrator
    • Sep 2023
    • 25

    wana extrack the password in the comment of Winrar archive and extract the files allready passworded

    @echo on
    cls
    setlocal enabledelayedexpansion

    cd /d F:\FILES\Epub
    for /r %%a in (*.rar) do "C:\Program Files\WinRAR\WinRAR.exe" cw -y "%%a" "E:\UPL\%%~na.txt"
    exit

    -----------------
    Name Files: Files.rar , this files have a comment and i use this Batch Script to Extract the comment in GUI Winrar
    its Working fine , I use THIS Batch files to read the comment

    for /r F:\FILES\Epub %%a in (*.rar) do "C:\Program Files\WinRAR\WinRAR.exe" cw -y "%%a" "E:\UPL\%%~na.txt"

    instead of files, i want to put in a Variable and use this: To eXtract the files with the password Found

    FILE:"E:\UPL\%%~na.txt"
    --Comment in the Winrar------------------------
    Welcome, to get files its passworded
    Pw: LogoX
    Use this password
    -----------------------------------------------

    for /r F:\FILES\Epub %%a in (*.rar) do "C:\Program Files\WinRAR\WinRAR.exe" x -y -p%password% "%%a" d:\temp\

    this way the Batch script look the the comment and FOUND Pw:LogoX using winrar to Extract it !
    But do not known how to do !



    Click image for larger version

Name:	2023-11-05_211907.gif
Views:	10
Size:	9.9 KB
ID:	149
  • Gallaxial
    Administrator
    • Sep 2023
    • 25

    #2
    I found how to do it

    ---------------------------------------------------------------------------------------------
    @echo off
    set max_path=240
    cls
    rem setlocal enableextentions
    rem setlocal enabledelayedexpansion
    title Extract Password

    REM Folder to Look at *.RAR files
    CD /D F:\FILES\Epub\##

    REM look files in RAR inside Folder and subfolder
    for /r %%a in (*.rar) do (

    REM Extract the Comment in RAR archive
    "C:\Program Files\WinRAR\WinRAR.exe" cw -y "%%a" "E:\UPL\comment.txt"

    REM Find the Line PW:
    find /i "PW:" <E:\UPL\comment.txt >E:\UPL\comment2.txt

    REM Remove the WORD PW: and Keep only the password and use it to Extract the Archive in Folder e:\upl\
    for /f "tokens=2,20 delims= " %%b in (E:\UPL\comment2.txt) do "C:\Program Files\WinRAR\RAR.exe" e -y -P%%b "%%a" e:\upl\
    DEL /Q E:\UPL\comment.txt
    DEL /Q E:\UPL\comment2.txt
    )
    exit



    Comment


    • Gallaxial
      Gallaxial commented
      Editing a comment
      i try with couple of files it Work
Working...
😀
🥰
🤢
😎
😡
👍
👎