Skip to content

Commit

Permalink
Merge pull request #987 from BishopFox/fix/webtable
Browse files Browse the repository at this point in the history
Fix website content table
  • Loading branch information
rkervella authored Nov 4, 2022
2 parents 5a7ee43 + 0e66a56 commit cfb292d
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 3 deletions.
21 changes: 19 additions & 2 deletions client/command/websites/websites-add-content.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
package websites

/*
Sliver Implant Framework
Copyright (C) 2019 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import (
"context"
"errors"
"io"
"io/ioutil"
"net/http"
"os"
"path"
Expand Down Expand Up @@ -94,7 +111,7 @@ func webAddFile(web *clientpb.WebsiteAddContent, webpath string, contentType str
return err
}
defer file.Close()
data, err := ioutil.ReadAll(file)
data, err := io.ReadAll(file)
if err != nil {
return err
}
Expand Down
18 changes: 18 additions & 0 deletions client/command/websites/websites-rm-content.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
package websites

/*
Sliver Implant Framework
Copyright (C) 2019 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import (
"context"
"strings"
Expand Down
18 changes: 18 additions & 0 deletions client/command/websites/websites-rm.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
package websites

/*
Sliver Implant Framework
Copyright (C) 2019 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import (
"context"

Expand Down
18 changes: 18 additions & 0 deletions client/command/websites/websites-update-content.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
package websites

/*
Sliver Implant Framework
Copyright (C) 2019 Bishop Fox
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import (
"context"

Expand Down
2 changes: 1 addition & 1 deletion client/command/websites/websites.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func PrintWebsite(web *clientpb.Website, con *console.SliverConsoleClient) {
return sortedContents[i].Path < sortedContents[j].Path
})
for _, content := range sortedContents {
tw.AppendHeader(table.Row{
tw.AppendRow(table.Row{
content.Path,
content.ContentType,
content.Size,
Expand Down

0 comments on commit cfb292d

Please sign in to comment.