Later you wait a DELAY for payload to download. It's fine if you expect the payload to be downloaded from a remote host. But if you use the TFTPServer fro the metasploit console. Would be nice to know when the file has been requested (hopefully by the victim), so you can continue with exploitation.

After checking Rex::Proto::TFTP::Server I guess the easier way, without having to modify the TFTPServer implementation is to use:

```
@tftp.register_file(downfile,@pl, true)
```

By setting once => true (third argument) the file is deleted from the files array once has been downloaded:

```
					# if the file is a one-serve, delete it from the files array
					if tr[:file][:once]
						#puts "[*] Removed one-serve file: #{tr[:file][:name]}"
						self.files.delete(tr[:file])
					end
```

In this way, since you're registering just once file to download, you can know if the file has been downloaded by just asking if @tftp.files.length == 0 :-) I know it's the best solution, but its a more elegant solution than just wait for a delay I think.