Showing posts with label Downloads. Show all posts
Showing posts with label Downloads. Show all posts

Registry Tweaker : Easily Enable/Disable Task Manager, Registry editor and Command Prompt in Windows XP/7/8

 

About :

Registry Tweaker is a small GUI tool written in C++, which helps you to quickly and easily Enable/Disable Task Manager, Registry editor(regedit.exe) and Commad prompt by a single click. It is fully portable and works on all versions of windows from windows XP to windows 8 [32bit/64bit both].

Download it from here :   

How To Use :

@. Run Registry Tweaker with admin privilege. In windows XP just double click on it, and in windows vista, 7, 8 right click on program then click on Run as Administrator.


note : In windows vista/7/8 program does not work without admin privilege, either it will show an error message.

@. At startup it will automatically display the status of utilities Enabled or Disabled.


@. Now to Enable or Disable any utility you just need to check the checkbox at front of that utility and then just click on Enable or Disable button.


How To Use Video :

I hope you like this tool, and thanks for visiting us.!!

Read more »

Compress Folders via Command line using VBscript



Hi guys, Here is a small VBscript for compress or Zip/Unzip folders via command line in windows.

Code :

1:  ' Script name : zuip.vbs  
2: 
3:  ' A simple vbscript for zipping a folder or unzip a Zip File.  
4:  '  
5:  ' By : http://www.Sec-Articles.blogspot.com   03/2015  
6:  '  
7:  ' credits : peter mortensen for zipping function.(http://www.superuser.com/users/517/peter-mortensen)  
8:  '  
9:  ' Usage :-  
10: '  
11: ' For Zipping  : cscript zuip.vbs C [path_to_folder] [path_to_zip_file]  
12: '  
13: ' For Unzipping : cscript zuip.vbs E [path_to_Zip_Archive] [path_to _Extract]  
14: '  
15:    
16:  Option Explicit  
17:    
18:  Dim ObjArgs  
19:  Set ObjArgs = Wscript.Arguments  
20:    
21:  IF (ObjArgs.Count <> 3) Then  
22:          Wscript.echo "??.. Something Error in Arguments..!!"  
23:          Wscript.echo "Options : "  
24:          Wscript.echo "For Zipping -"  
25:          Wscript.echo "cscript zuip.vbs C [path_to_folder] [path_to_zip_file] "  
26:          Wscript.echo "For Unzipping -"  
27:          Wscript.echo "cscript zuip.vbs E [path_to_Zip_Archive] [path_to _Extract]"  
28:          Wscript.quit  
29:  End IF  
30:    
31:  Select Case ObjArgs(0)  
32:      Case "C"  
33:          Zipper ObjArgs(1), ObjArgs(2)  
34:      Case "c"  
35:          Zipper ObjArgs(1), ObjArgs(2)  
36:      Case "E"  
37:          Unzipper ObjArgs(1), ObjArgs(2)  
38:      Case "e"  
39:          Unzipper ObjArgs(1), ObjArgs(2)  
40:      Case Else  
41:          Wscript.echo "No Match Found..!!!"  
42:          Wscript.echo "Options : "  
43:          Wscript.echo "For Zipping -"  
44:          Wscript.echo "cscript zuip.vbs C [path_to_folder] [path_to_zip_file] "  
45:          Wscript.echo "For Unzipping -"  
46:          Wscript.echo "cscript zuip.vbs E [path_to_Zip_Archive] [path_to _Extract]"  
47:  End Select  
48:    
49:    
50:  '  
51:  ' Zipping Function  
52:  '  
53:  Function Zipper(SrcF, DestF)  
54:    
55:      Dim fsys  
56:      set fsys = Wscript.CreateObject("Scripting.FileSystemObject")  
57:        
58:      IF Not (fsys.FolderExists(SrcF)) then  
59:          Wscript.echo " Source Folder Could not found..!! Please Check the path Again."  
60:          Exit Function  
61:      End IF   
62:        
63:      IF (fsys.FileExists(DestF)) then  
64:          Wscript.echo " Zip file Already Exists..!! Deleting it..?"  
65:          fsys.DeleteFile DestF  
66:          Wscript.echo " Zip file Deleted SuccessFully."  
67:      End IF   
68:    
69:      ' create an empty zip file  
70:      CreateObject("Scripting.FileSystemObject").CreateTextFile(DestF, True).Write "PK" & chr(5) & chr(6) & String(18, 0)  
71:        
72:      dim objshell, src, des  
73:        
74:      Set objshell = CreateObject("Shell.Application")  
75:      Set src = objshell.NameSpace(SrcF)  
76:      Set des = objshell.NameSpace(DestF)  
77:        
78:      des.CopyHere(src.Items)  
79:        
80:      Do Until des.Items.Count = src.Items.Count  
81:          Wscript.Sleep(200)  
82:      Loop  
83:    
84:      Wscript.echo "SuccessFully Zipped...!!!"      
85:            
86:      Set fsys = Nothing  
87:      Set objshell = Nothing  
88:      Set src = Nothing  
89:      Set des = Nothing  
90:    
91:  End Function   
92:    
93:    
94:  '  
95:  ' Unzipping Function   
96:  '  
97:  Function Unzipper(zipF, extrF)  
98:    
99:      Dim fsys  
100:      set fsys = Wscript.CreateObject("Scripting.FileSystemObject")  
101:        
102:      IF Not (fsys.FileExists(zipF)) Then  
103:          Wscript.echo "Could not Found Zip Archive..!! please Check the Path Again."  
104:          Exit Function  
105:      End IF  
106:        
107:      IF Not (fsys.FolderExists(extrF)) Then  
108:          Wscript.echo "Could not Found Folder To Extract..!! Creating Folder..."  
109:          fsys.CreateFolder(extrF)  
110:          Wscript.echo "Folder Created SuccessFully."  
111:      End IF  
112:        
113:      Dim objshell, zip, extr  
114:        
115:      Set objshell = CreateObject("Shell.Application")  
116:      Set zip = objshell.NameSpace(zipF)  
117:      Set extr = objshell.NameSpace(extrF)  
118:        
119:      extr.CopyHere(zip.Items)  
120:        
121:      Do Until extr.Items.Count = zip.Items.Count  
122:          Wscript.Sleep(200)  
123:      Loop  
124:        
125:      Wscript.echo "SuccessFully Extracted.!!"  
126:        
127:      Set fsys = Nothing  
128:      Set objshell = Nothing  
129:      Set zip = Nothing  
130:      Set extr = Nothing  
131:        
132:  End Function  

