Page 1 of 2
login system
Posted: Mon Nov 10, 2014 10:12 pm
by dragancesu
I tried to make a simple system to log on to the system, you just need to compile
User and password are stored in users.dbf and initially is admin / admin, when you sign up you'll be able to add, edit, delete,
There is encryption of passwords as an example, it is a function code_pass and write one of your, the example is simple, it adds 20 to characters of password
Re: login system
Posted: Mon Nov 10, 2014 11:41 pm
by danielmaximiliano
Dragancesu , gracias por compartir .....
Re: login system
Posted: Tue Nov 11, 2014 12:56 am
by esgici
dragancesu wrote:I tried to make a simple system to log on to the system, you just need to compile...
(When pressed escape key)
Error BASE/1066 Argument error: conditional
Called from AT_LOGIN(49)
Called from (b)LOGIN(23)
Called from _DOCONTROLEVENTPROCEDURE(5745)
Called from EVENTS(803)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5413)
Called from LOGIN(43)
Called from ON_START(74)
Called from (b)MAIN(30)
Called from _PROCESSINITPROCEDURE(5567)
Called from _ACTIVATEWINDOW(5318)
Called from MAIN(65)
Second problem : advised "user" ("admin") is lovercase and textbox property is uppercase; problem with non-english caharacters.
Re: login system
Posted: Tue Nov 11, 2014 1:03 am
by Javier Tovar
danielmaximiliano wrote:Dragancesu , gracias por compartir .....
+1
Re: login system
Posted: Tue Nov 11, 2014 7:59 am
by dragancesu
Thanks for your comments
I tried to make a simple login system and I think I did, I saw that there is an error, the program has changed many times that I forgot to test it all again, the solution is
ON ESCAPE KEY ACTION at_login (.f.)
The most important function is code_pass that needs to hide some encryption password, the program is given as it may seem, initially placed combination admin / admin that should work, do not use UTF but I tried it with non-standard letters of the Latin alphabet and working šđžćč
in Clipper I used the C function and to
Code: Select all
CLIPPER CODEPASS(void)
{
unsigned int i, j, c, c1, c2;
char _in[20], _out[22], c11, c22;
strcpy( _out, " " );
strcpy( _in, _parc(1) );
j = _parclen(1);
if (j > 10) j = 10;
if (j < 10)
for(i=j;i<10;i++) strcat(_in," "); j = 10;
for(i=0;i<j;i++)
{
c = _in[i]; c1 = c / 10; c2 = c - ( c1 * 10 );
c11 = c1 + 200; c22 = c2 + 200;
_out[i*2] = c11; _out[i*2+1] = c22;
};
_retc( _out );
}
Re: login system
Posted: Tue Nov 11, 2014 3:03 pm
by srvet_claudio
dragancesu wrote:Thanks for your comments
I tried to make a simple login system and I think I did, I saw that there is an error, the program has changed many times that I forgot to test it all again, the solution is
ON ESCAPE KEY ACTION at_login (.f.)
The most important function is code_pass that needs to hide some encryption password, the program is given as it may seem, initially placed combination admin / admin that should work, do not use UTF but I tried it with non-standard letters of the Latin alphabet and working šđžćč
in Clipper I used the C function and to
Code: Select all
CLIPPER CODEPASS(void)
{
unsigned int i, j, c, c1, c2;
char _in[20], _out[22], c11, c22;
strcpy( _out, " " );
strcpy( _in, _parc(1) );
j = _parclen(1);
if (j > 10) j = 10;
if (j < 10)
for(i=j;i<10;i++) strcat(_in," "); j = 10;
for(i=0;i<j;i++)
{
c = _in[i]; c1 = c / 10; c2 = c - ( c1 * 10 );
c11 = c1 + 200; c22 = c2 + 200;
_out[i*2] = c11; _out[i*2+1] = c22;
};
_retc( _out );
}
This is in HMG:
Code: Select all
HB_FUNC ( CODEPASS )
{
unsigned int i, j, c, c1, c2;
TCHAR _in[20], _out[22], c11, c22;
lstrcpy ( _out, _TEXT(" ") );
lstrcpy ( _in, HMG_parc(1) );
j = lstrlen ( HMG_parc(1) );
if (j > 10) j = 10;
if (j < 10)
for(i=j;i<10;i++) lstrcat(_in,_TEXT(" ")); j = 10;
for(i=0;i<j;i++)
{
c = _in[i]; c1 = c / 10; c2 = c - ( c1 * 10 );
c11 = c1 + 200; c22 = c2 + 200;
_out[i*2] = c11; _out[i*2+1] = c22;
};
HMG_retc( _out );
}
Re: login system
Posted: Tue Nov 11, 2014 3:18 pm
by Pablo César
Thank you Dragan and Claudio for your contribs. Would you please give us an example how to add CODEPASS ?
Re: login system
Posted: Tue Nov 11, 2014 4:46 pm
by Javier Tovar
Pablo César wrote:Thank you Dragan and Claudio for your contribs. Would you please give us an example how to add CODEPASS ?
+1
Re: login system
Posted: Tue Nov 11, 2014 8:18 pm
by dragancesu
Codepass not a specific function, in Clipper is done in C in that it could not "decompile", in the harbor this is not necessary because the real C programs.
in this login system is designed code_pass function that make you want to hide the password, it can be simple or complicated, your choices
Re: login system
Posted: Wed Nov 12, 2014 8:48 am
by Agil Abdullah
Thanks to Dragancesu & Dr.Soto for sharing.