Skip to content

Commit

Permalink
Use more inclusive terms (#1012)
Browse files Browse the repository at this point in the history
  • Loading branch information
scudette authored Apr 8, 2021
1 parent 5b29c3f commit dd46147
Show file tree
Hide file tree
Showing 11 changed files with 458 additions and 347 deletions.
4 changes: 2 additions & 2 deletions bin/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var (
frontend_cmd = app.Command("frontend", "Run the frontend and GUI.")
compression_flag = frontend_cmd.Flag("disable_artifact_compression",
"Disables artifact compressions").Bool()
frontend_cmd_slave = frontend_cmd.Flag("slave", "This is a slave frontend").Bool()
frontend_cmd_minion = frontend_cmd.Flag("minion", "This is a minion frontend").Bool()
)

func doFrontend() {
Expand Down Expand Up @@ -82,7 +82,7 @@ func startFrontend(sm *services.Service) (*api.Builder, error) {
// Start the frontend service if needed. This must happen
// first so other services can contact the master node.

config_obj.Frontend.IsMaster = !*frontend_cmd_slave
config_obj.Frontend.IsMaster = !*frontend_cmd_minion
err := sm.Start(frontend.StartFrontendService)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion crypto/simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (self *Obfuscator) Decrypt(config_obj *config_proto.Config, name string) (
return "", err
}

if len(cipher_text) < 16 {
if len(cipher_text) < 16 || len(cipher_text)%16 != 0 {
return "", errors.New("Cipher error")
}

Expand Down
459 changes: 268 additions & 191 deletions gui/velociraptor/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gui/velociraptor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"react-split-pane": "^0.1.92",
"react-step-wizard": "^5.3.5",
"react-treebeard": "^3.2.4",
"recharts": "^1.8.5",
"recharts": "^2.0.9",
"styled-components": "^5.2.0",
"y18n": "^4.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion gui/velociraptor/src/components/artifacts/line-charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class TimeTickRenderer extends React.Component {
let last_date = this.props.data[this.props.data.length -1][this.props.dataKey];

let value = date.getUTCFullYear().toString().padStart(4, "0") + "-" +
date.getUTCMonth().toString().padStart(2, "0") + "-" +
(date.getUTCMonth()+1).toString().padStart(2, "0") + "-" +
date.getUTCDate().toString().padStart(2, "0");

if (last_date - first_date < 24 * 60 * 60) {
Expand Down
18 changes: 12 additions & 6 deletions gui/velociraptor/src/components/utils/csv.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import parse from 'csv-parse/lib/sync';
import stringify from 'csv-stringify/lib/sync';

import api from '../core/api-service.js';
import _ from 'lodash';

export function serializeCSV(data, columns) {
Expand All @@ -14,12 +14,18 @@ export function serializeCSV(data, columns) {


export function parseCSV(data) {
let records = parse(data, {skip_empty_lines: false});
let obj_records = parse(data, {columns: true, skip_empty_lines: false});
try {
let records = parse(data, {skip_empty_lines: false});
let obj_records = parse(data, {columns: true, skip_empty_lines: false});

if (records && records.length > 0) {
return {columns: records[0], data: obj_records};
}

if (records && records.length > 0) {
return {columns: records[0], data: obj_records};
} catch(e) {
_.each(api.hooks, h=>h("Error: " + e));
return {columns: ["Column1"], data: []};
}

return {};
return {columns: ["Column1"], data: []};
}
Loading

0 comments on commit dd46147

Please sign in to comment.