Sign in to follow this  
Followers 0
HackerZer0

Folder Protection

37 posts in this topic

#1 ·  Posted (edited)

hey, this called Folder Protect... it make folders undeleteable by checking there size, and comparing it to the backup folder...if the folder is bigger it copies itself again, if it's deleted, it instantly reapears...

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;              ::::::::::::::::::::::::::::::::::::::::::
;:::::::::         Created by HackerZer0           :::::::::;
;              ::::::::::::::::::::::::::::::::::::::::::
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Break(0)
$choose = 0
HotKeySet("^!+{F9}", "_Quit")
If $choose = 1 Then
$protect = InputBox("Folder Protect", "Enter the folder to protect, enclosed in quotes.", "")
$backup = InputBox("Folder Protect", "Enter the backup folder, enclosed in quotes.", "")
Else
$protect = "C:\Documents and Settings\Owner\Desktop\Eternal"
$backup = "C:\tmpfolder"
EndIf
If FileExists($protect) Then Check()
DirCreate($protect)
Check()
Func Check()
If FileExists($backup) Then Eternal()
DirCreate($backup)
EndFunc
Eternal()
Func Eternal()
While 1
$size = DirGetSize($protect)
$size2 = DirGetSize($backup)
Sleep(250)
If $size > $size2 Then DirCopy($protect, $backup, 1)
If $size2 > $size Then
DirCopy($backup, $protect, 1)
$title = WinGetTitle("", "")
ControlFocus("Program Manager", "", "Progman")
Send("{F5}")
WinActivate($title, "")
EndIf
Wend
Sleep(250)
EndFunc

Func _Quit()
ToolTip("Exiting Folder Protect", 900, 715)
Break(1)
Sleep(3000)
Exit
EndFunc

it doesn't work correctly if you change a file in the folder to be smaller, or if you change it and its the same size, it won't copy itself...

help me improve this plz! :whistle:

Edited by HackerZer0

Share this post


Link to post
Share on other sites



I don't understand exactly what you wanna do... You don't want that a user deletes a folder? or this script protects a folder from accidental deletion?

Please use autoit tags to make your code more readable... :whistle:

Share this post


Link to post
Share on other sites

it creates a copy of the stated folder in "C:\tmpfolder" and every 1/2 a second checks the sizes in bytes of both,

if one is bigger than the other it copies the larger folder contents into the smaller one...

i wanted to make it better, any feedback is good...

______________________________________________________________________________________

PROBLEMS:

1) if one of the folder's files changes in content but not in size, it is not backed up.

2)if one of the folder's files is reduced in size, it is emidiately changed back...

______________________________________________________________________________________

Share this post


Link to post
Share on other sites

This is the stupidest piece of crap Ive ever seen.

1) Its stupid

2) Someone could just delete the tmp

3) Not everyone has a C: Drive

4) Its stupid

5) Its stupid

6) Its stupid

7) Its stupid

8) Wastes CPU cycles

9) Its SO FUCKING STUPID


[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Share this post


Link to post
Share on other sites

This is the stupidest piece of crap Ive ever seen.

1) Its stupid

2) Someone could just delete the tmp

3) Not everyone has a C: Drive

4) Its stupid

5) Its stupid

6) Its stupid

7) Its stupid

8) Wastes CPU cycles

9) Its SO FUCKING STUPID

What is your problem? :whistle:


Sapiente vince, rex, noli vincere ferro!

Share this post


Link to post
Share on other sites

Wouldn't it just be easier to check recycle bin and auto restore?


Aha.. I have unlocked it's secrets.. world domination is within my grasp...

Share this post


Link to post
Share on other sites

This is the stupidest piece of crap Ive ever seen.

1) Its stupid

2) Someone could just delete the tmp

3) Not everyone has a C: Drive

4) Its stupid

5) Its stupid

6) Its stupid

7) Its stupid

8) Wastes CPU cycles

9) Its SO FUCKING STUPID

OK IDIOT, if you would read the code, you would notice it copies itself both ways, if the tmp folder is deleted, the protected folder copies itself back to it jackass, you try to get around it.

Share this post


Link to post
Share on other sites

Wouldn't it just be easier to check recycle bin and auto restore?

no, actually...what if some deleted it with Shift + Del ??? it's for accidents and malicious attempts from others..

besides...

say you delete something from a non-protected folder and then try to from the protected one? both would be restored...

Share this post


Link to post
Share on other sites

Smells like malware to me ... some sort of trojan you can't get rid of .....


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

Smells like malware to me ... some sort of trojan you can't get rid of .....

that makes no sense, you can read the code right there...exactly what part of that