Download it From here :

How To Use :


For Compress a Folder

 Syntax  : cscript zuip.vbs C [path_to_folder] [path_to_zip_file]  
 Example : cscript zuip.vbs C "C:\Users\Ajay\desktop\test" "C:\Users\Ajay\desktop\test.zip"  

and for extracting files from a Zip archive

 Syntax  :  cscript zuip.vbs E [path_to_Zip_Archive] [path_to _Extract]  
 Example :  cscript zuip.vbs E "C:\Users\Ajay\desktop\test.zip" "C:\Users\Ajay\desktop\test"  

How To Use Video :




Ok..!! Thats all for this.
I hope you like this.
& Thanks for visiting.


Read more »

How to Install & Run Turbo C++ in Windows 7/8 (32/64 bit) with Full-Screen



Turbo C++ is a16 bit MS-DOS based application which works perfectly on windows xp and older versions, but newer version of windows Operating Systems does not totally support 16 bit applications. The 32 bit version of windows 7/8 only runs Turbo C++ IDE and when you try to compile your code then it fails, because it could not support 16 bit compiler and 64 bit OS only support 32 bit and 64 bit applications. So in order to run Turbo C++ in windows 7/8 we use an application DosBox, which basically emulates a 16bit MS-DOS like Operating System environment. I have created a single installer which automatically installs DosBox, Turbo C++ and configure it. Here is download Links :

32bit version   download link
64bit version   download link

How To Install Video



Or if you want to install and configure it yourself then here is the method :
First of all download TurboC++ and DosBox setup from here :

TurboC++    Click here to download
DosBox        Click here to download

Create a folder in C drive to store all 16 bit applications. in my case i create a folder named "16bit".
Extract TurboC++ files on recently created folder, after that install & run DosBox then type following commands on it.

mount C C:\16bit\


above command will mount the folder "16bit" as C drive for emulated DOS-OS

C:


this command will change drive into C.

cd tc\bin


this command will change directory and locate tc.exe file

tc.exe


now this command launches TurboC++. For full-screen just press ALT + ENTER

Now you need to Re-map two keys F9 and Left Control, because if you press both keys to compile and run your code then DosBox will be closed down. So to Re-map keys start DosBox and press Left-Control + F1, then select F9 button by clicking on it and then click on 'del' button.


Then repeat same process for Left-Control button.


Now again click F9 button, then click 'add' button, after that press F9 button on your keyboard, this will assign new event for F9 button.


Again repeat same process for Left-Control button.


then click on save button and exit.


the above processes will re-map both keys.

You can also automate the mounting process by editing DosBox configuration file. To do this just go-to start menu and type "DosBox Options" in Search Box.


Now click on "DOSBox 0.74 Options", this will open up DosBox configuration file, after that scroll down bottom of file and add these code :

mount C C:\16bit\
C:
cd tc\bin
tc.exe


