All people know to access certain sites that have pornographic content, content, and any element of religious pornography is prohibited, as is fornication and can direct people to actions that are less commendable. Approach that only adultery is forbidden, let alone make adultery?.

"Do not approach adultery that adultery is an act of indecency and a bad way. (QS: Al-Isra: 32)"

Already there are so many products, laws and regulations that prohibit pornography. And now also the more complete with the Act - Act ITE (information and electronic transactions). To be able to protect our families from the impact of bad pornography sites, we can use the following:
  1. increase to the Lord godly
  2. content filtering use content filtering software

The first option is the main protection and the most perfect of other options. But as we can use the backup software and content filtering at the present time there are very many available software-software, ranging from free to paying that. But we can also create your own simple and even minimal facilities.I will share with you about the making of this application porn blocker. Although I still have to learn and continue learning.

We will make use visual basic 6 (VB6). Its function is still very minimal and uses the method sedrhana:
1. close all applications that have the title / title / caption in the list
2. use the hosts file, the mapping function for the web address. with the hosts file to do this, we can redirect requests to access a site to other sites. For example there is a request to www.playboy.com we akan mengarahkannya directly to www.rumahzakat.org (so that he do so and even think for charity).

You must do and provide:
  1. Faith and godly
  2. SPrepare mentally and your determination to reject pornography. Because if you still think you are to enjoy pornography akan hesitate to make this application.
  3. Bismillah. start of each work well with berdo'a.
  4. A computer with Windows OS (must be original, because if it does not not akan blessing)
  5. Visual Basic 6
  6. Music, if necessary
  7. Food and drink
  8. Do not have to smoke a cigarette and

Once everything is ready, please create a new project. : Then follow the steps below:
  1. Add a form, a timer and a ListBox
  2. Enter the following code in the form and understand procedures.

Dim i As Integer 'variabel i sebagai integer.
' variabel judul sebagai array dengan tipe string dan isinya ada enam (6)
Dim Judul(5) As String
Dim x As Long ' variabel x bertipe long integer

Private Sub Form_Load()
'panggil fungsi blacklist
'set interval timer 3 detik
Timer1.Interval = 3000
End Sub

Private Sub Timer1_Timer()
End Sub

Private Sub BlackList()
' mengisi daftar judul blacklist dengan array
' daftar kata-kata ini bisa anda tambah sesuai kebutuhan
Judul(0) = "sex"
Judul(1) = "porn"
Judul(2) = "ngentot"
Judul(3) = "bugil"
Judul(4) = "playboy.com"
Judul(5) = "telanjang"

'bersihkan Listbox1
'hitung dari 0 sampai 5
For i = 0 To 5
'listbox1 diisi dengan isi variabel judul
List1.AddItem Judul(i)
End Sub

Private Sub TutupIE()
'karena internet explorer tdk bisa di tutup dengan sendmessage
Dim c As String
'On Error Resume Next
'tutup internet explorer dengan cmd
Shell "cmd /c taskkill /f /im iexplore.exe ", vbHide
End Sub

Private Sub TutupJudul()
'hitung variabel i sebanyak nilai array
For i = 0 To 5
'cari aplikasi apapun yg punya caption/judul seseuai daftar blacklist
x = FindWindowWild("*" & Judul(i) & "*", False)
'tutup target
SendMessage x, WM_CLOSE, 0, 0
End Sub

Private Sub BuatFileHost()
On Error Resume Next
'buat file host, yang akan meredirect request akses ke suatu alamat
'menuju alamat yang lain sesuai keinginan kita
'akses ke playboy.com akan diarahkan ke localhost
Open "c:\windows\system32\drivers\etc\hosts" For Output As 1
Print #1, " playboy.com"
Print #1, " sex.com"
Print #1, " hentai.com"
Close #1
End Sub

3. Add a module to load functions of the other important.

Private Declare Function EnumWindows& Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long)
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function IsWindowVisible& Lib "user32" (ByVal hwnd As Long)
Private Declare Function GetParent& Lib "user32" (ByVal hwnd As Long)

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const WM_CLOSE = &H10

Dim sPattern As String, hFind As Long

Private Function EnumWinProc(ByVal hwnd As Long, ByVal lParam As Long) As Long
Dim k As Long, sName As String
If IsWindowVisible(hwnd) And GetParent(hwnd) = 0 Then
sName = Space$(128)
k = GetWindowText(hwnd, sName, 128)
If k > 0 Then
sName = Left$(sName, k)
If lParam = 0 Then sName = UCase(sName)
If sName Like sPattern Then
hFind = hwnd
EnumWinProc = 0
Exit Function
End If
End If
End If
EnumWinProc = 1
End Function

Public Function FindWindowWild(sWild As String, Optional bMatchCase As Boolean = True) As Long
sPattern = sWild
If Not bMatchCase Then sPattern = UCase(sPattern)
EnumWindows AddressOf EnumWinProc, bMatchCase
FindWindowWild = hFind
End Function

4. Check and understand the code you have input and make sure that no one is wrong. Then run it.

5. Please access the test with a porn site address or title phrase has a corresponding list in the blacklist.

6.Save your work

This project is very simple and you can develop according to needs. keyconcept in all the main program Internet Content Filtering database is on the list of words and addresses of the blacklist. Therefore the more vocabulary and the address of a site that is blocked on this application will make it better and more sensitive. Please develop more!


Post a Comment

Make a comments but don't spam