dreamstalker / rehlds

Reverse-engineered HLDS
GNU General Public License v3.0
652 stars 167 forks source link

[Linux Only Issue] Hook GetEntityInit #722

Closed DarthMan closed 3 years ago

DarthMan commented 5 years ago

Hello. When trying to hook the function GetEntityInit on Linux ReHLDS, the server crashes with a segmentation fault. On Windows it all works fine. Same goes if using a HLDS linux server. It's just Linux ReHLDS where it's not working fine.

I also recommend adding more hooks to ReAPI if possible, and maybe integrating this function somewhere to be hookable, as it's quite useful. For example, joropito wrote a plug-in that makes use of this function. The main purpose of it is to fix entities that are not valid in mods such as TFC, for example. Basically about making the maps compatible with custom mods.

https://forums.alliedmods.net/showthread.php?p=1647630

I also recommend that you add more hooks to ReHLDS (hookchains), such as Steam_GSBSecure to be able to determine if a server is VAC-secured or not.

Here I attach some code, the Orpheu module was used.


public plugin_init()
{
    g_hFuncGetEntityInit = OrpheuGetFunction("GetEntityInit");

    if(g_hFuncGetEntityInit != OrpheuInvalidFunction)
    {
        g_hGetEntityInit = OrpheuRegisterHook(g_hFuncGetEntityInit, "OnGetEntityInit", OrpheuHookPre);
    }
}

public OrpheuHookReturn: OnGetEntityInit(const szClassName[])
{
    if(equal(szClassName, g_szWorldClass) || equal(szClassName, g_szTeleClass))
    {
        OrpheuSetParam(1, g_szTargetEntName);
    }

    return OrpheuIgnored;
}
StevenKal commented 5 years ago

If I can insist about this request, ReHLDS definitively needs more API functions...

The way all your API is designed is clean, but the fact you are against "memory hack the engine" and delivers an engine very not adapted for this is very bad/critical from my opinion. I'm not gonna waste my time and argue with you devs about that, you have your reasons, but at least, you could enhance the API to provide a workaround. The fact is, and especially due to this anti-mem hack problem, my opinion is that the ReHLDS's API is too weak (there are stuff, but a lot of them are more for your 3rd-party projects, or, a few others I even do not know what this does, I'll have to look into your sources). ReGameDLL_CS has a lot of things, I even think this is a bit too much (as some CBaseEntity virtual functions using API which I think, may not be fully needed, you mainly add this for the sake & your "addiction" of the performance or easy usage in coders's modules), but ReHLDS needs more things, even if most of the time coders much more need to "hack the game rather than the engine".