note : adjust your file path for tc directory in first command, in my case it is "C:\16bit\", then save it. Now when you run DosBox then TurboC++ will automatically start. that is the manual process. If you have faced any problem of those instructions then just download and install the above given automated installers.

Thanks for reading this Post.
& if you like it, then please comment and share it. Thank you ...!!
Read more »

A simple Zip Password Cracker Shell script for Linux Systems

Hello Guys, in this post we look at a simple Zip Password cracker shell script which Brute-Force a password protected zip file in order to get the password.



Code

Simple Zip Password Cracker

 #!/usr/bin/bash env
 #  
 # +=======================================================+  
 # || A Simple ZIP Password Cracker                       ||  
 # || Developed By : http:\\www.sec-articles.blogspot.com ||  
 # +=======================================================+  
 #  
 declare -r TRUE=0  
 declare -r FALSE=1  
 flag=$FALSE  
 counter=0  
 # Declaring char_sets  
 chars_1=`echo {a..z}`  
 chars_2=`echo {A..Z}`  
 chars_3=`echo {0..9}`  
 chars_4="~ ! @ \$ % ^ - _ = + { } [ ] : , . / ?"  
 # cracking function  
 function cracker()   
 {  
     pass=$1  
     echo "trying Password $pass"  
     counter=$(($counter + 1))  
     unzip -P $pass -o $file_name  
     [ $? -eq 0 ] && clear && Banner && echo "Password Found : $pass" && echo "Password tried : $counter"&& return $TRUE || return $FALSE   
 }  
 # word_List generator  
 function word_gen()   
 {  
     args=$1  
     [ ${#args} -ge $length ] && cracker $1 && echo "Password Cracked" && flag=$TRUE && exit   
     if [ ${#args} -lt $length ]; then  
         for c in $chars; do  
             word_gen $1$c  
         done  
     fi  
 }  
 function is_num()  
 {  
     [ "$1" -eq "$1" ] > /dev/null 2>&1  
     return $?  
 }  
 function Show_message()   
 {  
     echo "+===============================================+"  
     echo "| A Simple ZIP Password Cracker        |"  
     echo "| Developed By : http:\\\\www.sec-articles.net  |"  
     echo "+===============================================+"  
     echo " ./s_zipcrack [Mode b/d] {[Lenght_of_Passowrd] [Type_Password] [location]} {[location]}"  
     echo""  
     echo " For brute_force Mode :- "  
     echo " ./s_zipcrack -b [Lenght_of_Passowrd] [Type_Password] [zip_file_location]"      
     echo " Length_of_Password - integer value"  
     echo " Type_of_Password  - \"A\" Upper_case   A-Z"  
     echo "          - \"a\" Lower_case   a-z"  
     echo "          - \"n\" numeric    0-9"  
     echo "          - \"c\" Special_chars !.?"  
     echo " zip_file_Location - Full Path of Zip File"      
     echo " Example : ./s_zipcrack -b 4 n /home/user/Desktop/secure.zip"  
     echo ""  
     echo " For Dictonary Mode : - "  
     echo " ./s_zipcrack -d [Password_dictonary_file] [zip_file_Location]"  
     echo " Password_dictonary_file - Full Path of Password dictonary file "  
     echo " zip_file_Location    - Full Path of Zip file"  
 }  
 function Banner()  
 {  
     echo "+===============================================+"  
     echo "| A Simple ZIP Password Cracker        |"  
     echo "| Developed By : http:\\\\www.sec-articles.net  |"  
     echo "+===============================================+"  
     echo ""  
 }  
 function brute_force()  
 {  
     # Handling Arguments  
     if [ "$1" = "" ]   
     then  
         Show_message  
         exit  
     fi  
     if is_num $1  
     then  
         length=$1  
     else  
         length=2  
     fi  
     for args in "$@"; do  
         case $args in  
             a) chars="$chars $chars_1" ;;  
             A) chars="$chars $chars_2" ;;  
             n) chars="$chars $chars_3" ;;  
             c) chars="$chars $chars_4" ;;  
         esac;  
     done  
     if [ "$chars" = "" ]  
     then  
         chars="$chars_1"  
     fi  
     for arg in "$@"; do  
         if [ -a $arg ]  
         then  
             file_name=$arg  
             break  
         fi  
     done  
     if [ "$file_name" = "" ]  
     then  
         Banner  
         echo "Could not find \"$3\""  
         echo "please check the file location & try Again."  
         exit  
     fi  
     #calling word_gen function   
     for w in $chars; do  
         word_gen $w  
     done  
 }  
 function dictonary()  
 {  
     if [ "$1" = "" ]  
     then  
         Banner  
         echo "please give the password_list."  
         exit 1  
     elif [ "$2" = "" ]  
     then   
         Banner  
         echo "please give the zip file location."  
         exit 1  
     fi  
     if [ -a $1 ]  
     then  
         pass_list=$1  
     else  
         Banner  
         echo "could not find \"$1\""  
         echo "please check the file location & try Again."  
         exit 1  
     fi  
     if [ -a $2 ]  
     then  
         file_name=$2  
     else  
         Banner  
         echo "could not find \"$2\""  
         echo "please check the file location & try Again."  
         exit 1  
     fi  
     # reading passwords & calling to cracker function  
     length=`cat $pass_list | wc -l`  
     for ((i=0;i<=$length;i++))  
     do  
         passwd=`sed -n "$i"p $pass_list`  
         cracker $passwd && echo "Password Cracked" && flag=$TRUE && exit   
     done  
 }  
 # Main  
 if [ "$1" = "b" ]  
 then  
     brute_force $2 $3 $4  
 elif [ "$1" = "d" ]  
 then  
     dictonary $2 $3  
 elif [ "$1" = "" ]  
 then  
     Show_message  
     exit  
 else  
     Banner  
     echo "Error in Arguments..!?"  
     echo "please choose the correct mode. b/d [brute_force/dictonary_attack]"  
     exit  
 fi  
 if [ $flag -eq $FALSE ]  
 then  
     clear  
     Banner   
     echo "Could not Found Password ?? "  
     echo "Password tried : $counter"  
     echo "please Try Again with other Keywords."  
 fi  

