Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

(BASIC OPENVPN GUI)HSSXPT VPN_TUT_VB2008 express edition

soulviviv

Proficient
Advanced Member
Messages
288
Reaction score
5
Points
63
Heto na po yung sourcecode ng hss and expat gui ko..hehehe..para to sa mga nagabang noon..sana makatulong sa inyo kahit paano...​

pagpasensyahan nyo na ang thread ko..medyo nangangapa pa ako dito..hehehe​

Ok..simulan na natin..​
:yipee::yipee:



REQUIREMENTS
1.vb.net 2008 express edition
2.openvpn files...
3.common sense..
4.mahabang pasensya..hehe...baka kasi di nyo maintindihan yung gawa ko..
5.gamot sa sakit ng ulo..:rofl::rofl::rofl:

NOTE: Newbie lang po ako sa vb.net..at halos lahat ng nakasulat dito ay galing din sa ibang thread dito sa SYMBIANIZE..

Ok..simulan na natin.....

STEP1:open your vb2008xpressedition, then create a new project at iselect ung WINDOWS FORM APPLICATION TEMPLATE..
attachment.php



Step2:icopy ung mga files ng openvpn sa debug folder ng project nyo..

note:yung openvpn files na lang po ng hss ni sir duf ang gamitin nyo
attachment.php



Step3:kunin nyo ung mga controls sa toolbox katulad ng nasa SS..nakasulat na dyan ang mga control at kung anong name ang ilalagay nyo....

attachment.php



step4:
eto ung para sa mga server ng hss at expat.....edit nyo lang ung item properties ng combobox..
.

attachment.php


NOTE:
dapat yung textbox nyo ay multiline...edit nyo lang yun sa properties..

dalawa lang ang nilagay kong config..isa para kay hss at isa para sa server 1 ni expat

lagyan nyo lang ng ng "log-append log.txt" ung mga config

dapat ang name ng mga config ay ganito;
for hss= hServer1.ovpn...to...hServer10.ovpn
for xpt= xServer1.ovpn...to...xServer10.ovpn

haaaayyy..ang hirap pala gumawa ng tutorial...etong code na nga lang...hehehhe:lol:


Code:
Public Class HSSXPT_205
#Region " ClientAreaMove Handling "
    Const WM_NCHITTEST As Integer = &H84
    Const HTCLIENT As Integer = &H1
    Const HTCAPTION As Integer = &H2
    Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
        Select Case m.Msg
            Case WM_NCHITTEST
                MyBase.WndProc(m)
                If m.Result = HTCLIENT Then m.Result = HTCAPTION
                'If m.Result.ToInt32 = HTCLIENT Then m.Result = IntPtr.op_Explicit(HTCAPTION) 'Try this in VS.NET 2002/2003 if the latter line of code doesn't do it... thx to Suhas for the tip.
            Case Else
                'Make sure you pass unhandled messages back to the default message handler.
                MyBase.WndProc(m)
        End Select            '==================================='
    End Sub                   [COLOR="Red"]'#ETO ung CODE para madrag ung  borderless form #[/COLOR]
