mirror of
https://github.com/Noratrieb/cluelessh.git
synced 2026-01-14 16:35:06 +01:00
lower limit
This commit is contained in:
parent
46f73c2de4
commit
f4ba9a2939
1 changed files with 7 additions and 3 deletions
10
src/main.rs
10
src/main.rs
|
|
@ -168,13 +168,17 @@ async fn handle_connection(
|
|||
// .do_operation(update.number.construct_op(ChannelOperationKind::Data(data)));
|
||||
|
||||
// arbitrary limit
|
||||
if total_sent_data.len() < 500_000 {
|
||||
if total_sent_data.len() < 50_000 {
|
||||
total_sent_data.extend_from_slice(&data);
|
||||
} else {
|
||||
info!(channel = %update.number, "Reached stdin limit");
|
||||
state.do_operation(update.number.construct_op(ChannelOperationKind::Data(b"Thanks Hayley!".to_vec())));
|
||||
state.do_operation(
|
||||
update.number.construct_op(ChannelOperationKind::Data(
|
||||
b"Thanks Hayley!".to_vec(),
|
||||
)),
|
||||
);
|
||||
state.do_operation(update.number.construct_op(ChannelOperationKind::Close));
|
||||
}
|
||||
}
|
||||
|
||||
if is_eof {
|
||||
debug!(channel = %update.number, "Received EOF, closing channel");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue