mirror of https://github.com/gophish/gophish
Compare commits
7 Commits
4984922a93
...
e282620261
Author | SHA1 | Date |
---|---|---|
Sylvain Chateau | e282620261 | |
Jordan Wright | 9561846979 | |
Caetan | 908886f2cd | |
Sylvain Chateau | 78aa421f89 | |
sylflo | 2aa0a725e0 | |
sylflo | 097a6dd800 | |
sylflo | 060b09ea0c |
|
@ -1,5 +1,7 @@
|
|||
name: CI
|
||||
on: [push]
|
||||
on:
|
||||
- pull_request
|
||||
- push
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
@ -7,17 +9,17 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
goVer: [1.16, 1.17, 1.18]
|
||||
goVer: [1.21, 1.22, 1.23]
|
||||
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.goVer }}
|
||||
uses: actions/setup-go@v1
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.goVer }}
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
|
@ -31,4 +33,4 @@ jobs:
|
|||
run: diff -u <(echo -n) <(gofmt -d .)
|
||||
|
||||
- name: Test
|
||||
run: go test -v ./...
|
||||
run: go test ./...
|
||||
|
|
|
@ -38,7 +38,7 @@ jobs:
|
|||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.14
|
||||
go-version: 1.22
|
||||
- if: matrix.os == 'ubuntu-latest'
|
||||
run: sudo apt-get update && sudo apt-get install -y gcc-multilib
|
||||
- if: matrix.arch == '386'
|
||||
|
@ -47,7 +47,7 @@ jobs:
|
|||
run: echo "RELEASE=gophish-${{ github.event.release.tag_name }}-${{ matrix.releaseos }}-64bit" >> $GITHUB_ENV
|
||||
- if: matrix.os == 'windows-latest'
|
||||
run: echo "RELEASE=gophish-${{ github.event.release.tag_name }}-${{ matrix.releaseos }}-64bit" | Out-File -FilePath $env:GITHUB_ENV -Append # https://github.com/actions/runner/issues/1636
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build ${{ matrix.goos }}/${{ matrix.arch }}
|
||||
run: go build -o ${{ matrix.bin }}
|
||||
env:
|
||||
|
@ -55,7 +55,7 @@ jobs:
|
|||
GOARCH: ${{ matrix.arch }}
|
||||
CGO_ENABLED: 1
|
||||
- name: Upload to artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.RELEASE }}
|
||||
path: ${{ matrix.bin }}
|
||||
|
@ -65,8 +65,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/download-artifact@v2
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: bin
|
||||
- name: Package Releases
|
||||
|
@ -96,7 +96,7 @@ jobs:
|
|||
done
|
||||
done
|
||||
- name: Upload to artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: releases
|
||||
path: releases/*.zip
|
||||
|
@ -106,7 +106,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
needs: package
|
||||
steps:
|
||||
- uses: actions/download-artifact@v2
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: releases
|
||||
path: releases/
|
||||
|
|
|
@ -109,6 +109,7 @@ func (as *Server) Users(w http.ResponseWriter, r *http.Request) {
|
|||
Role: role,
|
||||
RoleID: role.ID,
|
||||
PasswordChangeRequired: ur.PasswordChangeRequired,
|
||||
AccountLocked: ur.AccountLocked,
|
||||
}
|
||||
err = models.PutUser(&user)
|
||||
if err != nil {
|
||||
|
|
|
@ -115,8 +115,8 @@ func (im *Monitor) Shutdown() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// checkForNewEmails logs into an IMAP account and checks unread emails
|
||||
// for the rid campaign identifier.
|
||||
// checkForNewEmails logs into an IMAP account and checks unread emails for the
|
||||
// rid campaign identifier.
|
||||
func checkForNewEmails(im models.IMAP) {
|
||||
im.Host = im.Host + ":" + strconv.Itoa(int(im.Port)) // Append port
|
||||
mailServer := Mailbox{
|
||||
|
|
|
@ -609,7 +609,7 @@ func PostCampaign(c *Campaign, uid int64) error {
|
|||
return tx.Commit().Error
|
||||
}
|
||||
|
||||
//DeleteCampaign deletes the specified campaign
|
||||
// DeleteCampaign deletes the specified campaign
|
||||
func DeleteCampaign(id int64) error {
|
||||
log.WithFields(logrus.Fields{
|
||||
"campaign_id": id,
|
||||
|
@ -666,5 +666,10 @@ func CompleteCampaign(id int64, uid int64) error {
|
|||
if err != nil {
|
||||
log.Error(err)
|
||||
}
|
||||
// Add event
|
||||
err = AddEvent(&Event{Message: "Campaign Completed"}, c.Id)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -396,6 +396,7 @@ $(document).ready(function () {
|
|||
</button></div>"
|
||||
]
|
||||
if (campaign.status == 'Completed') {
|
||||
row.splice(2, 0, moment(campaign.completed_date).format('MMMM Do YYYY, h:mm:ss a'));
|
||||
rows['archived'].push(row)
|
||||
} else {
|
||||
rows['active'].push(row)
|
||||
|
|
|
@ -303,23 +303,23 @@ $(document).ready(function () {
|
|||
},
|
||||
{
|
||||
className: "color-sent",
|
||||
targets: [2]
|
||||
},
|
||||
{
|
||||
className: "color-opened",
|
||||
targets: [3]
|
||||
},
|
||||
{
|
||||
className: "color-clicked",
|
||||
className: "color-opened",
|
||||
targets: [4]
|
||||
},
|
||||
{
|
||||
className: "color-success",
|
||||
className: "color-clicked",
|
||||
targets: [5]
|
||||
},
|
||||
{
|
||||
className: "color-reported",
|
||||
className: "color-success",
|
||||
targets: [6]
|
||||
},
|
||||
{
|
||||
className: "color-reported",
|
||||
targets: [7]
|
||||
}
|
||||
],
|
||||
order: [
|
||||
|
@ -329,6 +329,7 @@ $(document).ready(function () {
|
|||
campaignRows = []
|
||||
$.each(campaigns, function (i, campaign) {
|
||||
var campaign_date = moment(campaign.created_date).format('MMMM Do YYYY, h:mm:ss a')
|
||||
var completed_date = () => (campaign.status === "Completed" ? moment(campaign.completed_date).format('MMMM Do YYYY, h:mm:ss a') : '')
|
||||
var label = statuses[campaign.status].label || "label-default";
|
||||
//section for tooltips on the status of a campaign to show some quick stats
|
||||
var launchDate;
|
||||
|
@ -343,6 +344,7 @@ $(document).ready(function () {
|
|||
campaignRows.push([
|
||||
escapeHtml(campaign.name),
|
||||
campaign_date,
|
||||
completed_date,
|
||||
campaign.stats.sent,
|
||||
campaign.stats.opened,
|
||||
campaign.stats.clicked,
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
<tr>
|
||||
<th class="col-md-3">Name</th>
|
||||
<th class="col-md-4">Created Date</th>
|
||||
<th class="col-md-4">Completed Date</th>
|
||||
<th class="col-md-2">Status</th>
|
||||
<th class="col-md-3 no-sort"></th>
|
||||
</tr>
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
<tr>
|
||||
<th class="col-md-2 col-sm-2">Name</th>
|
||||
<th class="col-md-2 col-sm-2">Created Date</th>
|
||||
<th class="col-md-2 col-sm-2">Completed Date</th>
|
||||
<th class="col-md-1 col-sm-1">
|
||||
<i class="fa fa-envelope-o"></i>
|
||||
</th>
|
||||
|
|
Loading…
Reference in New Issue