#End Region
    Dim vpn As String
    Dim server_hss As String
    Dim server_xpt As String
   [COLOR="red"] '===========code for connect button'===================================[/COLOR]
    Private Sub konekbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles konekbtn.Click
        If Combo_server.Text = "" Or vpn = "" Then
            textlog.Text = "Please Check your Selected VPN and Server!" & vbCrLf & vbCrLf & "--soulviviv--"
        ElseIf vpn = "HSS" Then
            Shell("cmd /c del log.txt", AppWinStyle.Hide)
            Shell("cmd /c ping google.com -t", AppWinStyle.Hide)
            Shell("cmd ipconfig/flushdns ipconfig/registerdns", AppWinStyle.Hide)
            Shell(Application.StartupPath & "\openvpn.exe " & server_hss, AppWinStyle.Hide)
            konekbtn.Enabled = False
            dkonekbtn.Enabled = True
            logtimer.Enabled = True
            status_lbl.Text = "Connecting..."
            finger_lbl.Text = "Fingering"
            finger_lbl.ForeColor = Color.Lime
            close.Enabled = False
        ElseIf vpn = "XPT" Then
            Shell("cmd /c del log.txt", AppWinStyle.Hide)
            Shell("cmd /c ping google.com -t", AppWinStyle.Hide)
            Shell("cmd ipconfig/flushdns ipconfig/registerdns", AppWinStyle.Hide)
            Shell(Application.StartupPath & "\openvpn.exe " & server_xpt, AppWinStyle.Hide)
            konekbtn.Enabled = False
            dkonekbtn.Enabled = True
            logtimer.Enabled = True
            status_lbl.Text = "Connecting..."
            finger_lbl.Text = "Fingering"
            finger_lbl.ForeColor = Color.Lime
            close.Enabled = False
        End If
    End Sub
   [COLOR="red"] '=======Disconnect button========'[/COLOR]
    Private Sub dkonekbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dkonekbtn.Click
        Dim g As String
        g = "taskkill /f /im openvpn.exe"
        Shell("cmd /c" & g, vbHide)
        g = "taskkill /f /im ping.exe"
        Shell("cmd /c" & g, vbHide)
        close.Enabled = True
        konekbtn.Enabled = True
        dkonekbtn.Enabled = False
        FileClose(1)
        status_lbl.Text = "Disconnected"
        status_lbl.ForeColor = Color.Red
        textlog.Text = ""
        finger_lbl.Text = "STOP"
        finger_lbl.ForeColor = Color.Red
        logtimer.Enabled = False

    End Sub
   [COLOR="red"] '===Radio Button ng HSS=====[/COLOR]
    Private Sub rad_hss_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rad_hss.CheckedChanged
        If rad_hss.Checked = True Then
            rad_xpt.Checked = False
            vpn = "HSS"
        End If
    End Sub
   [COLOR="red"] '===radio button ng expat===[/COLOR]
    Private Sub rad_xpt_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rad_xpt.CheckedChanged
        If rad_xpt.Checked = True Then
            rad_hss.Checked = False
            vpn = "XPT"
        End If
    End Sub
   [COLOR="red"] '=====code para sa combo box ng mga server===='[/COLOR]
    Private Sub Combo_server_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Combo_server.SelectedIndexChanged
        If Combo_server.Text = "Server 1" Then
            server_hss = "hServer1.ovpn"
            server_xpt = "xServer1.ovpn"
        ElseIf Combo_server.Text = "Server 2" Then
            server_hss = "hServer2.ovpn"
            server_xpt = "xServer2.ovpn"
        ElseIf Combo_server.Text = "Server 3" Then
            server_hss = "hServer3.ovpn"
            server_xpt = "xServer3.ovpn"
        ElseIf Combo_server.Text = "Server 4" Then
            server_hss = "hServer4.ovpn"
            server_xpt = "xServer4.ovpn"
        ElseIf Combo_server.Text = "Server 5" Then
            server_hss = "hServer5.ovpn"
            server_xpt = "xServer5.ovpn"
        ElseIf Combo_server.Text = "Server 6" Then
            server_hss = "hServer6.ovpn"
            server_xpt = "xServer6.ovpn"
        ElseIf Combo_server.Text = "Server 7" Then
            server_hss = "hServer7.ovpn"
            server_xpt = "xServer7.ovpn"
        ElseIf Combo_server.Text = "Server 8" Then
            server_hss = "hServer8.ovpn"
            server_xpt = "xServer8.ovpn"
        ElseIf Combo_server.Text = "Server 9" Then
            server_hss = "hServer9.ovpn"
            server_xpt = "xServer9.ovpn"
        ElseIf Combo_server.Text = "Server 10" Then
            server_hss = "hServer10.ovpn"
            server_xpt = "xServer10.ovpn"
        End If
    End Sub

   [COLOR="red"] '====code for our timer "logtimer"======'[/COLOR]
    Private Sub logtimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles logtimer.Tick
        Dim textline(100000) As String
        Dim log_ctr As Integer
        Dim last_log As Integer
        textlog.Text = ""
        FileOpen(1, Application.StartupPath & "\log.txt", OpenMode.Input, , OpenShare.LockRead)
        Do Until EOF(1)
            textline(log_ctr) = LineInput(1)
            log_ctr = log_ctr + 1
            If last_log <> log_ctr Then
                For n = last_log To log_ctr - 1
                    If InStrRev(textline(n), "OpenVPN") > 0 Then
                        textlog.SelectedText = textlog.SelectedText & "Connecting to Network......." & vbCrLf
                    ElseIf InStrRev(textline(n), "this configuration to call") > 0 Then
                        textlog.SelectedText = textlog.SelectedText & "Bypassing Globobo Firewall......" & vbCrLf & "Accessing Server....please wait" & vbCrLf
                    ElseIf InStrRev(textline(n), "Peer Connection Initiated with 0.0.0.0:0") > 0 Then
                        textlog.SelectedText = textlog.SelectedText & "Hacking Globobo Server...." & vbCrLf
                    ElseIf InStrRev(textline(n), "TAP-WIN32 device") > 0 Then
                        textlog.SelectedText = textlog.SelectedText & "Executing Trojan to Server...." & vbCrLf
                    ElseIf InStrRev(textline(n), "NETSH: C:\WINDOWS\system32\netsh.exe interface ip set address {") > 0 Then
                        textlog.SelectedText = textlog.SelectedText & "Warning!! You Have been detected!!" & vbCrLf & "Deleting the content of your Drive C:..." & vbCrLf
                    ElseIf InStrRev(textline(n), "Successful ARP Flush on interface") > 0 Then
                        textlog.SelectedText = textlog.SelectedText & "Please wait........" & vbCrLf
                    ElseIf InStrRev(textline(n), "Initialization Sequence Completed") > 0 Then
                        textlog.SelectedText = "Just Kidding :p hehe" & vbCrLf & "Initialization Sequence Completed" & vbCrLf
                        status_lbl.Text = "Connected"
                        close.Enabled = True
                        status_lbl.ForeColor = Color.Lime
                        textlog.SelectedText = textlog.SelectedText & "Your Connected, Enjoy Your Browsing" & vbCrLf & "--Soulviviv--"
                    ElseIf InStrRev(textline(n), "Inactivity timeout (--ping-restart), restarting") > 0 Then
                        close.Enabled = True
                        Dim g As String
                        g = "taskkill /f /im openvpn.exe"
                        Shell("cmd /c" & g, vbHide)
                        g = "taskkill /f /im ping.exe"
                        Shell("cmd /c" & g, vbHide)
                        konekbtn.Enabled = True
                        dkonekbtn.Enabled = False
                        status_lbl.Text = "Disconnected"
                        textlog.Text = "======Inactivity timeout======" & vbNewLine & "Unable to connect..." & vbCrLf & "Please Try to connect again" & vbCrLf & vbCrLf & "=======soul654======"
                        finger_lbl.Text = "STOP"
                        finger_lbl.ForeColor = Color.Red
                        logtimer.Enabled = False
                    ElseIf InStrRev(textline(n), "Exiting") > 0 Then
                        close.Enabled = True
                        Dim g As String
                        g = "taskkill /f /im openvpn.exe"
                        Shell("cmd /c" & g, vbHide)
                        g = "taskkill /f /im ping.exe"
                        Shell("cmd /c" & g, vbHide)
                        konekbtn.Enabled = True
                        dkonekbtn.Enabled = False
                        status_lbl.Text = "Disconnected"
                        textlog.Text = "Unable to connect..." & vbCrLf & "Please Try to connect again" & vbCrLf & vbCrLf & "======KuyaBunso205======"
                        finger_lbl.Text = "STOP"
                        finger_lbl.ForeColor = Color.Red
                        logtimer.Enabled = False

                    End If
                Next
                last_log = log_ctr
            End If
        Loop
        FileClose(1)
    End Sub
   [COLOR="red"] '====code for our close button====[/COLOR]
    Private Sub close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles close.Click
        Dim g As String
        g = "taskkill /f /im openvpn.exe"
        Shell("cmd /c" & g, vbHide)
        g = "taskkill /f /im ping.exe"
        Shell("cmd /c" & g, vbHide)
        FileClose(1)
        logtimer.Enabled = False
        End
    End Sub
   [COLOR="red"] '====code for our minimize button====
    '====pasensya na kung walng minimize to systray=====[/COLOR]
    Private Sub minimized_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles minimized.Click
        Me.WindowState = FormWindowState.Minimized
    End Sub


