Hello,
I've written a small reverse-telnet client that connects to a server that
handles all the clients.
the reverse telnet node ( whitch i will refer to as rtn from now on) works
by opening up a pty, and with a simple select() it passes data between the
sockets and the pty that /bin/sh runs on.
Meanwihle, the server program( that i will refer to as trc from now on)
sits and listens for nodes running rtn, once a node connects trc takes
controll over it; my problem?
once a rtn node connects to trc2, it works fine, but im having problems on
the input line ( i've tryed 'nc' in listen mode and it works fine, even
the mangled prompt )
Anyway, my problem is the terminal doesnt work properly for example tpying
on the trc prompt i get this undesired result;
hardk0re$ ls -lah /u lo bi mo ls -lah /usr/local/bin/mozilla
-rwxr-xr-x 1 root root 2.9k Jun 19 17:51
/usr/local/bin/mozilla hardk0re$
As you can see, when i type text it does not 'expand' but after i press
'enter' the desired output that i want on the terminal line is printed
out.
Zhivago from #C freenode aksed me to compile this small program;
---
#include <stdio.h>
#include <stdlib.h>
int main(){
int c;
c = getchar();
printf("%c\n",c);
}
---
As you would expect on a normal terminal ( not my cruddy trc :-P ) it
prints out;
hardk0re$ ./a.out
m <- the letter you typed
m <- the letter printf'd back
hardk0re$
But on trc it behaves oddly,
hardk0re$ ./a.out
../a.out
m
m
m
hardk0re$
If anyone knows how to rememdy this i would be very pleased to hear it,
thank you in advance. 2 1702
It sounds like you're using cbreak mode instead of raw mode.
Cbreak mode forces input to be delimited with newlines. Raw
mode allows you to handle things one character at a time, but
it also requires you to handle such things as backspaces and
other forms of input line editing.
--
Fletcher Glenn
Brendan zerofor0je wrote: Hello,
I've written a small reverse-telnet client that connects to a server that handles all the clients.
the reverse telnet node ( whitch i will refer to as rtn from now on) works by opening up a pty, and with a simple select() it passes data between the sockets and the pty that /bin/sh runs on.
Meanwihle, the server program( that i will refer to as trc from now on) sits and listens for nodes running rtn, once a node connects trc takes controll over it; my problem?
once a rtn node connects to trc2, it works fine, but im having problems on the input line ( i've tryed 'nc' in listen mode and it works fine, even the mangled prompt )
Anyway, my problem is the terminal doesnt work properly for example tpying on the trc prompt i get this undesired result;
hardk0re$ ls -lah /u lo bi mo ls -lah /usr/local/bin/mozilla -rwxr-xr-x 1 root root 2.9k Jun 19 17:51 /usr/local/bin/mozilla hardk0re$
As you can see, when i type text it does not 'expand' but after i press 'enter' the desired output that i want on the terminal line is printed out.
Zhivago from #C freenode aksed me to compile this small program; --- #include <stdio.h> #include <stdlib.h>
int main(){ int c; c = getchar(); printf("%c\n",c); } --- As you would expect on a normal terminal ( not my cruddy trc :-P ) it prints out; hardk0re$ ./a.out m <- the letter you typed m <- the letter printf'd back hardk0re$
But on trc it behaves oddly,
hardk0re$ ./a.out ./a.out m m m hardk0re$
If anyone knows how to rememdy this i would be very pleased to hear it, thank you in advance.
On Sat, 08 Nov 2003 00:50:46 +0000, Fletcher Glenn wrote: It sounds like you're using cbreak mode instead of raw mode. Cbreak mode forces input to be delimited with newlines. Raw mode allows you to handle things one character at a time, but it also requires you to handle such things as backspaces and other forms of input line editing.
--
Fletcher Glenn
Brendan zerofor0je wrote: Hello,
I've written a small reverse-telnet client that connects to a server that handles all the clients.
the reverse telnet node ( whitch i will refer to as rtn from now on) works by opening up a pty, and with a simple select() it passes data between the sockets and the pty that /bin/sh runs on.
Meanwihle, the server program( that i will refer to as trc from now on) sits and listens for nodes running rtn, once a node connects trc takes controll over it; my problem?
once a rtn node connects to trc2, it works fine, but im having problems on the input line ( i've tryed 'nc' in listen mode and it works fine, even the mangled prompt )
Anyway, my problem is the terminal doesnt work properly for example tpying on the trc prompt i get this undesired result;
hardk0re$ ls -lah /u lo bi mo ls -lah /usr/local/bin/mozilla -rwxr-xr-x 1 root root 2.9k Jun 19 17:51 /usr/local/bin/mozilla hardk0re$
As you can see, when i type text it does not 'expand' but after i press 'enter' the desired output that i want on the terminal line is printed out.
Zhivago from #C freenode aksed me to compile this small program; --- #include <stdio.h> #include <stdlib.h>
int main(){ int c; c = getchar(); printf("%c\n",c); } --- As you would expect on a normal terminal ( not my cruddy trc :-P ) it prints out; hardk0re$ ./a.out m <- the letter you typed m <- the letter printf'd back hardk0re$
But on trc it behaves oddly,
hardk0re$ ./a.out ./a.out m m m hardk0re$
If anyone knows how to rememdy this i would be very pleased to hear it, thank you in advance.
Thanks, It worked! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: flamesrock |
last post by:
First, I'm very new to gui programming, so please go lightly on me :)
Ok, so far I've settled on wxPython, and what I'd like to do as a first
leap is *convert* a text program into a gui program....
|
by: Michael ALbanese |
last post by:
I am developing a telephone directory for my company.
I have Fist Name, Last Name, Department and Phone Number
as fields. A user can search by entering data into any
one, or combination of these...
|
by: Michael Albanese |
last post by:
I am developing an application to handle my compay's OSHA
reporting requirements.
Some of the input criteria are technical and narowly
defined, so I was trying to prvide what i call "Context...
|
by: Stampede |
last post by:
I browsed the web and found a GUI Controll on a ScreenShot. As the software
which uses this controll is written as an Add-In for MS Outlook I think this
Controll has to be with the Visual Studio.
...
|
by: OHM |
last post by:
Hi peoples,
I dont know where to place this question, so as I know you guys are all
resourceful experts, I thought I would try here.
I am writing some code which will be run usingh remote...
|
by: Joel Hedlund |
last post by:
Hi all!
I use python for writing terminal applications and I have been bothered
by how hard it seems to be to determine the terminal size. What is the
best way of doing this?
At the end I've...
|
by: ajishapj |
last post by:
hii
guys
i am ajish
i am having a problem with my panel controll in vb.net
actually i am creating a panel user controll with out a scroll bars(auto scrolling set to false)
,and i have to...
|
by: malav123 |
last post by:
Hi,
I am using Tab container Controll of ajax... but my problem is that when i put the tab container in "update pannel" the style of tab container tottly gets changed.. and if i...
|
by: =?Utf-8?B?RHdlZWJlcmVsbGE=?= |
last post by:
I created an Access 2007 application for my customer. The application is
shared by three employees on a server. It maintains a contact list including
financial data and social security numbers. ...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |