Vbase server - server http + language script vbase

Description

Ce server permet de faire de votre pc un server ouéb , qui hébérge et donne des pages , avec une technologie utilisant Winsock 2 ( la dll ) , il redirige les requettes de connexions vers d'autres ports que le 80 , ce qui fait que le server est toujours en écoute , on pourrais donc le comparer à un server apache puisque la methode est la même .
Il est en version BETA , il fonctionne , cependant il ne prend pas en charge tout le protocole HTTP , et les methodes GET .
On peut lui mettre des scripts en VB , qui est en mélange entre le php et le visual basic , puisque certaines fonctions comme Echo ou GetVars ont été reproduites comme pour le php , cependant le script communique directement avec le server , et est un script EXE compilé .

Vous avez un exemple de script , car pour le moment je n'ai pas finit l'éditeur de script .

Vous verrez donc le code du exe décompilé , avec l'entourage et les fonctions echo ou getvars dans un autre module , cependant le script de base est dans la fonction On_Load , et c'est tout ce que vous aurez à modifier ...

Plus d'explication seront donées dans les prog lui-même et dans les sources .

Source / Exemple :


' Voilà un exemple de script VBASE , c'est le script permettant de naviguer sur les répétoires du server :

Dim IndexOf As String
Dim Path As String
Dim ExtType As String
Path = Server.GetVars("path")
IndexOf = Server.GetVars("IndexOf")
Echo "HTTP/1.0 300 Found" & vbCrLf
Echo "Server: VBASE server BETA/1.45.056" & vbCrLf
Echo "Content-type: application/octet-stream" & vbCrLf
Echo "MIME-Version: 1.0" & vbCrLf
Echo "Connection: Remote-Close" & vbCrLf
Echo vbCrLf
Echo "<html>" & vbCrLf
Echo "<head>" & vbCrLf
Echo "<title>" & IndexOf & "</title>" & vbCrLf
Echo "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>" & vbCrLf
Echo "</head>" & vbCrLf
Echo "" & vbCrLf
Echo "<body>" & vbCrLf
Echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>" & vbCrLf
Echo "<tr>" & vbCrLf
Echo "    <td><font size='5' face='Arial Black'><strong><img src='../img/opendir.gif'> Index of " & IndexOf & "</strong></font></td>" & vbCrLf
Echo "  </tr>" & vbCrLf
Echo "</table>" & vbCrLf
Echo "<hr width='100%'>" & vbCrLf
Echo "<table width='100%' border='0'>" & vbCrLf
Echo "  <tr>" & vbCrLf
Echo "    <td><img src='../img/dir.gif'></td>" & vbCrLf
Echo "    <td><a href='../'>- Parent -</a></td>" & vbCrLf
Echo "    <td></td>" & vbCrLf
Echo "    <td></td>" & vbCrLf
Echo "  </tr>" & vbCrLf

If Right(Path, 1) <> "\" Then _
Path = Path & "\"
MyName = Dir(Path, vbDirectory)
Do While MyName <> ""
    If MyName <> "." And MyName <> ".." Then
        If (GetAttr(Path & MyName) And vbDirectory) = vbDirectory Then
Echo "  <tr>" & vbCrLf
Echo "    <td><img src='../img/dir.gif'></td>" & vbCrLf
Echo "    <td><a href='" & IndexOf & MyName & "/'>" & MyName & "</a></td>" & vbCrLf
Echo "    <td></td>" & vbCrLf
Echo "    <td></td>" & vbCrLf
Echo " </tr>" & vbCrLf
        Else
ExtType = "    <td><img src='../img/unknown.gif'></td>" & vbCrLf
ext = Format(Right(MyName, 4), "<")
If ext = ".exe" Or ext = ".php" Or ext = ".bat" Then _
ExtType = "    <td><img src='../img/executable.gif'></td>" & vbCrLf
If ext = "html" Or ext = ".htm" Then _
ExtType = "    <td><img src='../img/htmldoc2.gif'></td>" & vbCrLf
If ext = ".bmp" Or ext = ".jpg" Or ext = ".gif" Or ext = ".ttf" Or ext = ".png" Or ext = ".wmf" Or ext = ".ico" Or ext = ".pcx" Then _
ExtType = "    <td><img src='../img/image.gif'></td>" & vbCrLf
If ext = ".dll" Or ext = ".drv" Or ext = ".sys" Or ext = ".ini" Or ext = ".dat" Then _
ExtType = "    <td><img src='../img/system.gif'></td>" & vbCrLf

Echo "  <tr>" & vbCrLf
Echo ExtType
Echo "    <td><a href='" & IndexOf & MyName & "'>" & MyName & "</a></td>" & vbCrLf
Echo "    <td>" & TailleFic(Path & MyName) & "</td>" & vbCrLf
Echo "    <td>" & FileDateTime(Path & MyName) & "</td>" & vbCrLf
Echo " </tr>" & vbCrLf
        End If
    End If
    MyName = Dir    ' Get next entry.
Loop
Echo "</table>" & vbCrLf
Echo "<hr>" & vbCrLf
Echo "<p><font size='1'>VBASE server vBETA - coded by aKhEnAtHoN - all rights reserved" & vbCrLf
Echo "  (c) </font></p>" & vbCrLf
Echo "</body>" & vbCrLf
Echo "</html>" & vbCrLf

Conclusion :


Pour le moment y'à pas trop de bugs , mais vous pouvvez toujour me prévenir de ce qui va pas .

Je cherche comme vous le verez dans le projet de l'aide , des mecs qui peuvent m'aider sur ce projet , donc si vous êtes partant contactez-moi .

Codes Sources

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.