Jump to content

Recommended Posts

Posted

Hello.

I need to make password protected Self Extracting Archive to become unusible in 2 weeks

I have found Recource Hacker, is there a way to add business logic to Dialogs? like for example

The password prompt dialog

501 DIALOG 0, 0, 186, 82

STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU

CAPTION "Enter password"

LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

FONT 8, "MS Shell Dlg"

{

CONTROL "&Enter password:", 1000, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 7, 7, 172, 8

CONTROL "", 1001, EDIT, ES_LEFT | ES_PASSWORD | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 7, 19, 172, 14

CONTROL "&Show password", 1002, BUTTON, BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 41, 172, 10

CONTROL "OK", 1, BUTTON, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 41, 61, 64, 14

CONTROL "Cancel", 2, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 115, 61, 64, 14

}

to add something like

501 DIALOG 0, 0, 186, 82

STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU

CAPTION "Enter password"

LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

FONT 8, "MS Shell Dlg"

{

CONTROL "&Enter password:", 1000, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 7, 7, 172, 8

CONTROL "", 1001, EDIT, ES_LEFT | ES_PASSWORD | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 7, 19, 172, 14

CONTROL "&Show password", 1002, BUTTON, BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 41, 172, 10

if (DateTime.Now < "2011.01.14")

CONTROL "OK", 1, BUTTON, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 41, 61, 64, 14

CONTROL "Cancel", 2, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 115, 61, 64, 14

}

in ther words Hide OK button from user.

explanation

Self extracting files contains of 2 parts

7z.SFX file which can be edited by Recource Hacker, and Archive

every time user downloads archive i would change 7z.SFX file which gets embeded into Self extracting archive in a way so OK button would be hidden in 2 weeks and he could not submit password.

If you think of something else to make files expire please tell me it can be not password protected.

I am currently searching for any solution for files to expire.


Posted

I'm pretty sure you won't like my answer but 7zip is open source and its source code is in C++ langage so your idea shouldn't work.

Also, if someone download your file and extract it right after with 7zip, he can recompress or copy the files and have a working copy even after expiration date.

I think autoit might help you if you want to build a custom sfx installer based on 7zip (you'll still have the above problem).

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...