haay..suko na ako...hehe...sana kahit paano nagets nyo ang ibig kong sabihin....hehe...sana nakatulong kahit paano sa inyo...at kung hindi naman eh...pakidelete na lang po nitong thread na ito...hehehehehe.

attachment.php




CREDITS:
sir duf
sir drwang
sir artangel..hehe sa kabilang forum ata to eh..pero parang nakita ko rin to dito..
tsaka dun sa may ari nung mga TUT din na katulad neto...


pasensya na kung sobrang gulo neto...ayusin ko nalang pag may time na ulit...hehehe...



oh ayan..marami na sigurong makakagawa ng GUI ng vpn..hehehe..sana nga..

Eto po ang link ng vb.net 2008
http://msdn.microsoft.com/en-us/express/future/bb421473

AT para naman sa mga tinatamad talaga at hindi masundan ang nasa taas...pag di nyo pa nagawa to...aywan ko na..hahaha.MARAMI PA PONG BUG TOkaya pagpasensyahan nyo na....:rofl::rofl::lol:
http://www.symbianize.com/attachment.php?attachmentid=444001&stc=1&d=1322810644

and for the finished product..

try nyo po..hehe
([email protected])eto po ym ko..:):lol::lol:

Try nyo din po itong mga thread na to...
[Simple]Tut how to make VPN GUI [VB 6 + OPENVPN Commands___by
kaz050457] ]