look like malware?

would you like me to break down what each line of the script does???

Share this post


Link to post
Share on other sites

How about just giving several examples of who would use this and for what logical reasons. I've been using computers for over 25 years and I've never thought of having a directory replicate itself onto the same computer.

Replication is a very useful tool that does exactly what your doing but it uses multiple computers, this is considered a backup scenario. I can't think of a single reason you would want to have a persistent directory which is exactly what trojans do.

Hey, if people think it's a good idea - then by all means keep it up. But the concept still reeks of malware.

Oh, and it doesn't help your case with a user id with the term HACKER in it.


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

This is the stupidest piece of crap Ive ever seen.

1) Its stupid

2) Someone could just delete the tmp

3) Not everyone has a C: Drive

4) Its stupid

5) Its stupid

6) Its stupid

7) Its stupid

8) Wastes CPU cycles

9) Its SO FUCKING STUPID

Why did you even post then? If you think this program is crap, then mind your own business and not post.

This is quite useful, maybe change a few ways of doing things, but the concept is actually kinda cool.

Edited by CHRIS95219

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

How about just giving several examples of who would use this and for what logical reasons. I've been using computers for over 25 years and I've never thought of having a directory replicate itself onto the same computer.

Replication is a very useful tool that does exactly what your doing but it uses multiple computers, this is considered a backup scenario. I can't think of a single reason you would want to have a persistent directory which is exactly what trojans do.

Hey, if people think it's a good idea - then by all means keep it up. But the concept still reeks of malware.

if you are to ignorant to comprehend the uses of this script, then let me reiterate...

scenarios...

1) public computer - being misused, folders arbitrarily deleted...

2) home computer - small child, likes to mess with parents computer, doesn't understand the meaning of

valuable info...

3) knowledge use - read, interpret, and understand, or possibly build upong the code, to expand one's

knowledge base...

______________________________________________________________________________________

if you don't like or disagree with a particular peice of code, then don't comment, your opinionated remarks

cannot and will not alter the perspective upon wich i view things...

and my i ask you, when is the last time you saw any malware or a trojan with an exit function?

Ctrl+Shift+Alt+F9

- see code

________________________________________________________________________________________

Oh, and it doesn't help your case with a user id with the term HACKER in it.

would you also say the same thing to a person of middle eastern origin stopped in an airport, named Mohamid???

Edited by HackerZer0

Share this post


Link to post
Share on other sites

I found a way to stop it. Ctrl+Alt+Del.

Share this post


Link to post
Share on other sites

Nice idea, you may call it folder protection but it look more like a folder syncro. Some ideas to improvement will be change InpuBox() for FileSelectFolder().

Also change the following line

If FileExists($protect) Then Check()
DirCreate($protect)
Check()

Func Check()
    If FileExists($backup) Then Eternal()
    DirCreate($backup)
EndFuncoÝ÷ Ùú+jëh×6If Not FileExists($protect) Then DirCreate($protect)
If Not FileExists($backup) Then DirCreate($backup)
It will do exactly the same but with less line of code.

I may also change this line

If $size > $size2 Then DirCopy($protect, $backup, 1)

for this one

If $size <> $size2 Then DirCopy($protect, $backup, 1)

This way don't matter if the size is smaller or bigger, any time the size are different the folder get copy.


AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

and my i ask you, when is the last time you saw any malware or a trojan with an exit function?

Are you suggesting that it is impossible to use the code if the exit function is not included ?

would you also say the same thing to a person of middle eastern origin stopped in an airport, named Mohamid???

I only pointed out the FACT that your code AND your user id suggest malware intents. YOU twisted this into a racist topic....

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

I may also change this line

If $size > $size2 Then DirCopy($protect, $backup, 1)

for this one

If $size <> $size2 Then DirCopy($protect, $backup, 1)

This way don't matter if the size is smaller or bigger, any time the size are different the folder get copy.

this would defeat the perpose... you must know wich is bigger to tell if something was deleted...if you use THAT

code deletion would be enabled, only leaving copies in the backup...

Share this post


Link to post
Share on other sites

Are you suggesting that it is impossible to use the code if the exit function is not included ?

do you ask your bank if there vault may be used if a key/combination doesn't exist?

if you ran the script as i posted it would it be malicious or act like a trojan? NO...

are you enraged by companies that produce kitchen knives because someone may get stabbed with one?

i present the code in a non-destructive, even helpful state...

now am i to asume that you would believe it to be my fault if some altered my code to be malicious?

if i sell a car that's speed is governed down to 65, and the buyer later raises the car's limit and kills someone

in a crash going 101 mph, is it my fault?

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0