|
Luigi Auriemmaaluigi.org (ARCHIVE-ONLY FORUM!) |
|
It is currently 19 Jul 2012 13:36
|
View unanswered posts | View active topics
|
Page 1 of 1
|
[ 10 posts ] |
|
Author |
Message |
Reaper
|
Post subject: stcppipe.exe usage Posted: 11 Mar 2009 17:42 |
|
Joined: 11 Mar 2009 17:31 Posts: 2
|
First of all, hello everyone.
I'm trying to use some host I own as a bridge to a lan. But this host is behind the router of the lan.
For example, If I'd like to connect to 192.168.0.1 on port 22 on that lan... How could I do it? I tried the reverse connection on stcppipe, but I'm not sure on how to do it.
Thanks in advance.
|
|
Top |
|
|
|
|
|
|
|
aluigi
|
Post subject: Re: stcppipe.exe usage Posted: 11 Mar 2009 18:05 |
|
Joined: 13 Aug 2007 21:44 Posts: 4068 Location: http://aluigi.org
|
uhmmm, for a connection between only 2 endpoints (so without an external server which handles the connection like a proxy or which creates a direct UDP connection (example Gamespy natneg)) you need that at least one of them can accept direct connections.
so if this host can't be reached directly but your pc can be contacted by that host (host->you) you can do the following:
on the other host run: > stcppipe -r 127.0.0.1:22 YOUR_IP 69 0
on your pc run: > stcppipe 0 22 69
where YOUR_IP is obviously the IP address of your pc and 69 is a port at your choice of your pc where you can receive connections, I tell you in case you have a router and so must open a port.
after you do this the only thing you must do is waiting the connection from that host (appears a message in your stcppipe) and then just connecting ssh to yourself (127.0.0.1).
obviously it's not the "state of the art" but works. note that the stcppipe on the remote host will continue to connect to your IP forever because it's made for giving to the other endpoint (you) all the time to bind the port so keep this in mind.
|
|
Top |
|
|
Reaper
|
Post subject: Re: stcppipe.exe usage Posted: 13 Mar 2009 17:27 |
|
Joined: 11 Mar 2009 17:31 Posts: 2
|
Thanks for reply! It works for connections on the remote host, but not for other hosts in that lan...
|
|
Top |
|
|
aluigi
|
Post subject: Re: stcppipe.exe usage Posted: 13 Mar 2009 17:59 |
|
Joined: 13 Aug 2007 21:44 Posts: 4068 Location: http://aluigi.org
|
in this case you need a vpn software without doubts using your machine as vpn server and one of the hosts there as client with the ability of forwarding the packets to the other hosts too (so the others pc there can use that machine as router to reach your network). don't ask me how to do it in practice because I have never set up a similar thing :)
|
|
Top |
|
|
tuskes
|
Post subject: Re: stcppipe.exe usage Posted: 14 Mar 2011 22:42 |
|
Joined: 14 Mar 2011 22:19 Posts: 3
|
Dear, I tried to use this program, it works. I have one problem. I would like to use the -s to change sting in the data. But the length of the 2 strings differ. The program overwrites the data after the original string because the new string is longer. You used memcpy but probably the memmove would be better. Regards, Imre
|
|
Top |
|
|
aluigi
|
Post subject: Re: stcppipe.exe usage Posted: 15 Mar 2011 12:54 |
|
Joined: 13 Aug 2007 21:44 Posts: 4068 Location: http://aluigi.org
|
memmove would be necessary for copying data between 2 points of the same string and even in that case I would never suggest to use it due to some bad experiences I had in the past, better to use a classical byte-per-byte manual copying.
while for the rest you can't do that thing with stcppipe because I added that option only for some simple tests so the data will not be expanded/shinked if the second string is larger/smaller, it simply replaces it overwriting data after if if it's longer.
indeed it's technically not possible to do a similar substituition without knowing and parsing the protocol correctly (tons of techcnical reasons, while on udp it's ok)
|
|
Top |
|
|
tuskes
|
Post subject: Re: stcppipe.exe usage Posted: 17 Mar 2011 13:38 |
|
Joined: 14 Mar 2011 22:19 Posts: 3
|
Luigi, I tried to compile the source but it was not succeeded. There were a lot of error. Are you able to give me some advice? Regards, Imre
|
|
Top |
|
|
aluigi
|
Post subject: Re: stcppipe.exe usage Posted: 17 Mar 2011 20:41 |
|
Joined: 13 Aug 2007 21:44 Posts: 4068 Location: http://aluigi.org
|
|
Top |
|
|
tuskes
|
Post subject: Re: stcppipe.exe usage Posted: 19 Mar 2011 21:40 |
|
Joined: 14 Mar 2011 22:19 Posts: 3
|
Hello, Still no success! We tried BorlandC, c++, gcc... . . . stcppipe.c:990: error: invalid conversion from `char*' to `u8*' stcppipe.c:993: error: invalid conversion from `u8*' to `const char*' stcppipe.c:993: error: initializing argument 1 of `int atoi(const char*)' stcppipe.c:997: error: invalid conversion from `u8*' to `char*' stcppipe.c:997: error: initializing argument 1 of `in_addr_t resolv(char*)' stcppipe.c: In function `in_addr_t* create_ip_array(u8*)': stcppipe.c:1017: error: invalid conversion from `u8*' to `const char*' stcppipe.c:1017: error: initializing argument 1 of `char* strchr(const char*, int)' stcppipe.c:1017: error: invalid conversion from `char*' to `u8*' stcppipe.c:1019: error: invalid conversion from `void*' to `in_addr_t*' stcppipe.c:1023: error: invalid conversion from `u8*' to `const char*' stcppipe.c:1023: error: initializing argument 1 of `char* strchr(const char*, int)' stcppipe.c:1023: error: invalid conversion from `char*' to `u8*' stcppipe.c:1026: error: invalid conversion from `u8*' to `char*' stcppipe.c:1026: error: initializing argument 1 of `in_addr_t resolv(char*)' stcppipe.c: In function `in_addr_t* get_ifaces()': stcppipe.c:1077: error: invalid conversion from `u8*' to `char*' stcppipe.c:1087: error: invalid conversion from `void*' to `in_addr_t*'
Tuskes@NUNC3LP0453 /cygdrive/c/Users/tuskes.NC3A/Downloads/stcppipe $
Tuskes@NUNC3LP0453 /cygdrive/c/Users/tuskes.NC3A/Downloads/stcppipe $
Tuskes@NUNC3LP0453 /cygdrive/c/Users/tuskes.NC3A/Downloads/stcppipe $ ls -la total 1028 drwx------+ 1 Tuskes Domain Users 0 Mar 19 16:41 . drwx------+ 1 Tuskes Domain Users 0 Mar 18 17:21 .. -rwx------+ 1 Tuskes Domain Users 10502 Apr 12 2009 acpdump2.h -rw-r--r--+ 1 Tuskes Domain Users 0 Mar 17 21:58 comp.log -rwx------+ 1 Tuskes Domain Users 3743 Mar 15 2009 ip2.h drwx------+ 1 Tuskes Domain Users 0 Mar 15 10:53 openssl -rwx------+ 1 Tuskes Domain Users 39435 Mar 15 10:47 stcppipe.c -rwx------+ 1 Tuskes Domain Users 893952 May 14 2009 stcppipe.exe.ori -rwx------+ 1 Tuskes Domain Users 823 Mar 17 21:43 stristr.c -rwx------+ 1 Tuskes Domain Users 3587 Apr 23 2006 winerr.h
Tuskes@NUNC3LP0453 /cygdrive/c/Users/tuskes.NC3A/Downloads/stcppipe $ c++ -o stcppipe stcppipe.c -lssl -lcrypto -lgdi32 -lws2_32 stristr.c
|
|
Top |
|
|
aluigi
|
Post subject: Re: stcppipe.exe usage Posted: 19 Mar 2011 22:35 |
|
Joined: 13 Aug 2007 21:44 Posts: 4068 Location: http://aluigi.org
|
you must specify gcc and not c++ to compile otherwise you must use the correct casting for all the file types
|
|
Top |
|
|
|
Page 1 of 1
|
[ 10 posts ] |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|