can we know when a file is succesfully transfer in SFTP [closed] - file

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I am about to read the whole ietf spec for sftp but was wondering if someone has been through this before at all. Is it possible that sftp provides a mechanism that can be used to figure out if a file has been succesfully transferred (something like last byte out) or by design this is not possible?

Use scp instead. According to the appropriate manual page (man scp):
DIAGNOSTICS
scp exits with 0 on success or >0 if an error occurred.
So, check the exit code of scp, and that should be what you need. sftp is really intended to be more of an interactive experience (although you can in fact call it in a batch-oriented sort of way, but it doesn't seem to provide as much useful information).

It seems that there is no guaranteed way to know it.

SFTP protocol doesn't have the concept of "file transfer". It has operations like "open file", "write to file at position X" (random access is supported) and "close file".
Potentially the SFTP server knows when the file is closed by the client and this can be treated as "upload complete". But in most cases there are no hooks for this. On the client side it's the same.

Related

What is a good indicator of a request sent over a socket? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am writing some codeql for web servers like apache and nginx. I have done some research and found that a good indicator of a request is ntohs or ntohl because the the data that is sent over a socket needs to be converted from network byte order to host byte order. Are there any other indicators which I should use for web servers?
"Are there any other indicators which I should use for web servers?"
Your post includes the C tag, so besides the byte order functions you include the select() function should be at least included in the conversation for its message traffic handling capabilities. It is available for both Linux and windows environments, as indicated by following links.
The select(). call is commonly used to manage socket traffic. Read about the concept here. (Link includes tutorial content with code snippets for illustration.)

Using C to output a key on a web page [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Is there any way I can use ANSI C to output words onto a web page? Or if I'm completely off, what language (or script) is used to do this sort of stuff?
I wanna try this since I just found a website (virtualpiano), and now I want to make some kind of programming that can read out the "notes" and play it on the virtual piano.
Thanks a bunch!
You should probably look at JavaScript instead. You can write C programs that are run on the web server, and the output from the C program will be the text of the web page, but that is not a very modern way of doing it, and for a thing like a virtual piano you need to run the program on the client, i. e. in the user's web browser, and then JavaScript will be a better choice.
Javascript should have been a better option for you, maybe you might want to check Soundslice, this have something similar to what you need or this SO post creating sheet music with piano or even this github repo abcjs which gives some close to what you're trying to archive.
I hope this helps.

VisualBasic.net Adding Mysql database check [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
Hello good people of stack overflow i am in dire need of some and little bit of help so i been looking at this program done in vb.net here link http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=8869&lngWId=10
it is made to stop people from opening any app or webpage with any of words in here a pic
http://imgur.com/kuTFKls
i mark some stuff out so people wont get fended here put with programs name you can guess what they were ok so what i am asking is how would i make this work with mysql data base could you help me i got database up on server but how do i make program check the database for any word that are in TextBox3.Text.Contains so it just check the database so i can get rid of this list as i remaking what programs for
p.s if my spelling wrong i am so sorry edit as you wish or just tell me thanks people of stack
Load the .sln into Visual Studio
Search the code for these words: File and Stream
Replace the file I/O with MySQL functionality. There are many places on the Internet that will tell you how to do this. For example: Connecting-to-MySQL-databases-using-VB-NET

How can I find out what language this file is? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have this file, and I have absolutely no idea what kind of file it is.
When I open it in Notepad++ it reads as
ð X döS
or
(source: gyazo.com)
How can I figure out what language this is?
Looks like that http://patch.us.wizard101.com:12500/ returns some sort of patch file for a game client. Chances are there is some api calls you are missing that tell the server what file to generate and return. But since only game clients need to directly call that file I would delete it and chalk it up to a broken client.
Either that or the site's download handler is broken and is giving a garbage file.
There's no clear answer, because you can't really. You can do some research on the encoding, or see if you can piece it together depending on the file's origin.
This program will test against common file types to see if it can be opened with success: http://download.cnet.com/TrlD-File-Identifier-for-NET/3000-2248_4-10442461.html

Data destruction [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
There are many file shredders programs that one can use in order to delete permanently one file. What I want to know is some implementation details. For example, considering Gutmann algorithm, how it should work with file and file system? Should an application iterate over all hdd cluster in order to overwrite them? Or it will be enough to open one file, change it content in some way and after that to delete it?
Vice versa, how to restore deleted file? I have not found a lot of information for these topics.
I will be very thankful for your replies.
You could look at the source code of the shred utility which is a part of the GNU core utils found on Linux.The basic idea is to make multiple passes over the disk blocks.There are also some assumptions made about the way the underlying files system commits these writes. See info coreutils 'shred invocation' for more information.
Restoring deleted files are done best when you know the internal layout of the file system in question and how the delete operation is implemented on it. For example, many drivers for the FAT file system just mark the directory entry as deleted but leave the file's content in tact. (Until and unless it is over-written by new files that you create). So you could just take a dump of the disk and scan through the raw data looking for what you want.

Resources