Download Code from Here :

How To Use It 

First download the script from above given link then open a terminal and change its permission into executable, i run this script in Ubuntu.

        chmod +x zp_crack.sh

then run the script


The first argument is mode which decides BruteForce method & there is two modes

1. b  : 


BruteForce with any combination of characters for example aaaa, aaab, aaac..... zzzz, 1111, 1112, 1113, ...... 9999 etc. With this mode program will takes three additional arguments

Length of password : It specify the length of word & takes an integer value as input.

Type of password : It specify which type of character set you want to use for example use "a" for lowercase alphabet characters, "A" for uppercase alphabet characters, "n" for numeric characters, "s" for special characters.

Zip file location : Give the full path of zip file.

Now to test this program we need to create a password protected zip file. first create a text file 
type this command oin your terminal

        echo This is secret Document > secret.txt

Then zip it using zip utility

        zip -P abcd secure.zip secret.txt


above command will create a zip file "secure.zip" with password "abcd". Now the password abcd consists four lowercase characters, so now we try to crack this password with our tool
Syntax is :

        ./zp_crack.sh b 4 a /home/ajay/Desktop/secure.zip


then hit enter



Bingo!!... password cracked.

2. d : 

Bruteforce with a list of words and try every word in that list to crack password. Its also known as "Dictionary Attack", with this mode program takes two additional arguments 

Password Dictionary Files : give the full path of password list or dictionary file.

Zip File Location : give the full path of zip file.

To demonstrate this i use a small list of words 


now the syntax will be :

        ./zp_crack.sh d /home/ajay/Desktop/pass_list.txt /home/ajay/Desktop/secure.zip


Again password is cracked.


Remember this is very basic BruteForce tool and it may not work on complex and lengthy passwords.
So, that's it. thanks for reading this post & if you like it then please comment and share this post.

Now here is the Demonstration Video :



Thank_you..!!  <(*_*)>
Read more »

BATCH To EXE Converter Softwere written in VB.net with Source code

This little program will convert a Batch Script file into an Executable file.




This Program's features are :


  • File Binder 
  • Icon Changer 
  • CodeDom Compiler 
  • Run Script in Background 
  • Base64 Encoding

Download Bat2Exe Converter From here 

For Windows 7 [ Compiled with dotnetframework 2.0]
For Windows 8 [ Compiled with dotnetframework 4.0 ]

Project Files   :
This program does not work on windows xp

How To Use Video : 




Source Code are here :

Form Code



