SRL Archive - Suggestions

Md5


Shuttleu

2010-10-01 18:19:49

is it possible to include a md5 function?

i was thinking of making a auth site that people can use when that sell scripts, and i have come up with a way to do it but i need to use the MD5 hash but there is no function for it

~shut

Wizzup?

2010-10-01 19:48:01

Hmm. Yeah sure. File a bug please? ( I really can't keep a tab open for each bug in here. :p )

The Claw

2010-10-02 04:04:27

Does that mean you support the selling of Simba scripts?

TomTuff

2010-10-02 04:08:28

From: The Claw
Does that mean you support the selling of Simba scripts?


i think he wants to use simba to manage the buying/selling, not the scripts themselves being made with SIMBA/SRL

Wizzup?

2010-10-02 07:12:53

From: The Claw
Does that mean you support the selling of Simba scripts?


No, but the function itself is quite useful, I suppose. I am not fond of script selling, but there's no reason to cripple Simba just to make sure people don't do it. :)

It's not like people can't write their own MD5 if they really need it.

moparisthebest

2010-10-02 14:51:27

It seems like it might be handier to have a plugin (or extension) with various hashing functions.

Also, it's generally bad practice to use md5 for any security reasons now, as collisions have been found and it is getting easier and easier to brute force. You should use sha1 and no matter what hash function you use always use a salt!

Shuttleu

2010-10-02 19:28:16

alright SHA1 then

also i was going to hash 1 thing, then hash it again with something else
then hash it again with something else

so it was gonna be hashed 3 times

~shut

Dgby714

2010-10-03 00:10:17

I wrote this up quickly but for some reason it crashes Simba >..<

Tniffoc

2010-10-03 00:15:07

From: moparisthebest
It seems like it might be handier to have a plugin (or extension) with various hashing functions.

Also, it's generally bad practice to use md5 for any security reasons now, as collisions have been found and it is getting easier and easier to brute force. You should use sha1 and no matter what hash function you use always use a salt!


So funny how Win XP doesn't salt its users passwords.

i luffs yeww

2010-10-03 01:20:09

From: Dgby714
I wrote this up quickly but for some reason it crashes Simba >..<


Uhh..

[PHP]
function GetFunctionCount(): Integer; stdcall; export;
begin
Result := 2;
end;

function GetFunctionCallingConv(x : integer) : integer; stdcall;
begin
if InRange(x, 0, GetFunctionCount - 1) then
Result := 1;
end;
[/PHP]

What's the point of GetFunctionCount or the GetFunctionCount - 1? >_> GetFunctionCount would always return 2, yes? So GetFunctionCallingConv would always be if InRange(x, 0, 1) then Result := 1;, right?

Daniel

2010-10-03 02:09:21

From: i luffs yeww
Uhh..

What's the point of GetFunctionCount or the GetFunctionCount - 1? >_> GetFunctionCount would always return 2, yes? So GetFunctionCallingConv would always be if InRange(x, 0, 1) then Result := 1;, right?

You've obviously never made plugins.

The latter includes the zero, so, if instead you put 2, then it's like saying there, 0, 1, 2 methods yet there aren't.

Dgby714

2010-10-03 02:16:49

Ive got it working.

Example Simba Script: http://simba.ionoone.com/show/PhSUXKsLcaq0qBRBc7us/
When Wizzup gets up/back I have some questions for him =)

I luffs yeww: Those functions are used by simba =)
It just makes it easier changing 1 number when adding functions too the plugin then going thru it and changing 3

i luffs yeww

2010-10-03 02:53:21

I don't even understand right now. I'm sure you're right.

Sublime is amazinhg dude.

moparisthebest

2010-10-03 12:29:23

From: Shuttleu
alright SHA1 then

also i was going to hash 1 thing, then hash it again with something else
then hash it again with something else

so it was gonna be hashed 3 times

~shut


There's no reason for hashing 3 different times, as long as you use a salt you will be pretty safe. SMF for example hashes passwords like so: sha1(sha1(pass)+salt), but sha1(pass+salt) should be sufficient. :)

Shuttleu

2010-10-03 12:39:14

From: moparisthebest
There's no reason for hashing 3 different times, as long as you use a salt you will be pretty safe. SMF for example hashes passwords like so: sha1(sha1(pass)+salt), but sha1(pass+salt) should be sufficient. :)


well the reason for 3 hashings is because there is gonna be 3 different thngs to hash, this way it will be impossible for someone to swap a user and pass (or hopefully if i find a way, take it out of the script)

~shut

Harry

2010-10-03 14:25:58

IANAL, but I am pretty sure you can not sell scripts that are written for Simba unless you provide the source (which defeats the whole reasoning of selling a script, as they can just remove the auth then), under the GPL3.

Shuttleu

2010-10-03 14:42:38

From: Harry
IANAL, but I am pretty sure you can not sell scripts that are written for Simba unless you provide the source (which defeats the whole reasoning of selling a script, as they can just remove the auth then), under the GPL3.


maybe here, but at other places like sythe…

~shut

Harry

2010-10-03 14:55:19

From: Shuttleu
maybe here, but at other places like sythe…

It's in violation of the GPL, which can result in legal problems regardless of what site is allowing the violations.

Shuttleu

2010-10-03 14:57:25

From: Harry
It's in violation of the GPL, which can result in legal problems regardless of what site is allowing the violations.


wait, so simba scripts have to have their source posted as well?

~shut

Wizzup?

2010-10-03 15:11:38

Harry, Simba being GPL doesn't mean that all things that run in Simba have to be GPL. It's like saying ``everything compiled with gcc has to be GPL''. That's simply not the case.

Harry

2010-10-03 15:12:39

From: Shuttleu
wait, so simba scripts have to have their source posted as well?

As I said, IANAL, but I am pretty sure all components of a GPL licensed program must be open-sourced under the same license as well.

From: Wizzup?
Harry, Simba being GPL doesn't mean that all things that run in Simba have to be GPL. It's like saying ``everything compiled with gcc has to be GPL''. That's simply not the case.

Oh.

Wizzup?

2010-10-03 15:47:58

On the other hand, if someone is going to use (read: compile with its own project) the MMLCore/ functions to make it's own "Simba" alike program or just to add Simba functionality to script written purely in FPC (or another compiled language), etc; then it *will* need to be GPL.

Wizzup?

2010-10-25 06:59:26

Most of this has been merged into Simba. Expect it in the new release.