Nelson Neoh Posted March 19, 2021 Share Posted March 19, 2021 Hi all, I wish to perform some registrar API activities in the registrar hooks, but as the hook's vars or params didn't provide credential details, I tried to get direct from DB Capsule and unfortunately noticed the data stored in encrypted format... Any suggestions to over come this? TQ. Best Regards, Nelson 0 Quote Link to comment Share on other sites More sharing options...
string Posted March 19, 2021 Share Posted March 19, 2021 You need to pass the encrypted string to the DecryptPassword API. 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted March 20, 2021 Share Posted March 20, 2021 Using the getRegistrarConfigOptions() function should provide that information in decrypted form -- though have not tested with latest versions. You may need to include includes/registrarfunctions.php for that to be available. 0 Quote Link to comment Share on other sites More sharing options...
Nelson Neoh Posted March 20, 2021 Author Share Posted March 20, 2021 14 hours ago, string said: You need to pass the encrypted string to the DecryptPassword API. Thanks on the suggestion, will try this out. 4 hours ago, steven99 said: Using the getRegistrarConfigOptions() function should provide that information in decrypted form -- though have not tested with latest versions. You may need to include includes/registrarfunctions.php for that to be available. @steven99 Do you have sample code to share the proper way to include these functional pages? I used to get error and not very familiar on the WHMCS global variables when includes a php page. Thanks you all in advanced. 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted March 20, 2021 Share Posted March 20, 2021 For including the file, you need to backtrack to where the file is located from the current directory that the current script is running in. Can't post the code as the community web filter is blocking it but basically you would either backtrack using __DIR__ with a bunch of "/../../includes" . There might be a constant or other method to get to the root directory of whmcs but don't recall right off. 0 Quote Link to comment Share on other sites More sharing options...
Nelson Neoh Posted April 16, 2021 Author Share Posted April 16, 2021 Thanks guys. Both method works! 😁 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.