Step By Step Tut how to make VPN GUI [VB 6 + OPENVPN Commands] by shadow046
:)
===============================================​
FINISHED GUI:​


Salamat sayo TS.
maganda itong share mo since di ko na kailangan i-install pa ng OpenVPN TAP adapter na di naman ginagamit sa HSS

Running on Windows 7 Aero
win7default.png


Running on Windows 7 Classic
win7classic.png


Konti lang binago, rename lang ng mga text at konting linis ng code.


my finish product:yipee::yipee:
credit kay ts

sana meron mag share ng bandwidth graph:pray::pray:

attachment.php




attachment.php
 

Attachments

  • step1.png
    step1.png
    72.9 KB · Views: 4,748
  • step2.jpg
    step2.jpg
    176.8 KB · Views: 4,795
  • combolist.jpg
    combolist.jpg
    65.1 KB · Views: 4,693
  • files.jpg
    files.jpg
    68.8 KB · Views: 4,882
  • formborberstyle.jpg
    formborberstyle.jpg
    68.5 KB · Views: 37
  • vbgui2.jpg
    vbgui2.jpg
    31.9 KB · Views: 33
  • Neoshooter 1.png
    Neoshooter 1.png
    427.2 KB · Views: 4,803
  • HSSXPT_205.zip
    3.6 MB · Views: 5,829
  • hssxpt205_FINISHED PROJECT.zip
    1.5 MB · Views: 4,580
Last edited:
Re: (BASIC GUI)HSSXPT VPN_TUT_VB2008 express edition

try ko toh mamaya salamat sa share tol :thanks:
 
Tulog muna ako..hehe...gudmorning...pagpasensyahan nyo na tong thread ko..sana di masyadong sumakit ulo nyo..:clap:

haha...tulog tulog din naman kayo sirduf..hahaha...:excited:
Moderator note:
Use edit button upang mag-dagdag ng iba pang bagay sa iyong previous reply nang maiwasan ang flooding.
 
Last edited by a moderator:
Re: (BASIC GUI)HSSXPT VPN_TUT_VB2008 express edition

hanggaling mo naman sa VB.... thanks TS.... i'm gonna try it.... :)
 
Re: (BASIC GUI)HSSXPT VPN_TUT_VB2008 express edition

good morning, ganda nito ma try nga nito. hehe thanks! :)
 
Re: (BASIC GUI)HSSXPT VPN_TUT_VB2008 express edition

nice TS i've been waiting for this tut :thanks:
 
Re: (BASIC GUI)HSSXPT VPN_TUT_VB2008 express edition

ts penge nga po link ng vb2008 hehe
 
Re: (BASIC GUI)HSSXPT VPN_TUT_VB2008 express edition

ma try nga ..hehehe..thanks r2 ts
 
Re: (BASIC GUI)HSSXPT VPN_TUT_VB2008 express edition

pa bookmark ts..
 
Re: (BASIC GUI)HSSXPT VPN_TUT_VB2008 express edition

pede po makahingi ng like po ng vb2008edition thanks po
 
Last edited:
Re: (BASIC GUI)HSSXPT VPN_TUT_VB2008 express edition

pasubok ako nito ts :D
 
Re: (BASIC GUI)HSSXPT VPN_TUT_VB2008 express edition

:thanks: ts!
ang sipag :)
 
Re: (BASIC GUI)HSSXPT VPN_TUT_VB2008 express edition

try ko din to! thanks po dito...
 
Re: (BASIC GUI)HSSXPT VPN_TUT_VB2008 express edition

bukmark muna ts
 
Re: (BASIC GUI)HSSXPT VPN_TUT_VB2008 express edition

video tutorial poh ts jeje para masundan ng newbie din kagaya ko jeje
 
Re: (BASIC GUI)HSSXPT VPN_TUT_VB2008 express edition

thanks d2, ma-try ko mamaya sa bahay....:dance::dance:
 
Back
Top Bottom