1:  '  Bat2exe converter   
2:  '
3:  '  http://sec-articles.blogspot.com  
4:  '  
5:  '  Credits : MrvbDude for file binder   
6:  '  
7:    
8:  Imports System  
9:  Imports System.Text  
10:  Imports System.IO  
11:  Imports System.Threading  
12:  Imports System.CodeDom.Compiler  
13:  Imports Microsoft.CSharp  
14:  Imports System.Collections.Generic  
15:    
16:  Public Class Form1  
17:      
18:    Dim batchpath As String = Nothing  
19:    Dim iconpath As String = Nothing  
20:    Dim bindfilepath As String = Nothing  
21:    Dim bindfilename As String = Nothing  
22:    Dim outputfile As String = Nothing  
23:    Dim src As String = My.Resources.stub  
24:    
25:    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load  
26:      TextBox2.Enabled = False  
27:      TextBox3.Enabled = False  
28:    
29:    End Sub  
30:      
31:        
32:    Private Sub Compile(ByVal Exename As String, ByVal SourceCode As String, ByVal Icon As String)  
33:      Dim compiler As CodeDomProvider = CodeDomProvider.CreateProvider("VisualBasic")  
34:      Dim param As New CompilerParameters  
35:      Dim results As CompilerResults = Nothing  
36:      param.GenerateExecutable = True  
37:      param.OutputAssembly = Exename  
38:      param.ReferencedAssemblies.Add("System.dll")  
39:      param.ReferencedAssemblies.Add("Microsoft.VisualBasic.dll")  
40:      param.CompilerOptions = " /target:winexe"  
41:      param.TreatWarningsAsErrors = False  
42:      If (Icon = Nothing) Then  
43:        'do nothing  
44:      Else  
45:        File.Copy(Icon, "icon.ico")  
46:        param.CompilerOptions += " /win32icon:" & "icon.ico"  
47:      End If  
48:    
49:      results = compiler.CompileAssemblyFromSource(param, SourceCode)  
50:    
51:      If (results.Errors.Count <> 0) Then  
52:        MsgBox("Some Error Occured During Code Compiletion, Try Again!!", MsgBoxStyle.Critical)  
53:        For Each E As CompilerError In results.Errors  
54:          MessageBox.Show(E.ErrorText)  
55:        Next  
56:      End If  
57:    
58:      If (Icon = Nothing) Then  
59:        'do nothing  
60:      Else  
61:        File.Delete("icon.ico")  
62:      End If  
63:    
64:    End Sub  
65:    
66:    Function secure(ByVal data As Byte()) As Byte()  
67:      Using SA As New System.Security.Cryptography.RijndaelManaged  
68:        SA.IV = New Byte() {1, 9, 2, 8, 3, 7, 4, 5, 6, 0, 1, 4, 3, 0, 0, 7}  
69:        SA.Key = New Byte() {7, 0, 0, 3, 4, 1, 0, 6, 5, 4, 7, 3, 8, 2, 9, 1}  
70:        Return SA.CreateEncryptor.TransformFinalBlock(data, 0, data.Length)  
71:      End Using  
72:    End Function  
73:    
74:    Sub Replace(ByRef main As String, ByVal old As String, ByVal [new] As String)  
75:      main = main.Replace(old, [new])  
76:    End Sub  
77:    
78:    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button4.Click  
79:      Dim src As String = Nothing  
80:      Dim Compressor As Boolean = False  
81:    
82:      ' Configuring iconpath for second use  
83:      If CheckBox1.Checked = False Then  
84:        iconpath = Nothing  
85:      End If  
86:    
87:      If TextBox1.Text = "Click Here to Browse the Batch File" Then  
88:        MsgBox("Select A Batch File First .!!", MsgBoxStyle.Critical, "Error ..!!")  
89:        Exit Sub  
90:      End If  
91:    
92:      If CheckBox1.Checked = True Then  
93:        If TextBox2.Text = "Click Here to Browse Icon" Then  
94:          MsgBox("Select An Icon File First .!!", MsgBoxStyle.Critical, "Error ..!!")  
95:          Exit Sub  
96:        Else  
97:          'do nothing  
98:        End If  
99:      End If  
100:    
101:      If CheckBox2.Checked = True Then  
102:        If TextBox3.Text = "Click Here to Browse File" Then  
103:          MsgBox("Please Select A File To Bind First .!!", MsgBoxStyle.Critical, "Error ..!!")  
104:          Exit Sub  
105:        Else  
106:          ' do nothing  
107:        End If  
108:      End If  
109:    
110:      Using s As New SaveFileDialog()  
111:        s.Title = "Save File ...!!"  
112:        s.Filter = "Executable |*.exe"  
113:        If (s.ShowDialog = Windows.Forms.DialogResult.OK) Then  
114:          outputfile = s.FileName  
115:    
116:          src = My.Resources.stub  
117:    
118:          If CheckBox3.Checked = True Then  
119:            Replace(src, "Dim hiddenmode As Boolean = False", "Dim hiddenmode As Boolean = True")  
120:          End If  
121:    
122:          If CheckBox2.Checked = True Then  
123:            Replace(src, "'[BDPROC]", Nothing)  
124:          End If  
125:    
126:    
127:          Label1.Text = "Creating Stub"  
128:            
129:          Try  
130:            ' !!!  Make call to compile stub File !!!  
131:            Label1.Text = "Compiling Stub"  
132:            Compile(outputfile, src, iconpath)  
133:    
134:            ' Writing Files into stub   
135:            Dim sp As String = "[SPLITTING_POINT]"  
136:            Dim batchf As Byte() = secure(My.Computer.FileSystem.ReadAllBytes(batchpath))  
137:            Label1.Text = "Reading Batch File"  
138:            If CheckBox2.Checked = True Then  
139:              Label1.Text = "Reading Binded File"  
140:              Dim bindf As Byte() = secure(My.Computer.FileSystem.ReadAllBytes(bindfilepath))  
141:              Label1.Text = "Writing Files To Stub"  
142:              System.IO.File.AppendAllText(outputfile, sp & Convert.ToBase64String(batchf) & sp & bindfilename & sp & Convert.ToBase64String(bindf))  
143:            Else  
144:              Label1.Text = "Writing File To Stub"  
145:              System.IO.File.AppendAllText(outputfile, sp & Convert.ToBase64String(batchf))  
146:            End If  
147:          Catch ex As Exception  
148:            Label1.Text = "Error !!"  
149:            MsgBox("Some !Error Occured During Compilation ...?", MsgBoxStyle.Critical, "Error..!!")  
150:            Exit Sub  
151:          End Try  
152:          Label1.Text = "[#] Done..!!"  
153:          MsgBox("SuccessFully Created", MsgBoxStyle.Information, "Success !")  
154:    
155:        End If  
156:      End Using  
157:    End Sub  
158:    
159:    Private Sub TextBox1_Click(sender As Object, e As EventArgs) Handles TextBox1.Click  
160:      Label1.Text = "Status ..."  
161:      Using O As New OpenFileDialog()  
162:        O.Title = "Select Batch File.."  
163:        O.Filter = "Batch File|*.bat"  
164:        If O.ShowDialog = Windows.Forms.DialogResult.OK Then  
165:          batchpath = O.FileName  
166:          TextBox1.Text = O.FileName  
167:        End If  
168:      End Using  
169:    End Sub  
170:    
171:    Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged  
172:      If CheckBox1.Checked = True Then  
173:        TextBox2.Enabled = True  
174:      Else  
175:        TextBox2.Enabled = False  
176:      End If  
177:    End Sub  
178:    
179:    Private Sub CheckBox2_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox2.CheckedChanged  
180:      If CheckBox2.Checked = True Then  
181:        TextBox3.Enabled = True  
182:      Else  
183:        TextBox3.Enabled = False  
184:      End If  
185:    End Sub  
186:    
187:    Private Function components() As Object  
188:      Throw New NotImplementedException  
189:    End Function  
190:      
191:    Private Sub TextBox2_Click(sender As Object, e As EventArgs) Handles TextBox2.Click  
192:      Using O As New OpenFileDialog()  
193:        O.Title = "Select Icon File.."  
194:        O.Filter = "Icon File|*.ico"  
195:        If O.ShowDialog = Windows.Forms.DialogResult.OK Then  
196:          iconpath = O.FileName  
197:          TextBox2.Text = O.SafeFileName  
198:        End If  
199:      End Using  
200:    End Sub  
201:    
202:    Private Sub TextBox3_Click(sender As Object, e As EventArgs) Handles TextBox3.Click  
203:      Using O As New OpenFileDialog()  
204:        O.Title = "Select File To Bind.."  
205:        O.Filter = "All Files|*.*"  
206:        If O.ShowDialog = Windows.Forms.DialogResult.OK Then  
207:          bindfilepath = O.FileName  
208:          bindfilename = O.SafeFileName  
209:          TextBox3.Text = O.SafeFileName  
210:        End If  
211:      End Using  
212:    End Sub  
213:    
214:  End Class  
215:    



