Hi JohnnyD1995,
Yes that's possible.
What I'd suggest doing is creating a script (Perl, Bash, PHP, whatever) that performs:
1)`find` for that file.
2) based on the absolute path of that file, you would know the user's home directory.
- ie, '/home/dave/public_html/badHackScript.php' => '/home/dave' ...so who ever owns /home/dave
3) this directory should belong to "dave", but you could verify that by doing a stat of the directory or you could do a recursive grep for the homedir attribute in the userdata directory /var/cpanel/userdata with a regex similar to `grep -rP 'homedir:\s*/home/dave\s*$' ./* 2>/dev/null`
Code:
root@004 [/var/cpanel]# grep -rP 'homedir:\s*/home/dave\s*$' ./* 2>/dev/null
./userdata/dave/afavaf.dave.com:homedir: /home/dave
./userdata/dave/where.dave.com:homedir: /home/dave
./userdata/dave/dave.com:homedir: /home/dave
./userdata/dave/extradave.dave.com:homedir: /home/dave
./userdata/dave/who.dave.com:homedir: /home/dave
4) now you know for certain that "dave" is the owner (as that is the homedir listed in his file), you can now use our API to suspend the user: XML-API suspendacct
if you have a remote accesshash, you can use either the Perl PublicAPI or PHP PublicAPI clients (or some other remote query API client) to easily make the request to suspend the account.
Regards,
-DavidN