Read and Write to Winrar.rar file that has a password - Forum

Forum Navigation
You need to log in to create posts and topics.

Read and Write to Winrar.rar file that has a password

Hi guys

You know that with Winrar you can archive files and also set a password to open that archive files. Is it possible to write and read from and to a Winrar file that has a password. I want to save passwords in that Winrar file but if someone wants to open that winrar file it ask for a password.

I tried but with no success.

Thank You

Ok I did my research.... It's not possible! I'm using lgaEncrypt and lgaDecrypt that works fine for me.

Glad to know that you found a work around.

Actually, it can be done somehow. You need to copy rar.exe & unrar.exe from Program Files\WinRAR to  your App's folder.

Then execute the Run command

Run "rar.exe" "a -hppassword123 h:\filename.rar c:\pdf"

Run "unrar.exe" "x filename.rar -ppassword123"
.Do not give space after -p

Source: https://askubuntu.com/questions/513647/unrar-folder-with-password-terminal

Hi neodude

Yes it will be still great if I can do it this way. If you don't mind can you please make me a demo Pub with this two actions

1. To read and write to a text file (beats.txt) within the password protected .rar file

a. At startup it will read the text file in the password protected .rar file into ListBox1

b. With a button it will write "Variable" to password protected text file (beats.txt)

2. To play a wave file (drumbeat.wav) within the password protected .rar file

use password "1234" for example

 

I have already copied Rar and UnRAR to my App folder

Thank You!

Hello @impactband4u

To read and write to a text file (beats.txt) within the password protected .rar file

Actually, the rar file needs to be extracted to some temporary folder with the help of unrar.exe and then the FileToVar & PlaySoundFile commands need to be used.

So, are you trying to use rar file as a security system to protect your app's data?

Yes, I can make a demo for it.

So, are you trying to use rar file as a security system to protect your app's data?

Hi neodude, yes i was thinking of doing that, but now that you said the files must be extracted to a temporary file, my question is....

  1. Will it save the changes made to the original .rar file or only to the temporary .rar file?
  2. If it extract to a temporary file, is it possible to get hold of the content without the password?

I use "TempDir" sometimes if i don't want to show the content in the "PubDir' but some software that cleans up the computer also removes everything in the "TempDir' so it can be a problem sometimes

Regards

A folder will be created in TempDir and your rar files will be extracted to it. After that you can access those files with VisualNEO's commands.

After editing any extracted file, you need to create a new rar file and replace your previous rar file.

It is rare that some cleanup software will automatically clean the TempDir. As a remedy to this scenario, you should use the FolderExists command and re-extract the files in case the folder goes missing.

  1. If it extract to a temporary file, is it possible to get hold of the content without the password?

Since, the contents are extracted to a temporary folder, one who knows about the Temporary Folder can get a hold of your files.

For absolute security, you need to extract the RAR file to your RAM which is not easy with VisualNEO.

This is how you can prevent a file from being deleted - https://visualneo.com/forum/topic/lock-a-file-with-visualneo#postid-953

Hello , i need help in How to read text file from winrar.rar file has a password , i haven't experience in computer security so, please can you write step by step how to do that

Well, actually I know that with winrar I can archive files and also set them a password, for opening them later by inputting that password.

Could any upload a freeware version of RAR / UnRAR programs?

Thanks in advance

@daviddeargentina

If I understand wikipedia correctly, RAR can only be unpacked for free. The packer is paid.

Quote from DaviddeArgentina on October 30, 2021, 9:44 pm

Could any upload a freeware version of RAR / UnRAR programs?

Thanks in advance

You can use 7Zip with AES-256 encryption in 7z and ZIP formats. It is free and has a command line.

https://www.7-zip.org/

@cn_iceman

7-zip is a good archiver, but it can only decompress RAR, and cannot compress.

@vadim

 

Yes, I know. But the idea was to suggest using 7z or ZIP archives instead of RAR.

thanks all!

Well, actually I know that with winrar I can archive files and also set them a password, for opening them later by inputting that password. And yes it is possible to write and read from, and to a winrar file that has a password. Probably you did something wrong, that’s why you were not able to put a password. File encryption is an easy task that is helps us to protect our data, and only those who have the password, can have access to it. If you are an active mac user and are interested in testing your network speed, just use [url= https://okaapps.com/product/1455463454%5D Mac Wifi Speed test [/url], it has a nice user design, and it’s easy to apply.

Hello,

Remember that VNW now supports protected ZIP in the core runtime.

RAR may only have a slightly better compression-ratio.

Regards

Hans-Peter

Vadim and Robert Marquardt have reacted to this post.
VadimRobert Marquardt