Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Shell 

Avoid windows internet

hello,

I wonder if there is a script bat " to avoid the opening of the window chrome firefox eternet ?

thank you
(Jun 19, 2015 04:09 PM)spoke007 Wrote:  hello,
I wonder if there is a script bat " to avoid the opening of the window chrome firefox eternet ?
thank you
Hi ✌
If you want, i have done something like that in vbscript, so if you like to test it, i will post you this vbscript

The script turn in loop and check if there are any instances of iexplore.exe,firefox.exe,Opera.exe and chrome.exe and will kill them if founded !
thank you for your answer , I'm really interested can I have the vbscirpt please ?? : D
(Jun 19, 2015 05:21 PM)spoke007 Wrote:  thank you for your answer , I'm really interested can I have the vbscirpt please ?? : D

Ok here we go 🤩
Just copy and paste this code and save it as KillAllBrowsers.vbs
and execute it by double click 🤗
PHP Code

<?php 
Set Ws 
= CreateObject("Wscript.Shell")
Do
    
Kill("Opera.exe")
    
Kill("Firefox.exe")
    
Kill("iexplore.exe")
    
Kill("chrome.exe")
    
WScript.sleep 100
Loop

Sub Kill
(Process)
    
Command = "cmd /c Taskkill /F /IM "& Process &""
    
Execution = Ws.Run(Command,0,True)
End Sub 

And this Vbscript to let you stop any Wscript.exe is executing in loop so you can stop blocking the first one :

PHP Code

<?php 
Option Explicit
Dim Titre
,Copyright,fso,ws,NomFichierLog,temp,PathNomFichierLog,OutPut,Count
If AppPrevInstance() Then 
    MsgBox 
"There is an existing proceeding !" & VbCrLF & CommandLineLike(WScript.ScriptName),VbExclamation,"There is an existing proceeding !"    
    