Stub Code


1:  '  Bat2exe converter Stub Code  
2:  ' 
3:  '  http://sec-articles.blogspot.com  
4:    
5:  Imports System  
6:  Imports System.IO  
7:  Imports System.AppDomain  
8:  Imports System.Diagnostics  
9:  Imports Microsoft.VisualBasic  
10:    
11:  Module Module1  
12:    
13:    Private Declare Auto Function GetConsoleWindow Lib "kernel32.dll" () As IntPtr  
14:    Private Declare Auto Function ShowWindow Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal nCmdShow As Integer) As Boolean  
15:    
16:    Private Const SW_HIDE As Integer = 0  
17:    Private Const SW_SHOW As Integer = 5  
18:    
19:    Sub Main()  
20:      Dim hiddenmode As Boolean = False  
21:      Dim hWndConsole As Integer  
22:      hWndConsole = GetConsoleWindow()  
23:      ShowWindow(hWndConsole, SW_HIDE)  
24:        
25:      Try  
26:        Dim exepath As String = AppDomain.CurrentDomain.BaseDirectory + Process.GetCurrentProcess.ProcessName + ".exe"  
27:        Dim tempdir As String = My.Computer.FileSystem.SpecialDirectories.Temp  
28:        'For exe path  
29:        Dim SP() As String = Split(System.IO.File.ReadAllText(exepath), "[SPLITTING_POINT]")  
30:        Dim batchf As Byte() = unsecure(Convert.FromBase64String(SP(1)))  
31:        '[BDPROC]Dim bindedf As Byte() = unsecure(Convert.FromBase64String(SP(3)))  
32:        My.Computer.FileSystem.WriteAllBytes(tempdir & "\cmd.bat", batchf, False)  
33:        '[BDPROC]My.Computer.FileSystem.WriteAllBytes(tempdir & "\" & SP(2), bindedf, False)  
34:        If hiddenmode = True Then  
35:          Dim vbwriter As New IO.StreamWriter(tempdir + "\" + "start.vbs")  
36:          vbwriter.WriteLine("set objShell = CreateObject(""WScript.Shell"")")  
37:          vbwriter.WriteLine("objShell.Run """ + tempdir + "\cmd.bat"", vbHide, TRUE")  
38:          vbwriter.Close()  
39:    
40:          ' run program  
41:          Dim ps As ProcessStartInfo  
42:          Dim psname As String = (tempdir & "\" & "start.vbs")  
43:          ps = New ProcessStartInfo(psname)  
44:          Dim proc As New Process()  
45:          proc.StartInfo = ps  
46:          proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden  
47:          proc.Start()  
48:          proc.WaitForExit()  
49:          File.Delete(psname)  
50:          File.Delete(tempdir & "\" & "cmd.bat")  
51:        Else  
52:          Dim ps As ProcessStartInfo  
53:          Dim psname As String = (tempdir & "\" & "cmd.bat")  
54:          ps = New ProcessStartInfo(psname)  
55:          Dim proc As New Process()  
56:          proc.StartInfo = ps  
57:          proc.StartInfo.WindowStyle = ProcessWindowStyle.Normal  
58:          proc.Start()  
59:          proc.WaitForExit()  
60:          File.Delete(psname)  
61:        End If  
62:        '[BDPROC]Process.Start(tempdir & "\" & SP(2))  
63:      Catch ex As Exception  
64:        Process.GetCurrentProcess.Kill()  
65:      End Try  
66:      Process.GetCurrentProcess.Kill()  
67:    
68:    End Sub  
69:    
70:    Function unsecure(ByVal data As Byte()) As Byte()  
71:      Using SA As New System.Security.Cryptography.RijndaelManaged  
72:        SA.IV = New Byte() {1, 9, 2, 8, 3, 7, 4, 5, 6, 0, 1, 4, 3, 0, 0, 7}  
73:        SA.Key = New Byte() {7, 0, 0, 3, 4, 1, 0, 6, 5, 4, 7, 3, 8, 2, 9, 1}  
74:        Return SA.CreateDecryptor.TransformFinalBlock(data, 0, data.Length)  
75:      End Using  
76:    End Function  
77:    
78:  End Module  
79:    
80:    


Download Codes :

Bat2exe (Form Source Code) :

Bat2exe (Stub Source Code)  :

                                      
Read more »

Block Websites in Windows XP, 7, 8 with Batch Script

This is a simple Batch Script which blocks Websites URL By editing 'Hosts' file. It also consists some functionality like saw previous blocked URLs, restore original hosts file or create new one etc.



1:  :: Site Blocker Script  
2:
3:  :: http://sec-articles.blogspot.com  
4:  :Start  
5:  @echo off & setlocal ENABLEEXTENSIONS  
6:  title Site Blocker  
7:  color a  
8:  mode con cols=80 lines=25  
9:  echo.  
10:  echo ===============================================================================  
11:  echo                     # Site Blocker #  
12:  echo.  
13:  echo ===============================================================================  
14:  echo.  
15:  echo Options :  
16:  echo.  
17:  echo 1) Block A Site  
18:  echo 2) Unblock All Blocked Sites  
19:  echo 3) Show Previous Blocked Sites  
20:  echo 4) About  
21:  echo 5) Exit   
22:  echo.  
23:  set /p ch="Enter Your Choice : "  
24:  if %ch%==1 goto Block  
25:  if %ch%==2 goto Restore  
26:  if %ch%==3 goto Show  
27:  if %ch%==4 goto About  
28:  if %ch%==5 goto End  
29:  echo.   
30:  echo Please Enter Correct Choice   
31:  pause > nul  
32:  goto Start  
33:  :Block  
34:  echo.  
35:  set /p url="Enter The URL : "  
36:  if exist "%systemroot%" (   
37:  if not exist "%systemroot%\System32\drivers\etc\hosts.bak" ( copy "%systemroot%\System32\drivers\etc\hosts" "%systemroot%\System32\drivers\etc\hosts.bak" )  
38:  echo 127.0.0.1  %url% >> "%systemroot%\System32\drivers\etc\hosts"  
39:  echo.   
40:  echo Url Blocked SuccessFully.!!  
41:  pause > nul  
42:  goto Start   
43:  ) else (  
44:  echo.  
45:  echo.  
46:  echo Error ?? Does not found Windows Directory.!!   
47:  pause > nul  
48:  goto Start )  
49:  :show  
50:  echo.  
51:  if not exist "%systemroot%\System32\drivers\etc\hosts" (   
52:  echo Error ?? Does Not found the Host File !!   
53:  pause > nul  
54:  goto Start )   
55:  @echo off & setlocal ENABLEEXTENSIONS  
56:  for /f "tokens=2" %%a in ('findstr /B 127.0.0.1 %systemroot%\System32\drivers\etc\hosts') do ( echo %%a & set d=%%a)   
57:  if exist %d%==nul ( echo You have not blocked any site..!! )   
58:  pause > nul  
59:  goto Start   
60:  :Restore  
61:  if exist "%systemroot%\System32\drivers\etc\hosts.bak" (   
62:  del "%systemroot%\System32\drivers\etc\hosts"  
63:  copy "%systemroot%\System32\drivers\etc\hosts.bak" "%systemroot%\System32\drivers\etc\hosts"   
64:  echo.  
65:  echo hosts File is SuccessFully Restored.!!!  
66:  pause > nul  
67:  goto Start )  
68:  echo.  
69:  echo Original host backup File are not Found.!!  
70:  echo Press Any key to Create new host File ...  
71:  pause > nul  
72:  echo # Copyright (c) 1993-2009 Microsoft Corp. > "%systemroot%\System32\drivers\etc\hosts"  
73:  echo # >> "%systemroot%\System32\drivers\etc\hosts"  
74:  echo # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. >> "%systemroot%\System32\drivers\etc\hosts"  
75:  echo # >> "%systemroot%\System32\drivers\etc\hosts"  
76:  echo # This file contains the mappings of IP addresses to host names. Each >> "%systemroot%\System32\drivers\etc\hosts"  
77:  echo # entry should be kept on an individual line. The IP address should >> "%systemroot%\System32\drivers\etc\hosts"  
78:  echo # be placed in the first column followed by the corresponding host name. >> "%systemroot%\System32\drivers\etc\hosts"  
79:  echo # The IP address and the host name should be separated by at least one >> "%systemroot%\System32\drivers\etc\hosts"  
80:  echo # space. >> "%systemroot%\System32\drivers\etc\hosts"  
81:  echo # >> "%systemroot%\System32\drivers\etc\hosts"  
82:  echo # Additionally, comments (such as these) may be inserted on individual >> "%systemroot%\System32\drivers\etc\hosts"  
83:  echo # lines or following the machine name denoted by a '#' symbol. >> "%systemroot%\System32\drivers\etc\hosts"  
84:  echo # >> "%systemroot%\System32\drivers\etc\hosts"  
85:  echo # For example: >> "%systemroot%\System32\drivers\etc\hosts"  
86:  echo # >> "%systemroot%\System32\drivers\etc\hosts"  
87:  echo #   102.54.94.97   rhino.acme.com     # source server >> "%systemroot%\System32\drivers\etc\hosts"  
88:  echo #    38.25.63.10   x.acme.com       # x client host >> "%systemroot%\System32\drivers\etc\hosts"  
89:  echo #   >> "%systemroot%\System32\drivers\etc\hosts"  
90:  echo # localhost name resolution is handled within DNS itself. >> "%systemroot%\System32\drivers\etc\hosts"  
91:  echo #     127.0.0.1    localhost >> "%systemroot%\System32\drivers\etc\hosts"  
92:  echo.  
93:  echo hosts File is SuccessFully Created..!!  
94:  pause > nul  
95:  goto Start   
96:  :About  
97:  echo.  
98:  echo This is a Simple Batch Script which edit the host file   
99:  echo located in "C:\Windows\System32\drivers\etc" directory.  
100:  echo Use this Script at your own risk, i am not responsible for  
101:  echo any kind of damage on your system.  
102:  echo Tested on Win XP, 7, 8  
103:  echo in windows 7, 8 run it with Admin privilege  
104:  echo.  
105:  pause  
106:  goto Start  
107:  :End  
108:  exit /b  



Download script from here :

How  To Video Tutorial :

 



Read more »