Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: umar4911 on Mar 05, 2019, 03:36 PM

Title: Hashing plugin in Linux
Post by: umar4911 on Mar 05, 2019, 03:36 PM
Vps = CentoLinux version 7

when loading Hashing plugin, it says:

Plugin error >> dlopen() 'plugins/hashing04rel64.so' failed: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by plugins/hashing04rel64.so)
Failed to load plugin: hashing04rel64

what's the fix
Title: Re: Hashing plugin in Linux
Post by: dracc on Mar 06, 2019, 09:04 AM
Is changing your distribution an option?
CentOS 7.6 (latest release) still runs Linux 3.10, a severely outdated kernel which no longer receives upstream support.
This makes me believe CentOS doesn't update packages unless strictly necessary. This would mean you'd have to compile your own libstdc++ as the one you have installed currently is too old to run the hashing plugin.

(I just realized you just posted your error message without any question but I'm guessing you're wondering how to fix it?)
Title: Re: Hashing plugin in Linux
Post by: umar4911 on Mar 06, 2019, 09:45 AM
Quote from: dracc on Mar 06, 2019, 09:04 AMIs changing your distribution an option?
CentOS 7.6 (latest release) still runs Linux 3.10, a severely outdated kernel which no longer receives upstream support.
This makes me believe CentOS doesn't update packages unless strictly necessary. This would mean you'd have to compile your own libstdc++ as the one you have installed currently is too old to run the hashing plugin.

(I just realized you just posted your error message without any question but I'm guessing you're wondering how to fix it?)
Yes I want to fix it and thanks, I edited post. Now I am not similar to this plugin coding, can someone help out?
Title: Alternate to Hashing plugin
Post by: umar4911 on Mar 06, 2019, 09:47 AM
Any alternates to hashing plugin for hashing passwords
Title: Re: Alternate to Hashing plugin
Post by: dracc on Mar 06, 2019, 02:55 PM
There are many ways to solve the actual problem;
1. Writing your own hashing algorithm in Squirrel.
2. Updating libstdc++.
3. Recompiling the hashing plugin.
Title: Re: Alternate to Hashing plugin
Post by: umar4911 on Mar 06, 2019, 04:31 PM
Quote from: dracc on Mar 06, 2019, 02:55 PM1. Writing your own hashing algorithm in Squirrel.

How can this be done?
Title: Re: Alternate to Hashing plugin
Post by: DizzasTeR on Mar 06, 2019, 05:08 PM
https://forum.vc-mp.org/?topic=6119.0
Title: Re: Alternate to Hashing plugin
Post by: umar4911 on Mar 07, 2019, 10:52 AM
Quote from: Doom_Kill3R on Mar 06, 2019, 05:08 PMhttps://forum.vc-mp.org/?topic=6119.0
The plugin is loaded but it stills gives error that index SHA256 doesn't exist even with MD5 weird..
Title: Re: Alternate to Hashing plugin
Post by: dracc on Mar 07, 2019, 12:44 PM
Quote from: umar4911 on Mar 07, 2019, 10:52 AM
Quote from: Doom_Kill3R on Mar 06, 2019, 05:08 PMhttps://forum.vc-mp.org/?topic=6119.0
The plugin is loaded but it stills gives error that index SHA256 doesn't exist even with MD5 weird..
How are you calling the SHA256 function? Sounds like you're using something similar tohash['SHA256'] <- "secret"; which obviously would be incorrect.

For reference, the official plugin syntax would be local hashed <- SHA256("secret");
Title: Re: Alternate to Hashing plugin
Post by: umar4911 on Mar 07, 2019, 01:08 PM
Quote from: dracc on Mar 07, 2019, 12:44 PM
Quote from: umar4911 on Mar 07, 2019, 10:52 AM
Quote from: Doom_Kill3R on Mar 06, 2019, 05:08 PMhttps://forum.vc-mp.org/?topic=6119.0
The plugin is loaded but it stills gives error that index SHA256 doesn't exist even with MD5 weird..
How are you calling the SHA256 function? Sounds like you're using something similar tohash['SHA256'] <- "secret"; which obviously would be incorrect.

For reference, the official plugin syntax would be local hashed <- SHA256("secret");
I am using like the official plugin


SHA256(pass)
Title: Re: Alternate to Hashing plugin
Post by: dracc on Mar 07, 2019, 01:24 PM
What does the line that gives the error look like?
Title: Re: Alternate to Hashing plugin
Post by: umar4911 on Mar 07, 2019, 01:27 PM
Quote from: dracc on Mar 07, 2019, 01:24 PMWhat does the line that gives the error look like?
Index SHA256 doesn't exist
Title: Re: Alternate to Hashing plugin
Post by: dracc on Mar 07, 2019, 01:32 PM
Quote from: umar4911 on Mar 07, 2019, 01:27 PM
Quote from: dracc on Mar 07, 2019, 01:24 PMWhat does the line that gives the error look like?
Index SHA256 doesn't exist
Yeah, that's the error message, but what does your line of code that gives this error look like?
Also, do you get a line stating that the hashing plugin was loaded on server startup?
Title: Re: Alternate to Hashing plugin
Post by: umar4911 on Mar 07, 2019, 03:23 PM
Quote from: dracc on Mar 07, 2019, 01:32 PM
Quote from: umar4911 on Mar 07, 2019, 01:27 PM
Quote from: dracc on Mar 07, 2019, 01:24 PMWhat does the line that gives the error look like?
Index SHA256 doesn't exist
Yeah, that's the error message, but what does your line of code that gives this error look like?
Also, do you get a line stating that the hashing plugin was loaded on server startup?
Yes it shows that hashing plugin is loaded. Since the official plugin gave error of binaries or whatever, I used the one made by SLC and it loaded but the error persists
Title: Re: Hashing plugin in Linux
Post by: Xmair on Mar 08, 2019, 06:10 AM
That problem occurs to me as well but using an older version fixes it.
Title: Re: Hashing plugin in Linux
Post by: ysc3839 on Mar 08, 2019, 10:34 AM
You can compile the plugin on your server since the plugin is open-source. This should fix that issue.
Title: Re: Hashing plugin in Linux
Post by: umar4911 on Mar 08, 2019, 12:51 PM
Quote from: Xmair on Mar 08, 2019, 06:10 AMThat problem occurs to me as well but using an older version fixes it.
api issue
Title: Re: Hashing plugin in Linux
Post by: ysc3839 on Mar 08, 2019, 07:27 PM
I merged two topics.

And here is a Squirrel implemention of sha256.
https://gist.github.com/ysc3839/fae61e880be9368b5154b42ce4d2d879
I don't know if there is any bug. Still need more tests.

Credit to B-Con (https://github.com/B-Con) for original code (https://github.com/B-Con/crypto-algorithms/blob/master/sha256.c).

Edit: And sha1. https://gist.github.com/ysc3839/187c3bf6f27bcfc1fccd783bc9b717fc
Title: Re: Hashing plugin in Linux
Post by: umar4911 on Mar 09, 2019, 12:34 PM
Quote from: ysc3839 on Mar 08, 2019, 07:27 PMI merged two topics.

And here is a Squirrel implemention of sha256.
https://gist.github.com/ysc3839/fae61e880be9368b5154b42ce4d2d879
I don't know if there is any bug. Still need more tests.

Credit to B-Con (https://github.com/B-Con) for original code (https://github.com/B-Con/crypto-algorithms/blob/master/sha256.c).

Edit: And sha1. https://gist.github.com/ysc3839/187c3bf6f27bcfc1fccd783bc9b717fc

Thanks! Well it created an array but easy to convert to string.

Problem solved