1. Connection between PCs on the Internet
- Posted by sergelli Feb 08, 2015
- 1989 views
Hello friends.
Using only Euphoria, you can build a program that exchange files between PCs connected to the Internet?
What functions, commands and libraries should I use? Thanks in advance
2. Re: Connection between PCs on the Internet
- Posted by katsmeow Feb 08, 2015
- 1949 views
Hello friends.
Using only Euphoria, you can build a program that exchange files between PCs connected to the Internet?
What functions, commands and libraries should I use? Thanks in advance
Write down what you want to do, then include those libs that perform those functions. Then write Eu code to pass data back and forth between those functions you included. It is done. (The blinding lightning, heavy and crashing thunder, howling wind, and awe-inspiring reverb effects are optional.)
Kat
3. Re: Connection between PCs on the Internet
- Posted by sergelli Feb 08, 2015
- 1927 views
hello Kat. Thanks for the reply
I think not explained myself well
I wish to make a program in Euphoria that make the exchange of files between two PCs using an internet connection
Please can you help, informing what resources should I use?
4. Re: Connection between PCs on the Internet
- Posted by katsmeow Feb 08, 2015
- 1939 views
Honestly, if you cannot get started, i suspect you will be better off with a commercial (or free) app you install and click to run. You can use GNU wget from command line in windows or nix to download with. There's a wget.exw in Euphoria somewhere.
Kat
5. Re: Connection between PCs on the Internet
- Posted by ChrisB (moderator) Feb 09, 2015
- 1850 views
Hi
There are many ways of exchanging files over the internet. It will require a little research on your part, but your best bet would be to use existing programs, and use eu as a front end.
wget and ftp are probably your best bet.
Using ftp set up and ftp server at both of the computers, then use a ftp or wget to get and put files to each of the servers as required. There is a ton of existing documentation out there. Happy reading.
I use ftp to transfer files from within eu, I jut use it to call the external ftp programs. But I have an easy life, I use Linux to do this, and the command line ftp is already present. I use vsftpd as the server.
There are http solutions too - HTTP GET and POST are a couple of methods, but I'm not knowledgeable enough in this area to make any kind of recommendation.
Hope this helps.
Chris
6. Re: Connection between PCs on the Internet
- Posted by sergelli Feb 09, 2015
- 1830 views
Honestly, if you cannot get started, i suspect you will be better off with a commercial (or free) app you install and click to run. You can use GNU wget from command line in windows or nix to download with. There's a wget.exw in Euphoria somewhere.
Kat
Yes, I can get start, but it will be better to use something that already exists and is working, Why invent the wheel again?
Yes, you are right in many directions about commercial and free app. But I already use some free solutions. I would cite the TeamViewer which is a great job. Maybe it's the best.
But I wish some features that this program does not have, and still desire to eliminate some features that do not need and that are hindering my work.
Thank you for indicating the wget.exw
I'll try to find this file.
7. Re: Connection between PCs on the Internet
- Posted by sergelli Feb 09, 2015
- 1844 views
I use ftp to transfer files from within eu, I jut use it to call the external ftp programs. But I have an easy life, I use Linux to do this, and the command line ftp is already present. I use vsftpd as the server.
Chris
This method requires you to know:
1. The router IP in the Internet network
2. The machine's IP on the internal network that router
How do you find these numbers?
8. Re: Connection between PCs on the Internet
- Posted by euphoric (admin) Feb 09, 2015
- 1877 views
Hello friends.
Using only Euphoria, you can build a program that exchange files between PCs connected to the Internet?
What functions, commands and libraries should I use?
Get the file urlmon in the archive.
Use the URLDownloadToFile() function.
9. Re: Connection between PCs on the Internet
- Posted by ChrisB (moderator) Feb 09, 2015
- 1868 views
Hi
I wrote a little programlet to find these out. Its on a linux system, but should be adaptable to a windows system
--separate standalone --in /ipdetect/ipdetect.eui include std/io.e include std/filesys.e include std/regex.e as re sequence ifile, thiscomp = {} object extaddr = {} sequence re_quad object quad_matches system("/sbin/ifconfig > if.txt", 0) ifile = read_lines("if.txt") for i = 1 to length(ifile) do if match("inet addr:", ifile[i]) > 0 then thiscomp = "This computer " & ifile[i][match("inet addr:", ifile[i])..$] exit end if end for --this does not seem to work any more --system("wget -q http://automation.whatismyip.com/n09230945.asp", 0) --try these -- checkip.dyndns.org/ -- checkip.dyndns.org:8245/ -- dynamic.zoneedit.com/checkip.html -- dynupdate.no-ip.com/ip.php --http://box.houkouonchi.jp/ip.php --system("wget -q http://box.houkouonchi.jp/ip.php -O ip_addr.txt", 0) --system("wget -q http://dynamic.zoneedit.com/checkip.html -O ip_addr.txt", 0) system("wget -q http://checkip.dyndns.org -O ip_addr.txt", 0) extaddr = read_lines("ip_addr.txt") --find quad within that line --sometimes the line is HTTP formatted. --sometimes there is more than one line re_quad = re:new("[0-9]+.[0-9]+.[0-9]+.[0-9]+") for i = 1 to length(extaddr) do quad_matches = re:matches(re_quad, extaddr[i]) if sequence(quad_matches) then extaddr[1] = quad_matches[1] exit end if end for if sequence(extaddr) then extaddr = "External ip = " & extaddr[1] else extaddr = "Can't reach ip identifier site" end if puts(1, thiscomp & "\n") puts(1, extaddr & "\n") delete_file("wget.log") delete_file("if.txt") --delete_file("ip_addr.txt")
Another option would be to use dropbox, create shared folders on all the target machines, and just copy the file to the local machine folder, it will appear in the other local machines folder as well.
Just a thought, which has just occurred to me would be useful for a project I'm thinking about now. Thanks sergelli!
Chris
10. Re: Connection between PCs on the Internet
- Posted by sergelli Feb 09, 2015
- 1811 views
Hi
Another option would be to use dropbox, create shared folders on all the target machines, and just copy the file to the local machine folder, it will appear in the other local machines folder as well.
Just a thought, which has just occurred to me would be useful for a project I'm thinking about now. Thanks sergelli!
Chris
I think it would be best not to use any DDNS (like dyndns.org) and have an Internet address where we can publish the address and status of the PCs we want to have connection.
What do you think about that?
11. Re: Connection between PCs on the Internet
- Posted by ChrisB (moderator) Feb 09, 2015
- 1820 views
Hi
Another option would be to use dropbox, create shared folders on all the target machines, and just copy the file to the local machine folder, it will appear in the other local machines folder as well.
Just a thought, which has just occurred to me would be useful for a project I'm thinking about now. Thanks sergelli!
Chris
I think it would be best not to use any DDNS (like dyndns.org) and have an Internet address where we can publish the address and status of the PCs we want to have connection.
What do you think about that?
Hi
Well of course, that's your choice, but I was not aware of any security issue that arose when you just queried the server for the address that was querying it. Of course one could become so utterly paranoid that your computer was going to be hacked, that you would never venture onto the internet at all, pull up all the drawbridges, and pull all the network plugs. This is just one of the many reasons I like Linux of course.
There area ton of other options to pursue (this was just a quick and dirty hack), you just have to pick one that's right for you.
Cheers
Chris
12. Re: Connection between PCs on the Internet
- Posted by katsmeow Feb 09, 2015
- 1790 views
There area ton of other options to pursue
Going into paranoid mode...
You could log onto some irc network that hides the users' IP from each other, join an agreed-to #channel or @channel, then handshake a while with an agreed-to Q&A session, and then tell each other your IP addresses. If you are going to do this manually, then many irc clients have file transfer abilities (sometimes called DCC).
Or you could whois, who, ping, or otherwise annoy a whole class C where you know your source is going to be, until you get back the correct responce, and that's their IP, and then you handshake with the usual Q&A prompt-responce, etc. This is not a good idea if NORAD or some .mil is in that class C.
Or you watch some site where people post stuff, supposedly anonymously, and they or you post your IP in some obtuse fashion, which the other person watching can see, and then you handshake with the usual Q&A prompt-responce, etc.
Seems to me i wrote a Eu program, years ago, to upload files to the Eu postit section of this website, which sorta makes it a server, in that it sends a file to somewhere on the internet. It's in the archives, or buried deep in OE somewhere, i forget.
You could do all the above using TOR or a VPN. If any of this is too complicated, just use Mirc.
Kat
13. Re: Connection between PCs on the Internet
- Posted by sergelli Feb 09, 2015
- 1802 views
Well of course, that's your choice, but I was not aware of any security issue that arose when you just queried the server for the address that was querying it. Of course one could become so utterly paranoid that your computer was going to be hacked, that you would never venture onto the internet at all, pull up all the drawbridges, and pull all the network plugs. This is just one of the many reasons I like Linux of course.
There area ton of other options to pursue (this was just a quick and dirty hack), you just have to pick one that's right for you.
Cheers
Chris
Yes. We need takes hard work to have a safe access on the internet. My Nephew undergoes more than 100 intrusion attempts every day. He uses Telnet in Linux and uses only the firewall to protect.
Please could you tell me what information you get from dyndns.org?
14. Re: Connection between PCs on the Internet
- Posted by ChrisB (moderator) Feb 11, 2015
- 1804 views
Hi
put this into your url bar
it returns the ip addrees you present to the outside world, as a text file.
wget is the program I call to do this.
The rest of the program gives info about the computers ip address (not the same as above).
The eu program just packages these, and returns them in a human readable presentation.
Cheers
Chris
Oh, and stop using telnet!
15. Re: Connection between PCs on the Internet
- Posted by Ekhnat0n Feb 11, 2015
- 1707 views
hey scooby,
how's life nowadays in canada as an indian warrior and minion?
remember ekhnaton from IRC-chat Euphoria?
wkr
antoine
16. Re: Connection between PCs on the Internet
- Posted by sergelli Mar 16, 2015
- 1629 views
Hello Chris
I found this command line, this return our external ip number.
$ curl ifconfig.me
17. Re: Connection between PCs on the Internet
- Posted by ChrisB (moderator) Mar 16, 2015
- 1637 views
Hi
Thats another option of course, but just to make it clear, thats not an internal program, that still uses an external web address to return your ip address that shows to the internet - very much like getting the info back from dyndns. I'm sure thare are other reponders out there too.
In fact, if you have a known Linux box you can ssh into, you can do
tty
will give you the terminal id you are logged into (call that <tty> ), then
who | grep <tty>
will give you the ip address you are logged in from. In some cases it may give you a resolved name, in whach case, feed that into dig
eg
dig www.google.com
As I said, loads of options
Chris