Skip to content

Commit 4ae9950

Browse files
author
tes
committed
fix: Gophish password autogenerated issue
1 parent 18d4486 commit 4ae9950

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

modules/providers/aws.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ def gophish(c):
183183
value = "${{module.gophish_rdir_{c["id"]}.ips}}"
184184
}}
185185
186+
output "Admin_Password_{c["id"]}" {{
187+
value = "You can find the auto-generated Gophish admin password at: /opt/goapps/src/github.com/gophish/password.txt"
188+
}}
186189
"""
187190
else:
188191
output = f"""
@@ -197,6 +200,9 @@ def gophish(c):
197200
value = "${{module.gophish_{c["id"]}.ips}}"
198201
}}
199202
203+
output "Admin_Password_{c["id"]}" {{
204+
value = "You can find the auto-generated Gophish admin password at: /opt/goapps/src/github.com/gophish/password.txt"
205+
}}
200206
"""
201207
return output
202208

modules/providers/digitalocean.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ def gophish(c):
157157
value = "${{module.gophish_rdir_{c["id"]}.ips}}"
158158
}}
159159
160+
output "Admin_Password_{c["id"]}" {{
161+
value = "You can find the auto-generated Gophish admin password at: /opt/goapps/src/github.com/gophish/password.txt"
162+
}}
160163
"""
161164
else:
162165
output = f"""
@@ -170,6 +173,9 @@ def gophish(c):
170173
value = "${{module.gophish_{c["id"]}.ips}}"
171174
}}
172175
176+
output "Admin_Password_{c["id"]}" {{
177+
value = "You can find the auto-generated Gophish admin password at: /opt/goapps/src/github.com/gophish/password.txt"
178+
}}
173179
"""
174180
return output
175181

redbaron/data/scripts/gophish.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,9 @@ echo "export PATH=$GOPATH/bin:$GOROOT/bin:$PATH" >> /root/.profile
2929
source /root/.profile
3030

3131
#create readme file
32-
echo "systemctl start gophish.service (start the service)" >> /root/README.txt
33-
echo "systemctl stop gophish.service (stop the service)" >> /root/README.txt
32+
echo "systemctl start gophish.service (start the service)" >> /opt/goapps/src/github.com/gophish/README.txt
33+
echo "systemctl stop gophish.service (stop the service)" >> /opt/goapps/src/github.com/gophish/README.txt
34+
35+
sleep 30s
36+
37+
cat /var/log/gophish.err | grep 'Please login with the username admin and the password' > /opt/goapps/src/github.com/gophish/password.txt

0 commit comments

Comments
 (0)