Finished /upload endpoint
This commit is contained in:
@@ -6,7 +6,7 @@ use tokio::net::TcpListener;
|
||||
use tower_http::services::ServeDir;
|
||||
use axum::{
|
||||
middleware,
|
||||
routing::get,
|
||||
routing::{get, post},
|
||||
Router
|
||||
};
|
||||
|
||||
@@ -15,6 +15,7 @@ mod print_dir;
|
||||
mod config;
|
||||
mod shells;
|
||||
mod logging;
|
||||
mod upload;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
@@ -30,7 +31,7 @@ async fn main() {
|
||||
print_dir::print_interface(&args.interface, &port, &args.directory);
|
||||
|
||||
let app = Router::new()
|
||||
//.route("/upload", post(upload_handler))
|
||||
.route("/upload", post(upload::upload_handler))
|
||||
.route("/shells/:shell", get(shells::shells_handler))
|
||||
.nest_service("/download", ServeDir::new(conf.get_download_path()))
|
||||
.nest_service("/", ServeDir::new(cwd))
|
||||
|
||||
Reference in New Issue
Block a user