Hack Forums
[.NET] Issues Downloading a File From Webhost - 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: [.NET] Issues Downloading a File From Webhost (/showthread.php?tid=5829486)



Issues Downloading a File From Webhost - RoSESP - Apr 25, 2018

I'm currently using this method to download the dll:

Code
dll = "(exact link to my dll, i can click it and it will directly download it)" ' Main build

Code
   Private Sub Inject()

       My.Computer.Network.DownloadFile(dll, "C:\temp\Loader\dll\" + filename)
       'Dim ToHideDir As New System.IO.DirectoryInfo("C:\temp\Loader\dll")
       'ToHideDir.Attributes = IO.FileAttributes.Hidden
       My.Computer.FileSystem.WriteAllText("c:\temp\Loader\Nova.Hook.DLLname", filename, False)
       Timer1.Stop()
       Dim TargetProcess As Process() = Process.GetProcessesByName(TextBox1.Text)
       TargetProcessHandle = OpenProcess(PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, False, TargetProcess(0).Id)
       pszLibFileRemote = "C:\temp\Loader\dll\" + filename
       pfnStartAddr = GetProcAddress(GetModuleHandle("Kernel32"), "LoadLibraryA")
       TargetBufferSize = 1 + Len(pszLibFileRemote)
       Dim Rtn As Integer
       Dim LoadLibParamAdr As Integer
       LoadLibParamAdr = VirtualAllocEx(TargetProcessHandle, 0, TargetBufferSize, MEM_COMMIT, PAGE_READWRITE)
       Rtn = WriteProcessMemory(TargetProcessHandle, LoadLibParamAdr, pszLibFileRemote, TargetBufferSize, 0)
       CreateRemoteThread(TargetProcessHandle, 0, 0, pfnStartAddr, LoadLibParamAdr, 0, 0)
       CloseHandle(TargetProcessHandle)
       Me.Show()
       'Dim ToHideDll As New System.IO.FileInfo("C:\temp\Loader\dll\" + filename)
       'ToHideDll.Attributes = IO.FileAttributes.Hidden
       Form3.Show()
       Me.Close()
   End Sub

I commented out the hidden parts so i can easily see what is being downloaded, and it's only 1kb, better yet 841 bytes. Better yet when i edit the dll with notepad++ this is what i get??

pastebin.com/5P6heLg1


RE: Issues Downloading a File From Webhost - alexconnolly - Apr 26, 2018

The website you are requesting the file from requires you to have Javascript enabled. As you are using a web-request and not a fully-fledged browser, JS is not handled.

You're kind of out of it with this. You have no control over the website and you can't really do a lot about that.


RE: Issues Downloading a File From Webhost - Dalvik - Apr 26, 2018

(Apr 26, 2018 01:32 AM)alexconnolly Wrote:  The website you are requesting the file from requires you to have Javascript enabled. As you are using a web-request and not a fully-fledged browser, JS is not handled.

You're kind of out of it with this. You have no control over the website and you can't really do a lot about that.

There are a lot of sites (for example Facebook) that give this message if the request was not properly emulated/spoofed.

EDIT: I am not sure what OP means with this so I am not sure if what I said is relevant.


RE: Issues Downloading a File From Webhost - RoSESP - Apr 26, 2018

I purchased a webhost and fixed this issue, thank you!