From 52139c4b470c51ef4d284e0406ec5d11ca57f0ea Mon Sep 17 00:00:00 2001 From: thomashaw Date: Thu, 22 Mar 2018 19:39:06 +0000 Subject: [PATCH 1/2] adding sudo to userspice script --- .../unix/webapp/userspice_43/manifests/init.pp | 2 +- .../webapp/userspice_43/templates/userspice.sh.erb | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/vulnerabilities/unix/webapp/userspice_43/manifests/init.pp b/modules/vulnerabilities/unix/webapp/userspice_43/manifests/init.pp index be47af018..ca54b70a6 100644 --- a/modules/vulnerabilities/unix/webapp/userspice_43/manifests/init.pp +++ b/modules/vulnerabilities/unix/webapp/userspice_43/manifests/init.pp @@ -3,6 +3,6 @@ class userspice_43 { class { 'userspice_43::install': } ~> cron { 'run userspice config script': command => '/bin/bash /userspice.sh', - minute => [0, 5,10,15,20,25,30,35,40,45,50,55] + minute => [0,5,10,15,20,25,30,35,40,45,50,55] } } diff --git a/modules/vulnerabilities/unix/webapp/userspice_43/templates/userspice.sh.erb b/modules/vulnerabilities/unix/webapp/userspice_43/templates/userspice.sh.erb index 441563fc4..333bec461 100644 --- a/modules/vulnerabilities/unix/webapp/userspice_43/templates/userspice.sh.erb +++ b/modules/vulnerabilities/unix/webapp/userspice_43/templates/userspice.sh.erb @@ -1,15 +1,15 @@ #!/bin/bash -curl -L http://<%= @ip_address %>:80/index.php +sudo curl -L http://<%= @ip_address %>:80/index.php sleep 10 -curl -L http://<%= @ip_address %>:80/install/step2.php +sudo curl -L http://<%= @ip_address %>:80/install/step2.php sleep 10 -curl -L --data '<%= @step2_params %>' http://<%= @ip_address %>:80/install/step2.php +sudo curl -L --data '<%= @step2_params %>' http://<%= @ip_address %>:80/install/step2.php sleep 10 -curl -L http://<%= @ip_address %>:80/install/step3.php +sudo curl -L http://<%= @ip_address %>:80/install/step3.php sleep 10 -curl -L --referer http://<%= @ip_address %>:80/install/step3.php http://localhost:80/install/cleanup.php +sudo curl -L --referer http://<%= @ip_address %>:80/install/step3.php http://localhost:80/install/cleanup.php sleep 10 -curl -L http://<%= @ip_address %>:80/users/update.php +sudo curl -L http://<%= @ip_address %>:80/users/update.php sleep 10 -curl -L http://<%= @ip_address %>:80/users/login.php +sudo curl -L http://<%= @ip_address %>:80/users/login.php sleep 10 \ No newline at end of file From 15793b1e023e544da2810062a865c180484c58ca Mon Sep 17 00:00:00 2001 From: thomashaw Date: Thu, 22 Mar 2018 19:47:29 +0000 Subject: [PATCH 2/2] adding sudo to userspice script --- .../unix/webapp/userspice_43/templates/userspice.sh.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/vulnerabilities/unix/webapp/userspice_43/templates/userspice.sh.erb b/modules/vulnerabilities/unix/webapp/userspice_43/templates/userspice.sh.erb index 333bec461..29152e53f 100644 --- a/modules/vulnerabilities/unix/webapp/userspice_43/templates/userspice.sh.erb +++ b/modules/vulnerabilities/unix/webapp/userspice_43/templates/userspice.sh.erb @@ -7,7 +7,7 @@ sudo curl -L --data '<%= @step2_params %>' http://<%= @ip_address %>:80/install/ sleep 10 sudo curl -L http://<%= @ip_address %>:80/install/step3.php sleep 10 -sudo curl -L --referer http://<%= @ip_address %>:80/install/step3.php http://localhost:80/install/cleanup.php +sudo curl -L --referer http://<%= @ip_address %>:80/install/step3.php http://<%= @ip_address %>:80/install/cleanup.php sleep 10 sudo curl -L http://<%= @ip_address %>:80/users/update.php sleep 10