Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
wsssh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
wsssh
Commits
8b1388b8
Commit
8b1388b8
authored
Sep 18, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit latest changes
parent
08729ae7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
14 deletions
+29
-14
clean
clean
+22
-0
tunnel.c
wssshtools/tunnel.c
+2
-8
wsssht
wssshtools/wsssht
+0
-0
wsssht.c
wssshtools/wsssht.c
+5
-6
No files found.
clean
0 → 100755
View file @
8b1388b8
#!/bin/bash
# WebSocket SSH Tools Clean Script
# Clean script for removing build artifacts from WebSocket SSH tools
#
# Copyright (C) 2024 Stefy Lanza <stefy@nexlab.net> and SexHack.me
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Use build.sh --clean for consistent cleaning
./build.sh
--clean
--novenv
wssshtools/tunnel.c
View file @
8b1388b8
...
...
@@ -738,10 +738,7 @@ void handle_tunnel_data(SSL *ssl __attribute__((unused)), const char *request_id
}
}
else
{
// No connection established yet - buffer the data
if
(
debug
)
{
printf
(
"[DEBUG] No connection established yet, buffering %zu bytes of tunnel_data
\n
"
,
data_len
);
fflush
(
stdout
);
}
// Suppress tunnel_data debug messages in debug mode
// Ensure we have an incoming buffer for wsssh
if
(
!
tunnel
->
incoming_buffer
)
{
tunnel
->
incoming_buffer
=
frame_buffer_init
();
...
...
@@ -769,10 +766,7 @@ void handle_tunnel_data(SSL *ssl __attribute__((unused)), const char *request_id
// Check if target socket is valid
if
(
target_sock
<
0
)
{
if
(
debug
)
{
printf
(
"[DEBUG] Target socket not ready yet (sock=%d), ignoring tunnel_data
\n
"
,
target_sock
);
fflush
(
stdout
);
}
// Suppress tunnel_data debug messages in debug mode
pthread_mutex_unlock
(
&
tunnel_mutex
);
return
;
}
...
...
wssshtools/wsssht
View file @
8b1388b8
No preview for this file type
wssshtools/wsssht.c
View file @
8b1388b8
...
...
@@ -1871,8 +1871,8 @@ int run_daemon_mode(wsssh_config_t *config, const char *client_id, const char *w
}
// Check if this is a data message to suppress verbose logging
int
is_data_message
=
(
strstr
(
buffer
,
"
\"
type
\"
:
\"
tunnel_data
\"
"
)
!=
NULL
||
strstr
(
buffer
,
"
\"
type
\"
:
\"
tunnel_response
\"
"
)
!=
NULL
);
int
is_data_message
=
(
strstr
(
buffer
,
"
\"
type
\"
:
\"
tunnel_data
\"
"
)
!=
NULL
||
strstr
(
buffer
,
"
\"
type
\"
:
\"
tunnel_response
\"
"
)
!=
NULL
);
if
(
config
->
debug
&&
!
is_data_message
)
{
printf
(
"[DEBUG - WebSockets] Received message: %.*s
\n
"
,
payload_len
,
payload
);
...
...
@@ -1888,13 +1888,12 @@ int run_daemon_mode(wsssh_config_t *config, const char *client_id, const char *w
// Handle tunnel messages
if
(
strstr
(
buffer
,
"tunnel_data"
)
||
strstr
(
buffer
,
"tunnel_response"
))
{
if
(
config
->
debug
)
{
if
(
strstr
(
buffer
,
"tunnel_data"
))
{
printf
(
"[DEBUG - Tunnel] Received tunnel_data message
\n
"
);
}
else
{
// Suppress tunnel_data debug messages in debug mode
if
(
!
strstr
(
buffer
,
"tunnel_data"
))
{
printf
(
"[DEBUG - Tunnel] Received tunnel_response message
\n
"
);
}
fflush
(
stdout
);
}
}
// Extract request_id and data
char
*
id_start
=
strstr
(
buffer
,
"
\"
request_id
\"
"
);
char
*
data_start
=
strstr
(
buffer
,
"
\"
data
\"
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment