Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (sleakz, AndrewAMD), 684 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 4 1 2 3 4
Re: ftp_download [Re: DLively] #450941
04/25/15 07:47
04/25/15 07:47
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Your script is working fine for me.

Quote:

(...)
ftp_download("ftp://www.firoball.de/www/download/4lw.zip", "4lw.zip", "fd-lgkjsröog", "sfkjheifgrelkf");
(...)


Most likely you're missing the www base directory in your path.
Quote:
* Remembering we are in dir ""

Re: ftp_download [Re: FBL] #450953
04/25/15 15:48
04/25/15 15:48
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline OP
Serious User
DLively  Offline OP
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
Wow.. Really. Thats it?
Thats all I was missing...

That said.. All Hail Firoball laugh
You'd think that the developers would have had this solution.. Perhaps putting it into the manual for future seekers would be beneficial.

Now that it works, What security breaches does this cause? How can I properly make use of this as to not compromise my websites security?

#Happy.


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: ftp_download [Re: DLively] #450955
04/25/15 16:59
04/25/15 16:59
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
FTP in general is not really safe. And since you'll have the account data somewhere in your project, there's nothing like safety.
One thing you can do is having a user setup which is only allowed to read (download) files, and only has access to a single folder (maybe + subfolders) where you put all the download stuff.
If someone messes with that account, you'll get more download traffic, but you don't have to fear about unwanted upload/deletions.
-> never give away your "administrator" account

Maybe you can even get some server only responsible for providing downloadable stuff, so in case something happens with it, nothing else is affected.

I'm pretty sure justsid can tell you more about security issues, what I wrote is the bare minimum you can and should do.

Concerning the default folder: it usually is www - for web stuff. But this is not required, it can be anything. Basically you should use a ftp client and log in first, then see where you start - which you usually anyway do when you upload the file for later download. From there on you can trace the full required path. Just taking the web address and replacing http:// with ftp:// will not work, as your www-domain normally does not point to the ftp user's home directory.

Re: ftp_download [Re: FBL] #450960
04/25/15 20:04
04/25/15 20:04
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: Firoball
I'm pretty sure justsid can tell you more about security issues, what I wrote is the bare minimum you can and should do.

You know, I really wanted to from the get go of the thread but kept my mouth shut, but...

Originally Posted By: DLively
Now that it works, What security breaches does this cause?

All of them! You are putting both your server and your client at risk. As Firo mentioned, you are putting the credentials of your server into a binary that ships to your customers. So the customer can basically do whatever they want. You can try to combat that by constraining the user rights, but that's error prone and you are still doing something you ideally don't want to do at all. Basically the risk you are getting into here is that your ftp server becomes an anonymous drop for warez and porn, as well as kiddies just emptying out your server. If you like both waren and porn and aren't afraid of law enforcement, this is the way to go.

And then there is the client. FTP is not a secure connection, so it's prone to very easy man in the middle attacks. It'd be trivial to get the client to download data it never wanted to and there would be no way for you to verify the authenticity of the data. Getting a client to download arbitrary data and potentially even executing that with the permissions of your game (potentially admin rights, woop woop) is... Well, maybe not exactly what you want to happen.

The ideal way to go for this is to use a secure connection. HTTPS in particular. Since you know exactly what server you will talk to, you can easily (and definitely should!) pin the server certificate on the client and verify that you are really talking to your server.
Out of the box, Gamestudio does not not provide methods to either open an HTTPS connection nor does it provide methods for certificate pinning. You would need a DLL for that.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: ftp_download [Re: WretchedSid] #450961
04/25/15 21:18
04/25/15 21:18
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline OP
Serious User
DLively  Offline OP
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
Thanks Firoball laugh That really helps clear up why things were not working for me.. now that it does, it makes sense why it didn't...

Thank you Sid, I love reading your informations. Always a fun read. So basically just scrap everything I thought was right, and go back to square 1 where everyone has been telling me to start back at since the first time I asked this question...

So, dlls... face palm. For some reason Im having a tough time figuring these out..

Any good tutorials on combining VC++ with gstudio for a basic dll function?


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: ftp_download [Re: DLively] #450963
04/25/15 22:23
04/25/15 22:23
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Quote:
If you like both waren and porn and aren't afraid of law enforcement, this is the way to go.
, this line cracked me open grin

Quick question; are gs3d's http and sockets functions somewhat secure?

Re: ftp_download [Re: Reconnoiter] #450968
04/25/15 23:16
04/25/15 23:16
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
http is not secure either. As with ftp it's not acknex which is the problem, it's the protocol.

Re: ftp_download [Re: FBL] #450978
04/26/15 09:53
04/26/15 09:53
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Tnx for letting me know

Re: ftp_download [Re: Reconnoiter] #450980
04/26/15 12:49
04/26/15 12:49
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline OP
Serious User
DLively  Offline OP
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
So why is a dll more secure? or is it even? Because I can download software to open a dll, and then just find security information that way..


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: ftp_download [Re: Reconnoiter] #450992
04/26/15 18:07
04/26/15 18:07
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: Reconnoiter
Quick question; are gs3d's http and sockets functions somewhat secure?

To tag on to what Firo said, sockets aren't inherently secure either. But protocols on top of sockets can be secure, like for example HTTPS and SFTP.

Originally Posted By: DLively
So why is a dll more secure? or is it even? Because I can download software to open a dll, and then just find security information that way..

A DLL is not secure. That's not why you should use a DLL. You should use a DLL to use a secure protocol to get the data, namely HTTPS, because this functionality can't be found in Gamestudio. HTTPS does not require credentials that you have to put in the DLL, but HTTPS provides you with means to be sure that data is not tampered with. And, again, use certificate pinning to pin the server certificate. Otherwise, if you just accept any valid certificate, you are still suspicable to man in the middle attacks. And of course on the plus side, since you are no longer relying on the chain of trust to trust your server, you can use a self signed certificate which saves you a couple of bucks.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Page 2 of 4 1 2 3 4

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1