Hack Forums
[C] Drive Explorer/File Manager over sockets - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C] Drive Explorer/File Manager over sockets (/showthread.php?tid=5846770)



Drive Explorer/File Manager over sockets - stdio - Jun 10, 2018

Hello HF,
I want remote file transfer over tcp sockets. User should be able to view drives and directories (explorer style) and download any file.
I have no idea how to go about it, any help will be appreciated.
Thanks


RE: Drive Explorer/File Manager over sockets - movsx - Jun 10, 2018

I would start by learning network programming. You can checkout Beej's network programming guide which is pretty much standard and a great resource for learning network programming.


RE: Drive Explorer/File Manager over sockets - stdio - Jun 10, 2018

(Jun 10, 2018 11:29 AM)movsx Wrote:  I would start by learning network programming.  You can checkout Beej's network programming guide which is pretty much standard and a great resource for learning network programming.

I have read quite a bit and actually have it working with help of some kind people on HF.
I can download data from client machine, what I want is a explorer style file browser that shows disk drives and its directories and any file can be selected for download.
Basically something like this
https://www.youtube.com/watch?v=08N-SM8oGBM


RE: Drive Explorer/File Manager over sockets - movsx - Jun 10, 2018

(Jun 10, 2018 01:46 PM)Homi Wrote:  I have read quite a bit and actually have it working with help of some kind people on HF.
I can download data from client machine, what I want is a explorer style file browser that shows disk drives and its directories and any file can be selected for download.
Basically something like this
https://www.youtube.com/watch?v=08N-SM8oGBM

To be clear, you are talking about the GUI right?

You can use a ListView component for that, or even a TreeView. Here's some example code for a ListView: https://msdn.microsoft.com/en-us/library/windows/desktop/hh298360(v=vs.85).aspx

Of course, to make something like this it will require you putting together many different components. You'll need a GUI, a networking component, a way to browse the file system, etc.


RE: Drive Explorer/File Manager over sockets - stdio - Jun 11, 2018

(Jun 10, 2018 03:28 PM)movsx Wrote:  To be clear, you are talking about the GUI right?

You can use a ListView component for that, or even a TreeView.  Here's some example code for a ListView: https://msdn.microsoft.com/en-us/library/windows/desktop/hh298360(v=vs.85).aspx

Of course, to make something like this it will require you putting together many different components.  You'll need a GUI, a networking component, a way to browse the file system, etc.

Thank you for responding, I am building the GUI using Visual studio MFC. I am wondering how server client will communicate when File manager is used.
Should the client send whole directory tree of each drive and server can use that info to build an interactive image? I have no idea how to go about the flow of file manager. Need few tips if someone has done it before or could point me to right direction so I can implement?


RE: Drive Explorer/File Manager over sockets - movsx - Jun 11, 2018

(Jun 11, 2018 10:04 AM)Homi Wrote:  Thank you for responding, I am building the GUI using Visual studio MFC. I am wondering how server client will communicate when File manager is used.
Should the client send whole directory tree of each drive and server can use that info to build an interactive image? I have no idea how to go about the flow of file manager. Need few tips if someone has done it before or could point me to right direction so I can implement?

What I would do is only send the current directory requested. I.e.,list the disk partitions like C:\ for example.

Then the user sends a packet "give me the files in the C:\ drive"

you reply with say...

Cat Pics
System32
etc...

User then sends a packet with "give me the files in the C:\Cat Pics drive"

And you reply with

kitten1.jpeg
cat.png

etc


RE: Drive Explorer/File Manager over sockets - stdio - Jun 12, 2018

(Jun 11, 2018 05:04 PM)movsx Wrote:  What I would do is only send the current directory requested.  I.e.,list the disk partitions like C:\ for example.

Then the user sends a packet "give me the files in the C:\ drive"

you reply with say...

Cat Pics
System32
etc...

User then sends a packet with "give me the files in the C:\Cat Pics drive"

And you reply with

kitten1.jpeg
cat.png

etc

cool, thanks mate.
I will surely come back with updates after implementing it.