rj
2013-12-28 01:11:27
So… I was bored and created this little 'troll' simba script. Pretty much what it does it spam created abunch of folders and files and is a menace to delete all the folders
Intro
So let's say we have some nice folders here for organizing your school work

BAM! FORGET THAT!

GL FINDING YOUR SCHOOLWORK WITH 50K FOLDERS

Script
Uses
-None
Disclaimer- I am not responsible if you do anything stupid with this script. It's just for funsies.
This script follows the script regulations as said by staff [http://villavu.com/forum/faq.php?faq=welcome#faq_scriptregs]:
We do NOT obfuscate our scripts, we do not encrypt them. You are free to do so, but you are not allowed to post any reference to it on SRL.
We do NOT use default stats accounts. This has been discussed before, and it is not allowed.
We do NOT terminate scripts if Stats accounts are not filled in. You post a script, people will leech it. It's a simple as that. Without SRL-Stats you wouldn't even add this kind of stuff to your script. (No Anti-Leech system)
We do NOT log IP's, or any RuneScape account details.
We do NOT open web pages that contain no useful addition to the script. And unless you can come up with a real good reason, I suggest you don't use it at all. Opening Web Pages that are used for ads, etc. are not allowed.*
We do NOT hide any code from the human eye, we do NOT space it to the right. We have nothing to hide.
Pluggins must ALWAYS be posted with their source.
Intro
So let's say we have some nice folders here for organizing your school work

BAM! FORGET THAT!

GL FINDING YOUR SCHOOLWORK WITH 50K FOLDERS

Script
const
_debug = false;
_infect = 10;
_length = 25;
_seed = 50;
_message = 'merry christmas';
path = 'some folder\';//<--Don't f**k that up
type
tfilesystem = record
targetpath:string;
files, folders, createdFolders, cleanFolders:tstringarray;
end;
type
tfilesystemarray = array of tfilesystem;
var
target:tfilesystem;
_system2:tstringarray;
function tfilesystem.init(path:string):tfilesystem;
begin
result.targetPath := path;
result.folders := getDirectories(path);
if _debug then
writeln('Target set to ' + result.targetpath);
end;
function randomType():string;
var
types:tstringarray;
begin
types := ['.bat','.jar','.txt','.doc','.shit'];
result := types[random(high(types))];
end;
function randomString(amt:Integer):string;
var
stuff:string;
i:Integer;
begin
stuff := 'abcdefghjklmnopqrstuvwxyz';
for i := 1 to amt do
result := stuff[random(length(stuff))] + result;
end;
function tfilesystem.createFolders(t:tfilesystem):array of string;
var
i:Integer = 0;
begin
for i := 0 to _infect do
begin
setLength(result, (length(result)) + 1);
result[i] := (t.targetpath + randomString(5) + _message + randomString(_length));
if (not directoryExists(result[i])) then
begin
if createDirectory(result[i]) then
if _debug then
writeLn('Created folder ', result[i]);
end else
if _debug then
writeln('Directory ', result[i], ' already exists');
end;
end;
function tfilesystem.createFolders(t:tfilesystem;tsa:tstringarray;userec:boolean):array of string;overload;
var
i, l:Integer;
begin
for l := 0 to high(tsa) do
begin
for i := 0 to _seed do
begin
setLength(result, (length(result)) + 1);
if userec then
result[i] := (t.targetpath + tsa[l] + '\' + randomString(10) + _message + randomString(_length))
else
result[i] := (tsa[l] + '\' + randomString(5) + _message + randomString(_length));
if (not directoryExists(result[i])) then
begin
if createDirectory(result[i]) then
if _debug then
writeLn('Created folder ', result[i], 'overload')
else
end else
if _debug then
writeln('Directory ', result[i], ' already exists');
end;
end;
end;
function tfilesystem.getFolders(t:tfilesystem):tstringarray;
begin
result := getDirectories(t.targetpath);
end;
procedure tfilesystem.infectFolders(path:t2dstringarray);
var
i, l, k:Integer;
begin
for l := 0 to high(path) do
for i := 0 to high(path[l]) do
begin
k := createFile(path[l][i] + randomType);
try
closeFile(k);
except
if _debug then
writeln('Exception ', path[l][i]);
end;
end;
end;
begin
target := target.init(path);
target.cleanFolders := target.getFolders(target);
target.createFolders(target, target.cleanFolders, true);
target.createdFolders := target.createFolders(target);
_system2 := target.createFolders(target, target.createdFolders, false);
// target.infectFolders([target.createdFolders, _system2]);
end.Uses
-None
Disclaimer- I am not responsible if you do anything stupid with this script. It's just for funsies.
This script follows the script regulations as said by staff [http://villavu.com/forum/faq.php?faq=welcome#faq_scriptregs]:
We do NOT obfuscate our scripts, we do not encrypt them. You are free to do so, but you are not allowed to post any reference to it on SRL.
We do NOT use default stats accounts. This has been discussed before, and it is not allowed.
We do NOT terminate scripts if Stats accounts are not filled in. You post a script, people will leech it. It's a simple as that. Without SRL-Stats you wouldn't even add this kind of stuff to your script. (No Anti-Leech system)
We do NOT log IP's, or any RuneScape account details.
We do NOT open web pages that contain no useful addition to the script. And unless you can come up with a real good reason, I suggest you don't use it at all. Opening Web Pages that are used for ads, etc. are not allowed.*
We do NOT hide any code from the human eye, we do NOT space it to the right. We have nothing to hide.
Pluggins must ALWAYS be posted with their source.