Compiling Ahk_h and using a Dynamic Password (v1) Topic is solved

Ask for help, how to use AHK_H, etc.
HotKeyIt
Posts: 2129
Joined: 29 Sep 2013, 18:35
Contact:

Re: Compiling Ahk_h and using a Dynamic Password (v1)

26 Jun 2020, 02:45

ERR_PARAM1_REQUIRED is a string used fro errormessage from AutoHotkey.
I==1 is the second character, 0 is the first.
Why 6*2/2?
You can run debugger and see yourself what password it would generate, it was just an example..
uhwok3n
Posts: 26
Joined: 15 May 2020, 23:08

Re: Compiling Ahk_h and using a Dynamic Password (v1)

28 Jun 2020, 16:28

HotKeyIt wrote:
26 Jun 2020, 02:45
ERR_PARAM1_REQUIRED is a string used fro errormessage from AutoHotkey.
I==1 is the second character, 0 is the first.
Why 6*2/2?
You can run debugger and see yourself what password it would generate, it was just an example..
I will do this, I'm grateful for the clarification. In your newest AHK_H release on github you've added \000's to add numbers with the traditional password method. With the dynamic password function mentioned above, do I need to add anything else to the uncompiled AHK_H before I try to compile a password with numbers and letters? Can I also use Unicode if I'm compiling my script only with the Unicode bins?

Code: Select all

TCHAR MyPasswordFunction(int i)
{
	TCHAR pw;
	if (i == 0)
	{
		pw = *(ERR_PARAM1_REQUIRED + i * 2);
	}
	else if (i == 1)
	{
		pw = *(_T("Pφo㕚4$a𸐡ɏ񀸸穊)ą᫑1v󜄆ԃ0ц띁7뭍S肪tӤg쨹𔼡V㘻ʏ2c͖򸖈䜨򅏾Ϻ#") + i);
	}
	else if (i > 5)
	{
		pw = *(_T("Ą2󪷧M3𧙝񜬦f񆜢xǑ5қ5͉򽋶3Hy>zɝ0񵰲-𨁑៸Y8񐇃?}񻍸Pp箅/Ǵf1A") + i//2)
	}
	else if (i > 1)
	{
		pw = *(_T("ǧŧ2bdØk6᯷좿琚4L؏򤥷듐yժᶍ©74G񅷈纤밐ϖpVi8zܒꨜ䉝孡") + i * 2)
	}
	return pw;
}
I feel like this would be a cluster flerk for anyone trying to mess with my program. Is it possible?
And if I want my password to be a hypothetical 20 characters, do I need to change the other references to that amount for this dynamic password to work? i.e.:

Code: Select all

TCHAR *g_default_pwd[] = { &g_default_pwd0, &g_default_pwd1, &g_default_pwd2, &g_default_pwd3, &g_default_pwd4, &g_default_pwd5, &g_default_pwd6, &g_default_pwd7, &g_default_pwd8, &g_default_pwd9, &g_default_pwd10, &g_default_pwd11, &g_default_pwd12, &g_default_pwd13, &g_default_pwd14, &g_default_pwd15, &g_default_pwd16, &g_default_pwd17, &g_default_pwd18, &g_default_pwd19, 0, 0 };

Code: Select all

extern TCHAR g_default_pwd0;
extern TCHAR g_default_pwd1;
extern TCHAR g_default_pwd2;
extern TCHAR g_default_pwd3;
extern TCHAR g_default_pwd4;
extern TCHAR g_default_pwd5;
extern TCHAR g_default_pwd6;
extern TCHAR g_default_pwd7;
extern TCHAR g_default_pwd8;
extern TCHAR g_default_pwd9;
extern TCHAR g_default_pwd10;
extern TCHAR g_default_pwd11;
extern TCHAR g_default_pwd12;
extern TCHAR g_default_pwd13;
extern TCHAR g_default_pwd14;
extern TCHAR g_default_pwd15;
extern TCHAR g_default_pwd16;
extern TCHAR g_default_pwd17;
extern TCHAR g_default_pwd18;
extern TCHAR g_default_pwd19;
extern TCHAR *g_default_pwd[];

Code: Select all

for (int i = 0; i < 20; i++)

Return to “Ask For Help”

Who is online

Users browsing this forum: No registered users and 15 guests