Skip to content

Commit

Permalink
Display the hostname in the host overview (Velocidex#1186)
Browse files Browse the repository at this point in the history
Previously the UI only showed the Fqdn and not the hostname. The
hostname is reported by the machine itself (on windows using wmi). The
FQDN is sometimes the same and sometimes different since it does a dns
lookup.

The two terms are separate but related so we should show both.
  • Loading branch information
scudette authored Aug 11, 2021
1 parent 18ec221 commit c7b420a
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 79 deletions.
24 changes: 12 additions & 12 deletions api/proto/api.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

118 changes: 59 additions & 59 deletions api/proto/clients.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/proto/clients.proto
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ message Uname {
string system = 1 [(sem_type) = {
description: "The system platform (Windows|Darwin|Linux).",
}];
string node = 2 [(sem_type) = {
string hostname = 2 [(sem_type) = {
description: "The hostname of this system.",
}];
string release = 3 [(sem_type) = {
Expand Down
2 changes: 1 addition & 1 deletion artifacts/testdata/server/testcases/clients.out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ LET _ <= SELECT label(client_id=client_id, op='remove', labels=labels), client_i
},
"os_info": {
"system": "windows",
"node": "",
"hostname": "DESKTOP-BP4S7TF",
"release": "Microsoft Windows 10 Enterprise Evaluation10.0.18362 Build 18362",
"version": "",
"machine": "amd64",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/testdata/server/testcases/labels.out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ FROM clients(search='label:*') ORDER BY client_id
},
"os_info": {
"system": "windows",
"node": "",
"hostname": "DESKTOP-BP4S7TF",
"release": "Microsoft Windows 10 Enterprise Evaluation10.0.18362 Build 18362",
"version": "",
"machine": "amd64",
Expand Down
5 changes: 5 additions & 0 deletions gui/velociraptor/src/components/clients/host-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,11 @@ class VeloHostInfo extends Component {
</dd>

<dt className="col-sm-3">Hostname</dt>
<dd className="col-sm-9">
{ info.os_info.hostname }
</dd>

<dt className="col-sm-3">FQDN</dt>
<dd className="col-sm-9">
{ info.os_info.fqdn }
</dd>
Expand Down
2 changes: 1 addition & 1 deletion gui/velociraptor/src/components/flows/client-flows-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class ClientFlowsView extends React.Component {
this.source = axios.CancelToken.source();

api.get("v1/GetClientFlows/" + client_id, {
count: 100,
count: 1000,
offset: 0,
}, this.source.token).then(response=>{
if (response.cancel) return;
Expand Down
9 changes: 5 additions & 4 deletions search/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ func GetApiClient(
}

result.OsInfo = &api_proto.Uname{
System: client_info.System,
Release: client_info.Release,
Machine: client_info.Architecture,
Fqdn: client_info.Fqdn,
System: client_info.System,
Hostname: client_info.Hostname,
Release: client_info.Release,
Machine: client_info.Architecture,
Fqdn: client_info.Fqdn,
}

public_key_info := &crypto_proto.PublicKey{}
Expand Down

0 comments on commit c7b420a

Please sign in to comment.