Sign in to follow this  
Followers 0
Blue_Drache

Simple Download Blocker

4 posts in this topic

#1 ·  Posted (edited)

Just a simple boredom. I plan on replacing the standard input box with a GUI eventually. A radio button to allow for the selection of a variable ammount of time is planned copuled with a radio button that will allow you to completely shut the program off after the password has been entered.

You will have to set the value of $file (located in Initialization) and $match (located in the function) before compile.

#region Initialization
#include <date.au3>
$time = _NowTime()
$date = _NowDate()
$file = FileOpen("C:\folder\file.txt", 1)
If @error = -1 Then
   MsgBox(0, "Error", "Error opening file.  Shutting down")
   Exit
EndIf

opt("TrayIconHide",1)
opt("WinTitleMatchMode", 4)
HotKeySet("^!P", "_pass")

#region end

#region Primary Data Loop

While 1
   Sleep(10)
   Select
      Case WinExists("classname=IEFrame") And WinExists("File Download")
         WinClose("File Download")
         MsgBox(0, "Error", "Unauthorized Download Detected")
         FileWrite($file, @UserName & "," & $date & "," & $time & "," & "Attempted unauthorized download with IE"&@LF)
      Case WinExists("classname=MozillaWindowClass") And WinExists("Opening")
         WinClose("Opening")
         MsgBox(0, "Error", "Unauthorized Download Detected")
         FileWrite($file, @UserName & "," & $date & "," & $time & "," & "Attempted unauthorized download with Mozilla/Firefox"&@LF)
   EndSelect
WEnd

#region end

#region Function List

Func _pass()
   Local $match = "password", $bailout = 0
   Do
      Sleep(10)
      $password = InputBox("Enter Password", "Please enter the password to disable" & @LF & "the download blocker for 10 minutes", "", "*")
      If @error = 1 Then Return 0
      If $password <> $match Then
         $bailout = $bailout + 1
         MsgBox(0, "Error", "Password mismatch." & @LF & "Attempt: " & $bailout & "/3")
      EndIf
   Until $password = $match Or $bailout > 2
   Select
      Case $password = $match
         Sleep(1000 * 60 * 10)
      Case $bailout > 2
         FileWrite($file, @UserName & "," & $date & "," & $time & "," & "Attempted unauthorized password entry on Download Blocker"&@LF)
   EndSelect
EndFunc ;==>_pass

#region end
Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites



Just a simple boredom.  I plan on replacing the standard input box with a GUI eventually.  A radio button to allow for the selection of a variable ammount of time is planned copuled with a radio button that will allow you to completely shut the program off after the password has been entered.

You will have to set the value of $file (located in Initialization) and $match (located in the function) before compile.

#region Initialization
#include <date.au3>
$time = _NowTime()
$date = _NowDate()
$file = FileOpen("C:\folder\file.txt", 1)
If @error = -1 Then
   MsgBox(0, "Error", "Error opening file.  Shutting down")
   Exit
EndIf

opt("TrayIconHide",1)
opt("WinTitleMatchMode", 4)
HotKeySet("^!P", "_pass")

#region end

#region Primary Data Loop

While 1
   Sleep(10)
   Select
      Case WinExists("classname=IEFrame") And WinExists("File Download")
         WinClose("File Download")
         MsgBox(0, "Error", "Unauthorized Download Detected")
         FileWrite($file, @UserName & "," & $date & "," & $time & "," & "Attempted unauthorized download with IE"&@LF)
      Case WinExists("classname=MozillaWindowClass") And WinExists("Opening")
         WinClose("Opening")
         MsgBox(0, "Error", "Unauthorized Download Detected")
         FileWrite($file, @UserName & "," & $date & "," & $time & "," & "Attempted unauthorized download with Mozilla/Firefox"&@LF)
   EndSelect
WEnd

#region end

#region Function List

Func _pass()
   Local $match = "password", $bailout = 0
   Do
      Sleep(10)
      $password = InputBox("Enter Password", "Please enter the password to disable" & @LF & "the download blocker for 10 minutes", "", "*")
      If @error = 1 Then Return 0
      If $password <> $match Then
         $bailout = $bailout + 1
         MsgBox(0, "Error", "Password mismatch." & @LF & "Attempt: " & $bailout & "/3")
      EndIf
   Until $password = $match Or $bailout > 2
   Select
      Case $password = $match
         Sleep(1000 * 60 * 10)
      Case $bailout > 2
         FileWrite($file, @UserName & "," & $date & "," & $time & "," & "Attempted unauthorized password entry on Download Blocker"&@LF)
   EndSelect
EndFunc;==>_pass

#region end

<{POST_SNAPBACK}>

task mananger close autoit.exe, have fun while downloading ^^

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

task mananger close autoit.exe, have fun while downloading ^^

<{POST_SNAPBACK}>

[soapbox]

This was written for users who don't have a clue and/or Task Manager access has been disabled. Face it. Most drones don't have a fuggin idea about what's going on. If it's a compiled, stand alone executable, it can be hidden among the programs anyway.

Yes it can be shut down.

Yes it's not fool proof.

Did I advertise it as fool proof?

No.

Secondary solution would be to have a second process watch for the non-existance of the download blocker and respawn it if the user manages to actually get half a clue. Even better....kill the task manager if it shows up. Simple, easy, to the point. No mess, no foul.

Your comment was unwarrented and simple flame bait. Feel free to revel in my ignore list. Thank you for playing, drone, but maybe I should have expected such an IGNORANT comment from someone such as yourself. Next time, think before posting drivel. It's not always about you, and how intelligent you may think you are.

I have another issue. Why the hell did you quote my entire message to post one simple, incomplete and fragmented sentance? QUOTE ONLY RELEVANT ITEMS, the entire code was not relevant. In fact, you did not even need to quote anything at all. You've only increased your ignorance level by doing so.

Ok, I'm done now. Who's soapbox is this?

[/soapbox]

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

[soapbox]

This was written for users who don't have a clue and/or Task Manager access has been disabled.  Face it.  Most drones don't have a fuggin idea about what's going on.  If it's a compiled, stand alone executable, it can be hidden among the programs anyway.

Yes it can be shut down.

Yes it's not fool proof.

Did I advertise it as fool proof?

No.

Secondary solution would be to have a second process watch for the non-existance of the download blocker and respawn it if the user manages to actually get half a clue.  Even better....kill the task manager if it shows up.  Simple, easy, to the point.  No mess, no foul.

Your comment was unwarrented and simple flame bait.  Feel free to revel in my ignore list.  Thank you for playing, drone, but maybe I should have expected such an IGNORANT comment from someone such as yourself.  Next time, think before posting drivel.  It's not always about you, and how intelligent you may think you are.

I have another issue.  Why the hell did you quote my entire message to post one simple, incomplete and fragmented sentance?  QUOTE ONLY RELEVANT ITEMS, the entire code was not relevant.  In fact, you did not even need to quote anything at all.    You've only increased your ignorance level by doing so.

Ok, I'm done now.  Who's soapbox is this?

[/soapbox]

<{POST_SNAPBACK}>

lol ^^

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0