• Welcome to Valhalla Legends Archive.
 

BNFTP Application

Started by Barabajagal, August 27, 2007, 02:52 PM

Previous topic - Next topic

Barabajagal

Blake (HDX) gave me the great suggestion to make a program that allows for bnftp:// protocols on web browsers. So I made one yesterday.

http://realityripple.com/software/freeware/BNF/

Example links: http://realityripple.com/software/freeware/BNF/ex.php

It's rather simple...
bnftp://hostname.tld/file.ext?plat=IX86&prod=DRTL

Where
hostname.tld is the host to connect to
file.ext is the file to download
plat is an optional variable to describe the four character Platform ID (Default IX86)
prod is an optional variable to describe the four character Product ID (Default DRTL)

At this time, it has no error checking (malformed URIs will cause errors), and it only supports version 1 of the protocol.

Camel

#1
Doesn't appear to handle that %XX url encoding properly.

[Edit] make it a firefox plugin.

Barabajagal

#2
No, it doesn't handle spaces yet, version 0.0.2 will fix that. And making it a Firefox plug-in is pretty near impossible, since you have to register bnftp as a file type in Windows for it to be handled as a URL by any web browser. This way, it's universal.

Edit:
Here's the code that'll fix your %XX problems ;)
Private Sub EscapeURI(ByRef URI As String)
Dim I As Integer
    For I = 0 To 255
        If Len(Hex$(I)) = 1 Then
            URI = Replace$(URI, "%0" & Hex$(I), Chr$(I))
        Else
            URI = Replace$(URI, "%" & Hex$(I), Chr$(I))
        End If
    Next I
End Sub


Edit #2: 0.0.2 is up, now with full URI escaping support.

Camel

Don't forget that + should also be interpreted as a space. Or is that just for GET?

Hdx


Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

Barabajagal

As far as I know, only things like search engines and other things that use php "REQUEST" variables use + signs.