Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Write to hidden partition, Drag File [OUT] of form

Drag File [OUT] of form

We all know how to drag a file into the form.
But this lets us drag one out

So for example you are building a 'FTP Manager' you will want to drag the remote files to the desktop
Code
Private Sub Button1_DragLeave(sender As Object, e As EventArgs) Handles Button1.MouseDown
      Dim filepath As String = "D:\Users\lol\Appdata\Temp\lol.txt"
      Dim data As DataObject = New DataObject()
      data.SetData(DataFormats.FileDrop, New String() {filepath})
      Button1.DoDragDrop(data, DragDropEffects.Copy)
    End Sub

Write to hidden partition

If you have a hidden partition, you will want to write data to it without assigning a a drive-label
Code
Dim array() As Int32 = {1, 4, 6, 7, 11, 55, 777, 23, 266, 44, 82, 93}
Using writer As BinaryWriter = New BinaryWriter(System.IO.File.Open("\\?\Volume{343894234-3D32-34E3-DF34-343423432423443}\\lol.txt", FileMode.Create))
      ' Write each integer.
      For Each value1 As Int32 In array
      writer.Write(value1)
      Next
      End Using
(Dec 25, 2014 05:55 PM)KingDeath360 Wrote:  "\\?\Volume{343894234-3D32-34E3-DF34-343423432423443}\\lol.txt"

May you better explain this part?

And, for each value1 in Array? Which array?
(Dec 25, 2014 06:49 PM)RandomUser123 Wrote:  May you better explain this part?

And, for each value1 in Array? Which array?

Read the code again and you'll see. But then again this could of been prevented if OP used decent naming conventions.
(Dec 25, 2014 07:06 PM)+Haze Wrote:  Read the code again and you'll see. But then again this could of been prevented if OP used decent naming conventions.

Ye, sorry, i don't know why i didnt see it before -_-"


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by Beginner1234Nov 11, 2021 03:54 AM 2 141 Nov 11, 2021 03:54 AM
Last Post: 3phase
[C#] by draxyeeJun 5, 2020 02:58 PM 1 244 Jun 5, 2020 02:58 PM
Last Post: Porn
[Shell] by SIM-4581439Apr 5, 2020 06:19 PM 0 173 Apr 5, 2020 06:19 PM
Last Post: SIM-4581439