For example, I would like to see a new function, which exports the address of most of the "global variables" of the engine (as you did with the "GetAllowCheats", "GetCmdSource", etc. functions), you could make one via "enum" or "name", like "void (GetGlobalAddress)(const char *szName)" where we could pass as name, for example, "allow_cheats", "cvar_vars", "g_psvs", "g_psv", etc., the function will return the address (if(!strcmp(szName, "g_psvs")) return &g_psv..., etc.). One function, multiple addresses, simple, complete & very useful at once (just like the AMX/AMXX's player properties address function in modules API). You can fill that function with a bunch of global variables... And even why not almost all of them, more we can have, better it is, and this does not hurt, at least we can have the choice...

I would like to have those "g_psvs" & "g_psv" global private vars exported, due to their high utility and the fact they deal with important structures that handle many things (as resources, etc.). I know you've added some "IReHLDSServer<Static|Data>" structures relying a bit on those things, but the functions are "limited", this does not exposes everything. While on my upcoming project (next AMX version), I have the address of the "g_psv[s]", and all the offsets of the related structs, so I can deal with that I want with ease. But the "g_psv[s]" addresses I have for your engine could be broken on an update, that's why I'm asking those to be added, as a lot of others (this is not long to make), to guarantee a 100% reliability in the future.

I would like to see much more hooks (chains), as the "GetEntityInit" requested here, but also "ED_Free", which I really need for various upcoming features of my project. I know you've added a "PF_Remove" hook, but that's not the function ideal for my stuff (it's just the "RemoveEntity" func), I want the "one and only final one" which removes an entity (when FL_KILLME set, etc.). You may suggest me the "OnFreeEntPrivateData" from the API, well, for some reasons this one is not very good to match with my stuff, besides it's a middle-set notification like an event. So please add those both functions! Also, a lot of others could be added, I'm not gonna list them here, but you can easily search at through the web all the modules/plugins using memory functions, then wondering yourself if users may need those as API, or, browse your engine, and again, ask yourself which function could be useful for coders and which "utility rate" it has. Knowing the bunch of functions the engine has, you can certainely fill your hookchains list.

StevenKal commented 4 years ago

Please add more API functions guys.

StevenKal commented 4 years ago

Again (as recall for guys playing the dead...), please add more API functions guys. Your API is not enough filled, which is very very annoying knowing you have fucked up memory hacking at a dramatic status for apparently stupid & useless reasons which just do not worth the cost at all.

twisterniq commented 4 years ago

Again (as recall for guys playing the dead...), please add more API functions guys. Your API is not enough filled, which is very very annoying knowing you have fucked up memory hacking at a dramatic status for apparently stupid & useless reasons which just do not worth the cost at all.

You can create a pull request if you want to add things you need to use.

fant1kua commented 4 years ago

@eat1k He doesn't wanna to create PRs. It's just trolling. Nothing special.

DarthMan commented 4 years ago

Again (as recall for guys playing the dead...), please add more API functions guys. Your API is not enough filled, which is very very annoying knowing you have fucked up memory hacking at a dramatic status for apparently stupid & useless reasons which just do not worth the cost at all.

You can create a pull request if you want to add things you need to use.

It is better if this comes directly from the rehlds devs, as they are more experienced.

StevenKal commented 4 years ago

@eat1k He doesn't wanna to create PRs. It's just trolling. Nothing special.

You are right, I do not want to create PRs, for multiple reasons.

Firstly, I do not know how much how to use GitHub, and do not even care, I've just made an account for posting comments/requests, nothing more. And if at worse, I attempt doing this, and, in order to make the things right, I'll like to be able to test the changes, and so, be able to compile the ReHLDS, which may take me some time, or just be not possible since I'm using other compilers and I'm on Windows XP. But if in case I try this and I succeed with the compilers I'm using (MinGW & CygWin), believe me, it's very likely that I'll not hesistate to start making my own version (probably named "ReHLDS Evo", something like), which will contain a massively extended API, and I'll also try restoring memory hacking possibilities (at least make that possible again, even if sigs might be broken, but I'll design this differently with more exported stuff not being a problem for both Windows & Linux versions), because ReHLDS bothers me so much with this being so broken and devs doing nothing to change this. And I think the main devs might not like the fact I release my own version, which will "split" a little more the content, people, etc., which is basically not something I like, and so, not I want, there are already too many content being "split", that's quite enough, it's much better to centralize database on a single area/website, like here for ReHLDS, as example, and, let the original developers which are get use to it and competent regarding the maintenance of such project, make the changes themselves.

Secondly, I do not think it's my job to do it, I'm not the one who started such project, and, when someone ask me a plugin request, I do not tell him "do your request yourself and code yourself the plugin"... I know, here is slightly different, ReHLDS is in open source & modifiable area (GitHub) where people can contribute by using the assets of this website, and why not a guy like me could try to contribute at the project, sure. But as I said, it's not "my project", I also have a bunch of other things to do rather than coding and take maybe a lot of my time for others's projects, and for me, in overall, the "lead devs" (or at least the most capable at managing it) are Asmodai, s1lentq, WPMGPRoSToTeMa, and it's more to them to make such changes when people like me request new API functions. Besides, they know it very well and are get use to modify it, as they're the lead guys who do the most, so it's easier & quicker for them. Maybe adding a new hook chain takes like 20 minutes to a guy like s1lentq, while it might take more time to me.

I think, due to how important it is and how weak is the ReHLDS's API, a pinned topic to the top named like "[API] Requests of new functions & hook chains" could be created, where people perform their requests, and, sometimes, when devs can work on them, they do them like in "one shot", and people like me will be happy to see that. Seriously, is it so much asking? I'll like the devs add that I said above in my big text, also test most of the engine & DLL API functions (list from g_engfuncsExportedToDlls/gEntityInterface/gNewDLLFunctions) via memory hacking instead of Metamod (like by using a known memory hacking module in 6 letters), and check the ones which works fine (called and passing the right parameters/return), and add to the API the ones which does not (as you did for a few like the bot or "PF_RemoveEntity"....). Because I remember tried a memory hook of "pfnPrecacheGeneric" and this crashed, this is very annoying and not "normal" to me, do you understand the problem and how critical it can be? This "anti-memory hacking stuff" is massively stupid nowadays, and not worthy enough due to how much powerful computers are today, and seriously, what's the point if this breaks other things, as a lot of programming possibilities to third-party developers like me? This decision just brings more problems than benefits, and the performance gain from my quick tests is almost trivial, and I personnaly do not give a shit about it, I want something stable and which also keeps the original programming possibilities/behavior of the standard GoldSrc, and extend various things, not something which improve things on a side, but break a bunch of others.

ReHLDS is in overall, interesting, with a bunch of bug fixes, new features, etc., but about programming possibilities, despite there is an API, I consider it as the worst & weak engine for HL1 games. Maybe a lot of people do not care at all about API functions, because there are just lambda users who do not know about, and so not directly concerned, or, maybe some other people can find their need with that you purpose inside, but well, for an addon/plugins developer like me, this engine just put sticks in my wheels by making my life harder, also making me waste much time to adapt the upcoming things I'm developping with it, or just make not possible at all.

It's not I like to negatively criticize, no I usually do not, and it's not in my nature to do that, because I respect others's people, but when I try asking nicely, politely some requests and I got no answer from the lead devs, and nothing granted, so 0 communication, and this at multiple times, this start pissing me off at a point I just think this engine should be deprecated.

So I hope I will be heared and that a developer like s1lent will stop being "worthy of his name at being silent!", and take some time to perform some of our API requests, I do not think it's much asked... Also be more "communicative" with people asking things or help, which is a part of the "professional conscience". Redundant questions & requests may not need to be answered & granted, but there are a lot of others which have to. Then I would be glad to help at supporting such project, however, not.

StevenKal commented 4 years ago

Hum, what do we need to do to get an answer or see our requests be considered? Tell me developers huh. Need to be a Russian person? Need to purpose money? ...

Your support/communication is almost non-existent, that's pitiful, especially for such projects as much used. You really need to make more efforts about this. However, your projects just do not deserve to be as much used as they are, additionnaly to the fact you indirectly "refuse" to fix the major "shits & lacks" ReHLDS has compared to the GoldSrc engine.

dystopm commented 4 years ago

Hi. I've been an goldsrc modder in AMXX since 2009, been following this project since it's release and been using it while I see how it grows at every commit.

@StevenKal I am aware of this request, and I agree on several points. Besides, I don't want to pressure devs to make something more than the whole project they already made and invested time on it. Actually I use ReHLDS and I cannot use ReGameDLL because I've been watching that some API request are just ignored by random people, and I need lots of functions to accomplish some modifications. It would be really helpful to have one attached topic to request API functions and hook chains.

We're not obligated to use this (the whole RE project), that's enough reason to don't insist on something out of our laws. It's free and made with lot of patience, so the less thing we can do is be polite and respectful when it comes to ask and propose.

Please consider the fact of expanding API functions by user requests and provide info about how to code modules using REHLDS API, because I don't know anything, not even an example, for C++ rookies. And I do not want to be rude with this, but @StevenKal was right when he said:

(there are stuff, but a lot of them are more for your 3rd-party projects, or, a few others I even do not know what this does, I'll have to look into your sources)

@s1lentq @WPMGPRoSToTeMa @theAsmodai

(Note: most of the RE-related addons support is on russian forums only, there's still a huge community on the other side of the continent)

RauliTop commented 4 years ago

It would be really helpful to have one attached topic to request API functions and hook chains.

Why haven't you done it yet? Someone has to be the first.

StevenKal commented 4 years ago

Actually I use ReHLDS and I cannot use ReGameDLL because I've been watching that some API request are just ignored by random people, and I need lots of functions to accomplish some modifications. It would be really helpful to have one attached topic to request API functions and hook chains.

This seems weird, the fact you use ReHLDS, and not ReGameDLL_CS. In my opinion, ReGameDLL_CS is much more interesting and also less problematic for programmers, especially when dealing with memory hacking... I think people should more favorize the use of that modified game binary rather than this engine binary, because I personnaly "feel more" (while playing) the assets & bug fixes of the ReGameDLL_CS rather than the ReHLDS. But I'm pretty sure a bunch of people do not even know why they put ReHLDS on their servers, it's more their friends told them to or they saw "ReHLDS is good" on some forums & they put it right after. The most annoying bugs in standard GoldSrc are the SVC_BAD (error with "server failed to transmit file A&Y...", which make disconnect the clients and some of them do not reconnect and also think they have been kicked by admin), the crash on team/model change when server almost full, the other bug fixes & new features ReHLDS has do not interest me much, or, this is more specific to the cracked servers using Reunion, as enhanced security fixes. However, the extended limit of generic & total resources remains one of the most interesting new feature, even if not everyone may need this. But for the other things, despite a few can be interesting, we can "live without" and they are not fully mandatory in my opinion. So, if people use ReHLDS for those main bugs & features I've specified, this worth, however, I think it does not. But if in case you need signatures for ReGameDLL_CS, maybe you could contact me I might do that for you (if in case you do not know how to), for a few euros! Hehehehehe!

We're not obligated to use this (the whole RE project), that's enough reason to don't insist on something out of our laws. It's free and made with lot of patience, so the less thing we can do is be polite and respectful when it comes to ask and propose.

Yes, we are not obligated to use this and it's free, but devs bring it to us, exposed its assets, and, like most of the people, want us we use their stuff, because it's pleasant, however it's more likely a waste of time, but once we do, they provide a poor support with almost no communication when we need them (are they secret VALVe's employees? hihi!). I personnaly asked things (above for example), but none of the devs cares to reply me, this is just not consciencious to me, and the fact it's free is not an excuse to "not be correct" with users, I'm maintaining the original AMX Mod addon, used on what, a little more than 50 servers, which is much more lower than the amount of servers using ReHLDS, but I still take time to answer to the people who ask me help and be nice & polite with them, etc., it's not to brag, but those guys should take example on me about this part! Their behavior at T instant makes me think it's just like big companies which have so many clients that when one is not happy, they do not care to make some efforts to keep him, he can go elsewhere if he is not happy. That's bad in my opinion. So it's maybe "free", but not an excuse for me, they could do a minimum effort sometimes.

Also, another important point, THEY choosen to "fuck up memory hacking possibilities" (something usually fully possible under the standard GoldSrc engine, & others like Svengine, Xash3D), we did not asked for such shit decision (no symbols researchable, hooks with parameters not hookable normally...), and all we got as info about this is "...This means that plugins that do binary code analysis (Orpheu for example) probably will not work with rehlds". They did not say why they did, despite I'm sure it's either because of "stupid performance reasons", or because "they do not want we hack it and want us to use their API", or both. But at least, they could grant our API requests as soon as possible when we ask for, since they embarrassed us with this completely stupid decision. And it's also not like we asked new functions every day, no, we do not do that. I wish they had done more efforts to satisfy me/us regarding memhack problem, API requests, questions, etc., and I could even envisage to make small donation if possible but for now it's not gonna happen.

I personnaly do not use ReHLDS on my public servers, the fact they fucked up memhack & refuse to answer me at least a single useful sentence, are two good reasons for me to do not use it. But, as I said, I'm developping AMX Mod, and despite I may not recommend ReHLDS to some people I know, some of them do not care and also, should be free to run it if they want to, and I want my addon be compatible with. So I have no other choice than asking hooks to be added when I can not make proper workaround for the upcoming features I want to implement to the future AMX version. I saw in overall, what are the source files that need to be modified for the addition of new hooks, so, despite I do not like at all, doing programming things without compiling & testing, I might try later to do that and submit the pull request(s). But after that, if my PR remains dormant & not considered just like other people questions & requests I see, this would have been a waste of time and I'm gonna get a little more angry regarding Re* devs!

Please consider the fact of expanding API functions by user requests and provide info about how to code modules using REHLDS API, because I don't know anything, not even an example, for C++ rookies. And I do not want to be rude with this, but @StevenKal was right when he said:

(there are stuff, but a lot of them are more for your 3rd-party projects, or, a few others I even do not know what this does, I'll have to look into your sources)

I'm glad to see one more guy asking for this, as I did! And I agree too for the explanations of the API use, they should add such small "apart" in the readme, and maybe also find a preworkable "RESDK.zip" file with all the files needed to compile module using any of their API. But we can find examples in some Metamod plugins using it (the Re ones having source code like ReFreekLook, ReSemiclip, etc.). In overall, you have to grab the "mod_x_api.cpp" file from the Re binary (also create a "RESDK" folder and put their SDK files), add it to your project, then add your .h file as header, then in your .h file, add something like:

...

/* ReHLDS API. */
#include "rehlds_api.h"
#include "mod_rehlds_api.h"

/* ReGameDLL_CS API. */
#include "regamedllcs_api.h"
#include "mod_regamedllcs_api.h"

/* Reunion API. */
#include "reunion/reunion_api.h"
#include "mod_reunion_api.h"

...

... then you might need to modify the major & minor versions required in the "mod_x_api.cpp" file depending on your needs (function/hook you need to use), to prevent non-loading of the Re data when not necessary. However, for the functions & hook chains, I do not think there is the need for a documentation, we can easily look at the sources from the Re binaries to understand that they do, what they return, etc., and it's not their job to teach us how to code modules. I just think, as comment to the right of each function/hook, the version required could be put in order to inform us about that, this will prevent coders to search at through the changes to know which API version a function/hook requires in order to be available. But you can easily find this on my own version of the ReAPI module for AMX Mod, I recently made (in the "reapi_const.inc" file which is very complete & explicative, despite it's not for the addon you are using...).

(Note: most of the RE-related addons support is on russian forums only, there's still a huge community on the other side of the continent)

Exact, that's one more reason why they should make efforts here, to answer to other people not talking Russian, because we usually do not want to come on Russian-only forums post intruder English sentences among them!

I think, due to how important it is and how weak is the ReHLDS's API, a pinned topic to the top named like "[API] Requests of new functions & hook chains" could be created, where people perform their requests, and, sometimes, when devs can work on them, they do them like in "one shot", and people like me will be happy to see that. Seriously, is it so much asking? And... It would be really helpful to have one attached topic to request API functions and hook chains.

Why haven't you done it yet? Someone has to be the first.

Well, obviously we can do it, this does not cost anything, but if after that no dev having some access rights to the repository is O.K. to pin the topic to the head, and grant our requests, this is again, a bit useless...

GoRiLliAz commented 4 years ago

amxmod is not safe.. https://forums.alliedmods.net/showthread.php?t=275836

StevenKal commented 4 years ago

amxmod is not safe.. https://forums.alliedmods.net/showthread.php?t=275836

It's the bullshits of people like you, arkshine & other similar sheep & ignorants which are not safe to be listened...

Toi, le geek qui semble avoir de l'intérêt pour divers trucs dans AMX qu'il n'y avait pas sous AMXX, s'arrange à refourger sa config AMXX (l'origine de la news AMXX est en partie de ta faute selon moi) sur un serveur utilisant AMX depuis belle lurette sans soucis et sur laquelle j'ai passé du temps, et balance en complément tes avis à la con. Moi je dis tu ferai mieux de fermer ta gueule du con. En plus t'es un peu hors sujet, de plus les gens sont bien au courant de ta news à la con de l'autre avec lequel je suis en conflit despuis des années & qui s'arrange à déformer la vérité car il n'aime pas ce que je fais. Donc toi t'es encore un abruti qui a pas de respect pour mon travail, à la ramener encore avec ça.

DarthMan commented 4 years ago

amxmod is not safe.. https://forums.alliedmods.net/showthread.php?t=275836

Is Windows safe to use, or Google, Facebook etc? They do the exact same thing. And when u consider that Windows is not free ... AMX is ok, nothing bad will happen if you use it.

RauliTop commented 4 years ago

amxmod is not safe.. https://forums.alliedmods.net/showthread.php?t=275836

Is Windows safe to use, or Google, Facebook etc? They do the exact same thing. And when u consider that Windows is not free ... AMX is ok, nothing bad will happen if you use it.

Hahahaha. Don't make people laugh.

There are proofs that AMX Mod (without final X) isn't secure because developer tries to hide commands to became admin from any server using it. Now, tell me how to justify those commands existence 🤔

Well, the rest of the comments aren't new. Only @StevenKal trying to announce his AMX Mod with 'backdoor' code included. Stop crying here, if you want to being listened create pull requests and remove malicious code from AMX.

DarthMan commented 4 years ago

amxmod is not safe.. https://forums.alliedmods.net/showthread.php?t=275836

Is Windows safe to use, or Google, Facebook etc? They do the exact same thing. And when u consider that Windows is not free ... AMX is ok, nothing bad will happen if you use it.

Hahahaha. Don't make people laugh.

There are proofs that AMX Mod (without final X) isn't secure because developer tries to hide commands to became admin from any server using it. Now, tell me how to justify those commands existence 🤔

Well, the rest of the comments aren't new. Only @StevenKal trying to announce his AMX Mod with 'backdoor' code included. Stop crying here, if you want to being listened create pull requests and remove malicious code from AMX.

I also know a case where a friend's music files, he made some remixes, but, as you know, u can only use 20% of the song unless u get approval from the label, copyright. Guess what. He got a copyright claim from a label, and Microsoft removed not just that, but every single remix that he made completely from his PC. He was using using 7. Also, any version of Windows >= Vista has backdoor functions built-into by Microsoft. And if you have Windows 10, u can even login with your account on their website and see all the PC's connected to that account, their specs, HDD storage and possibly even the files. So imagine if a hacker somehow manages to get access to that account, what will he do? So what you're saying really makes no sense.

Also, read about this: http://forums.joinsquad.com/topic/21464-nfo-servers-and-developers-backdoor/

This game is not free to play, yet the game creators created a developer access, which means that they can make themselves admins on any of the available game servers, and they can execute any commands, and what, did users complain about that? I guess not, but NFO decided to no longer support this game because of this access that the developers have given themselves on their game.

Also, about Arkshine's post: It's been known for long that Arkshine wanted every single person on Earth that has a Half-Life engine-based server and uses custom plug-ins to use AMX Mod X. AdminMod has no developer access, and yet, Arkshine also criticized AdminMod, saying stuff like why use a bullshit program, lies about it and stuff. He was even trying to get all these developers to contribute to AMXX instead. And this is for sure of Arkshine's interest and is truly understandable. Because back then Arkshine had no job, all the money he got was from Allied Modders donations, and from 17buddies where he is also a moderator. I don't know how things changed since then, if he got a job, but it's in his interest to criticize every admin tool, being better or worse than AMXX. You see, the reason why AMXX supports ReHLDS is because of ReAMXX. If AMXX did not support Re, people would switch to ReAMXX, and that's truly what he wouldn't like to happen. Sure, it's also because ReAMXX was closed-source, but I'm quite sure that even if it had a source code available and was maintained on GitHub, he would still add all these features to AMXX just so people would not make the switch.

RauliTop commented 4 years ago

I also know a case where a friend's music files, he made some remixes, but, as you know, u can only use 20% of the song unless u get approval from the label, copyright. Guess what. He got a copyright claim from a label, and Microsoft removed not just that, but every single remix that he made completely from his PC. He was using using 7. Also, any version of Windows >= Vista has backdoor functions built-into by Microsoft. And if you have Windows 10, u can even login with your account on their website and see all the PC's connected to that account, their specs, HDD storage and possibly even the files. So imagine if a hacker somehow manages to get access to that account, what will he do? So what you're saying really makes no sense.

Also, read about this: http://forums.joinsquad.com/topic/21464-nfo-servers-and-developers-backdoor/

This game is not free to play, yet the game creators created a developer access, which means that they can make themselves admins on any of the available game servers, and they can execute any commands, and what, did users complain about that? I guess not, but NFO decided to no longer support this game because of this access that the developers have given themselves on their game.

All this doesn't make sense. There isn't a legit reason to include malicious code at AMX. It isn't only about the existence of this code, it's because he tries to hide it too.

You are just making offtopic. Stop, please.

GoRiLliAz commented 4 years ago

@DarthMan Just for information, the topic that Arkshine did on Alliedmods, I am the initiator. I took care of a server which used amxmod, and one day the dev of amxmod made these ban by the leader of the team in question (she didn't know it was him), so he used his backdoor for this unban as well as friends of his. So she came to ask me because she didn't understand how the guy was doing for this unban and in addition being admin (changed the map and kick people). So I searched and found weird logs, and suddenly I asked Arkshine to help me and he found the backdoors in the code. So before you speak, find out. Regards,

Ps: for the other who insults me in French, continue it shows your deep weakness.

DarthMan commented 4 years ago

@DarthMan Just for information, the topic that Arkshine did on Alliedmods, I am the initiator. I took care of a server which used amxmod, and one day the dev of amxmod made these ban by the leader of the team in question (she didn't know it was him), so he used his backdoor for this unban as well as friends of his. So she came to ask me because she did not understand how the guy was doing for this unban and in addition to be admin (changed the map kick of people). So I looked for weird logs, and suddenly I asked Arkshine to help me and he found the backdoors in the code. So before you speak, find out. Regards,

Ps: for the other who insults me in French, continue it shows your deep debilitation.

I see, but well, 99% of the companies are like that. That's why some people, at least I've a friend who switched to Ubuntu and now only uses free open-source apps and said to never ever buy a phone, if it doesn't come with Ubuntu or some other Linux distro for phones. He said he'd never touch iOs/Android/WP again, MS Office, Adobe apps and others. Steam, as well as the games that he likes are the only apps on his PC that could collect some user info, but that's because either these games can only be played through Steam and not without a game store app, or because these games are so cool and there are no alternatives. As I said, and I have proof from the guy who remixed the tracks, Microsoft also removed all of his mp3-saved remixes, as well as all of the FL project files for these remixes. And that without his approval, just because the music label gave a notice to Microsoft. But what if it wasn't the AMX dev, but instead it was someone else?

GoRiLliAz commented 4 years ago

Server Steam only.

RauliTop commented 4 years ago

Server Steam only.

Goodbye @DarthMan 's excuses 🤣

DarthMan commented 4 years ago

Server Steam only.

Server Steam only.

Goodbye @DarthMan 's excuses 🤣

Server Steam only.

Goodbye @DarthMan 's excuses 🤣

But anyway, people must understand that it's not just AMX that has such features. Why don't people complain about Google, Facebook, WhatsApp, Yahoo!, Adobe and many, many more, that basically do the exact same thing. Do you remember what FaceApp did with user's profile pictures? That they were selling ads with your face if it looked fancy enough for them? Everybody's doing that, so if it is like that, it means everyone would have to switch to Linux distros, as Ubuntu, Linux Mint et cetera. I don't wanna start a war, I'm not against anyone, everyone's free to do what he thinks it's best for him.

StevenKal commented 4 years ago

Yeah, the arkshine guy (AMXX's news author), the guy with the one I have a serious argue from years, the guy who distorted the truth about AMX a few times (and want to make believe the people that the truth about AMX is like he said, not like I say), the guy who told one day to the people that I had hacked a KRoT@L's forum account (while it was not true). Yeah go ahead, keep believing the guy you know better than me because he is behind the addon you are using... I understand you prefer taking his side, but well, you just do not know me enough to know my deep intentions not being evil at all. My developer's access is made for reasons I've explained in my forum in details, in the first pinned news in "General" forum (done to stay aware about what the users do, how they config, help them quickly if needed, etc.), and I've 33 years old, and also have my own VPS for my servers, I'm not a stupid kid who want to hack other AMX's servers for maybe no reason at all (like a bunch of idiots admins are doing by slowhacking so badly some innocent users who just want to play in peace), use your brain, I've indirectly no interest to do that, I want people use my stuff, not remove it huh. The current AMX Mod users know I do not make the mess on their servers (DarthMan has one using AMX for example). Poor guys who feel shocked by that I have put inside just do not try to see further than their nose, they conclude quickly with stupidity "backdoor = evil = hack = untrustable guy & program = never use that program". People can mainly blame me for not informing them about that, and I agree, and I promise I will do it in a next important release, with details.

@RauliTop: No, I have solid & important reasons to include it, you are just not "in my place" and you do not see/understand them, and it will probably never be removed. And according to you, to be listened we have to make Pull Requests of our requests, well, when I have to waste my time to make the job I consider not mine on my own, I do not think this is "being listened"! Devs does not even care to told us, or, write this in the readme, something like "sorry, we do not grant users's API requests, if you want more functions, see how it's done for the existing functions and try doing your own, then submit them as Pull Request". Not much complicated to say such sentence & be communicative, rather than let us guessing what the fuck we need to do.

@GoRiLliAz: Like some other people (arkshine), you just do not deserve something else, that's all. Then we talk about ReHLDS's API features and you come to provocate me with your off topic sentence, and put that back on the carpet, you saw "AMX Mod" so your brain send you an alert "I have to write something quick!". You're just a shithead, and should better keep playing the "General geek" on your lambda d2 server for people with "lambda brains"! I have maybe written "AMX Mod", but this was to explain to the devs & other people why I need API upgrade, nothing more.

By the way, the topic should probably be closed as this goes beyond its original issue (thanks the French shithead...), and I think we/I have also understand you devs, do not seem motivated at all at making some efforts to grant our API requests (sadly...), except when we do it ourselves via Pull Requests...

RauliTop commented 4 years ago

People can mainly blame me for not informing them about that, and I agree, and I promise I will do it in a next important release, with details.

Yeah. Do it. And don't try to hide your steamid.. You know (everyone has seen it)

Also, you should provide an option to disable that feature. I'm not against the feature, I'm against the opacity (hiding strange reasons)

People must be awared about the features you add and the risks they can have.

WaLkZa commented 1 year ago

@DarthMan do you have rewritten BSP Compat plugin with ReAPI hookchain? If yes, please leave it in a comment.

WaLkZa commented 1 year ago

Someone with more experience with maps needs to test it

#include <amxmisc>
#include <engine>
#include <reapi>

#define PLUGIN_NAME "BSP Compat"
#define PLUGIN_VERSION  "1.0"
#define PLUGIN_AUTHOR   "JoRoPiTo"

#define CONFIG_FILE "bsp_compat.ini"

new cvarClassRename
new HookChain:g_Hook
new Trie:g_ClassTrie

public plugin_init()
{
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

    cvarClassRename = register_cvar("bsp_classrename", "1")

    if(g_Hook)
        DisableHookChain(g_Hook)

    if(get_pcvar_num(cvarClassRename))
    {
        new szClass[32], szNewClass[32]
        new iMax = get_global_int(GL_maxEntities)

        for(new iEnt; iEnt < iMax; iEnt++)
        {
            if(is_valid_ent(iEnt))
            {
                entity_get_string(iEnt, EV_SZ_classname, szClass, charsmax(szClass))
                if(TrieKeyExists(g_ClassTrie, szClass))
                {
                    TrieGetString(g_ClassTrie, szClass, szNewClass, charsmax(szNewClass))
                    entity_set_string(iEnt, EV_SZ_message, szClass)
                    entity_set_string(iEnt, EV_SZ_classname, szNewClass)
                }
            }
        }
    }
    if(g_ClassTrie)
        TrieDestroy(g_ClassTrie)
}

public plugin_precache()
{
    new szTemp[128]
    new szFile[164]

    get_configsdir(szTemp, charsmax(szTemp))
    formatex(szFile, charsmax(szFile), "%s/%s", szTemp, CONFIG_FILE)

    if(file_exists(szFile))
    {
        g_ClassTrie = TrieCreate()
        new iLine, iLen, iCount
        new szLeft[32], szRight[32]
        while((iLine = read_file(szFile, iLine, szTemp, charsmax(szTemp), iLen)))
        {
            if(isalpha(szTemp[0]))
            {
                while(szTemp[strlen(szTemp) - 1] == 13 || szTemp[strlen(szTemp) - 1] == 10)
                    szTemp[strlen(szTemp) - 1] = 0;

                iCount++
                split(szTemp, szLeft, charsmax(szLeft), szRight, charsmax(szRight), ":")
                TrieSetString(g_ClassTrie, szLeft, szRight)
                log_amx("[BSP Compat] Adding fix %s for %s", szRight, szLeft)
            }
        }

        if(iCount)
            g_Hook = RegisterHookChain(RH_GetEntityInit, "GetEntityInit")
    }
    else
    {
        set_fail_state("[BSP Compat] No config file loaded")
    }

}

public GetEntityInit(const szClass[])
{
    static szNewClass[32]
    if(TrieKeyExists(g_ClassTrie, szClass))
    {
        TrieGetString(g_ClassTrie, szClass, szNewClass, charsmax(szNewClass))
        log_amx("[BSP Compat] Fixing %s to %s", szClass, szNewClass)
        SetHookChainArg(1, ATYPE_STRING, szNewClass)
    }
    return HC_CONTINUE
}