Can I encrypt/hash my cP password? (API2)

KuroiNekoDev

Registered
Mar 3, 2018
4
0
1
Nowhere
cPanel Access Level
Reseller Owner
Hi, I'm creating a little system for manage email accounts but due some people can access to our server (ftp), can I hash/encrypt or something to my cP password?

I'm using the XML-API class (I found it on GitHub) and the functions available for API 2


(btw, I know this will be deprecated after the WHM/CP 70, but I want to finish it and later update to UAPI because it was taking a lot of time make it and update it will be modify a lot of codes.)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
  • Like
Reactions: KuroiNekoDev

KuroiNekoDev

Registered
Mar 3, 2018
4
0
1
Nowhere
cPanel Access Level
Reseller Owner
Hello,

You may want to consider using the Single Sign-On feature:

Guide to API Authentication - Single Sign On - Developer Documentation - cPanel Documentation

Or, since you have reseller access, you could setup your custom script on a separate account that no other users have access to.

Thank you.

Thanks! :-p

Another question... I use eleven2 hosting, and they set in their Firewall for temporally block the user IP when it reach 25 connections at the same time... How can I close my connection after one request to the API for avoid that?


(btw, I can't access to https://forums.cpanel.net/account/personal-details :(:oops: )
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Another question... I use eleven2 hosting, and they set in their Firewall for temporally block the user IP when it reach 25 connections at the same time... How can I close my connection after one request to the API for avoid that?
You generally shouldn't have to do anything special unless your PHP script isn't exiting properly. That's more of a PHP development question. You are likely to receive more feedback to that type of question on a website such as StackOverflow.

That page is only accessible after you've spent some as an active user on the cPanel Forums (e.g. reached a certain number of posts).

Thank you.
 
  • Like
Reactions: KuroiNekoDev