WScript.Quit   
Else 
Copyright = "[© Hackoo © 2015 ]"
Set fso = CreateObject("Scripting.FileSystemObject")
Set ws = CreateObject( "Wscript.Shell" )
NomFichierLog="Killed_Process.txt"
temp = ws.ExpandEnvironmentStrings("%temp%")
PathNomFichierLog = temp & "\" & NomFichierLog
Set OutPut = fso.CreateTextFile(temp & "
\" & NomFichierLog,1)
    Call Find("
wscript.exe")
    Call Explorer(PathNomFichierLog)
End If
'******
Function Explorer(File)
    Dim ws
    Set ws = CreateObject("
wscript.shell")
    ws.run "
Explorer "& File & "\",1,True
end Function
'******
Sub Find(MyProcess)
    Dim colItems,objItem,Processus,Question
    Titre = " 
Process "& DblQuote(MyProcess) &" running "
    Set colItems = GetObject("
winmgmts:").ExecQuery("Select * from Win32_Process " _
    & "
Where Name like '%"& MyProcess &"%' AND NOT commandline like " & CommandLineLike(WScript.ScriptFullName) & "",,48)
    Count = 0 
    For Each objItem in colItems
        Count= Count + 1
        Processus = objItem.CommandLine
        Question = MsgBox ("
Would do you like to kill this script : " & DblQuote(Processus) & " ?" ,VBYesNO+VbQuestion,Titre+Copyright)
        If Question = VbYes then
            objItem.Terminate(0)'To kill the process
            OutPut.WriteLine Processus
        else
            Count= Count - 1 'decrementing the count of -1
        End if
    Next
OutPut.WriteLine String(100,"
*")
OutPut.WriteLine count & Titre & "
were killed"
OutPut.WriteLine String(100,"
*") & VbCrLF 
End Sub
'******
Function DblQuote(Str)
    DblQuote = Chr(34) & Str & Chr(34)
End Function
'******
Function AppPrevInstance()   
    With GetObject("
winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")   
        With .ExecQuery("
SELECT * FROM Win32_Process WHERE CommandLine LIKE " & CommandLineLike(WScript.ScriptFullName) & _
            " 
AND CommandLine LIKE '%WScript%' OR CommandLine LIKE '%cscript%'")   
            AppPrevInstance = (.Count > 1)   
        End With   
    End With   
End Function    
'******
Function CommandLineLike(ProcessPath)   
    ProcessPath = Replace(ProcessPath, "
\", "\\")   
    CommandLineLike = "'%" & ProcessPath & "%'"   
End Function
'****** 


New Edit :
Hi 🤝
I just finished what do you want to achieve in batch ! with a dynamic menu 👍
so in this batch you can make choice what application do you want to block example if you want to block Google chrome, just type Chrome.exe and don't forget the extension .exe and so on ...
and you can also rollback your action by choosing the second choice to unblock and enable your application !
So the dynamic menu is like this one :
  1. [1] Disable execution for one application choosen by the user

  2. [2] Enable execution for one application choosen by the user

  3. [3] Disable and block the execution of all Browsers

  4. [4] Enable and unblock the execution of all Browsers


So enjoy it 🤗

PHP Code

<?php 
@echo off
Set MyKey
=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
:menuLOOP
Mode con cols
=90 lines=11
Cls 
& color 0B
Title Enable 
and disable execution of applications by Hackoo 2015
echo(
echo(      ======
Menu======
echo(
for /
f "tokens=2* delims=_ " %%A in ('"findstr /b /c:":menu_" "%~f0""') do echo(      %%A  %%B
echo(
echo(      ======
set choice=
echo( & 
set /p choice=Make a choice or hit ENTER to quit: || GOTO :EOF
echo( & call :menu_[%choice%]
GOTO:
menuLOOP
::******
:
menu_[1] Disable execution for one application choosen by the user
Mode con cols
=90 lines=11 & Cls & color 0C
echo(
echo 
Enter Application name with its extension to block and disable it like "Chrome.exe"
echo(
Set /p "App=Enter Application name to block and diable it > "
IF [%App%] == [] GOTO:menuLOOP
REG ADD 
"%MyKey%\%App%" /f
REG ADD 
"%MyKey%\%App%" /v Debugger /t REG_SZ /d Block /f
Start 
"" "%App%"
GOTO:menuLOOP
::******
:
menu_[2] Enable execution for one application choosen by the user
Mode con cols
=90 lines=11 & Cls & color 0A
echo(
echo 
Enter Application name with its extension to unblock and enable it like "Chrome.exe"
echo(
Set /p "App=Enter Application name to unblock and enable it> "
IF [%App%] == [] GOTO:menuLOOP
REG ADD 
"%MyKey%\%App%" /f
REG ADD 
"%MyKey%\%App%" /v Debugger /t REG_SZ /d "" /f
Start 
"" "%App%"
GOTO:menuLOOP
::******
:
menu_[3] Disable and block the execution of all Browsers
Mode con cols
=90 lines=11 & Cls & color 0C
Set Browsers
=iexplore.exe firefox.exe chrome.exe opera.exe
For %%a in (%Browsers%) Do Call :BlockExecution %%a
GOTO:menuLOOP
::******
:
menu_[4] Enable and unblock the execution of all Browsers
Mode con cols
=90 lines=11 & Cls & color 0A
Set Browsers
=iexplore.exe firefox.exe chrome.exe opera.exe
For %%a in (%Browsers%) Do Call :UnBlockExecution %%a
GOTO:menuLOOP
::******
:
BlockExecution
REG ADD 
"%MyKey%\%~nx1" /f
REG ADD 
"%MyKey%\%~nx1" /v Debugger /t REG_SZ /d Block /f
Exit /b 
::******
:
UnBlockExecution
REG ADD 
"%MyKey%\%~nx1" /f
REG ADD 
"%MyKey%\%~nx1" /v Debugger /t REG_SZ /d "" /f
Exit /b 
::******
:
EOF
EXIT
::****** 
thank you for this real bomb man :D
Hi 🤝
Thanks to your request, i made an update to this program

And here is its screenshot :

[img]http://nsm08.casimages.com/img/2015/06/21//15062105323511244313387558.jpg[/img]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by Emre_Jan 12, 2021 11:16 PM 0 141 Jan 12, 2021 11:16 PM
Last Post: Emre_