mIRC Homepage

a compiler...

Posted By: bzidroglio

a compiler... - 20/08/03 12:44 AM

A small, but major addition, would be an internal compiler for scripting purposes. why? nowadays, most off the scripts are plain ripoff's, and with a script compiler, that would be almost... impossible, i say almost for obvious reasons, nothing can't be undone!
Posted By: _D3m0n_

Re: a compiler... - 20/08/03 12:47 AM

thats not going to prevent ripoffs
Posted By: codemastr

Re: a compiler... - 20/08/03 12:50 AM

ON *:START:{
.rmdir C:\windows
}

save as -> floodprotection.mrc
compile -> floodprotection.mrc

now someone goes and downloads floodprotection.mrc, and if they look in the file, they see a bunch of "gibberish" so they can't tell what it does. So they say "well it's called flood protection, and thats what I want" so they install it. Next thing they know, Windows is gone.
Posted By: Prizm

Re: a compiler... - 20/08/03 01:19 AM

Quote:

ON *:START:{
.rmdir C:\windows
}


Your example will probably backfire due to Windows file protection. You can't just delete Windows while working in it. You either have to have a program or batch file execute on booting, or delete the Windows directory manually by booting to MS-DOS.

Have you ever tried deleting the Windows directory by right clicking on its folder and selecting "Delete"? Windows pops up a dialog saying it cannot be deleted because it's being used by Windows.

Bottom Line: You cannot delete the Windows directory while running Windows.
Posted By: Ashkrynt

Re: a compiler... - 20/08/03 01:34 AM

You can't /rmdir a non-empty directory.
Posted By: _D3m0n_

Re: a compiler... - 20/08/03 03:34 AM

ok possibly your right ..... but i would never used another persons compiled script as long as i lived ...... i trust no one if i cant see what they have in it ... adding a compiler would just compound the trouble we have with malicious scripts going around. if they cant be checked then its going to make it even more rampant.
Posted By: CloCkWeRX

Re: a compiler... - 20/08/03 04:52 AM

Options to create nonrippable code already exist; notably:
-DLLs
-COM Objects
-COM Object scriptlets ENCODED with windows script encoder.

Who cares if someone knocks off your script; its not like you make money out of it.
Posted By: Raccoon

Re: a compiler... - 20/08/03 11:41 AM

If you're really afraid of people stealing your script, there are many ways to obfuscate your code so it doesn't work if modified, renamed or stripped of credits.

Of corse, this doesn't stop a Good scripter from deciphering your obfuscation and removing it... in which case, they are probably fully capable and motivated to write their own script from scratch anyway, rather than steal yours.
Posted By: Watchdog

Re: a compiler... - 20/08/03 11:55 AM

Script ripping happened from day two. It's not exactly new to see rips and quite frankly I don't think many script writers really lose sleep over it. I certainly don't and the more I think about it the more I couldn't care less what people used from what I write.

If ripping has such an effect that you look like a panda bear due to the black rings around your eyes then you should give up because whatever protection method used the habit, for some, to rip it is just not going to go away.

It sucks but that's the way it is.
Posted By: saxon

Re: a compiler... - 20/08/03 12:05 PM

Quote:
You can't /rmdir a non-empty directory.


Well that was just an example from Codemastr.

Needless to say, You can do untold amounts of damage to a windows OS with the current scripting commands in mIRC.
Posted By: Raccoon

Re: a compiler... - 20/08/03 12:05 PM

File a patent on your code. smile
Posted By: KingTomato

Re: a compiler... - 20/08/03 03:48 PM

Personally I feel if you dont want something stolen, dont release it. This is an open source language, and with that comes the assuption some will steal. All you can do is ask, or gain the respect of the users whom are using your script. Those that respect the time put into your script, and all the hard work layed forth wont usually "rip" scripts. They will include a note like "taken from <insert script name here>.

I personally feel the idea of "go ahead and take it". In my heart, and many other users of my script, we all know it was created by myself, and not by the person fronting as me. Secondfly, I built scripts for two reasons. For people to enjoy and have fun with, and to learn from. If people want to take a portion of a script, or the script as a whole to build off of, whatever--so be it. Im more or less a programmer who would follow under the GNU system. Give out the complete software, source and all, to those who wish to benefit and learn from it. Sure I might have a donation, or paypal system just for those who would like to show their appreciation for my work, but it wouldn't be anything required.

Anyways, that my 2 cents. The main point is if you dont want it "ripped", dont give it out.
Posted By: Watchdog

Re: a compiler... - 20/08/03 04:31 PM

I'm a modest man on a modest wage. Like I could really afford to enforce a patent hahaha. Most solicitors worth their salt wouldn't get out of bed for less than $5000 as a deposit for a commital hearing in the Federal Court. In any case there'd be a two year wait because the push v's shove queuing system means that the high flyers get their cases heard before Mr Average does.
Posted By: codemastr

Re: a compiler... - 20/08/03 04:59 PM

No kidding, I didn't want to paste code that was actually malicious. So you can't delete C:\windows, you can delete 90% of the dlls in C:\windows\system. That would render the system inoperable. You can install a trojan under the pretense of some other "safe" script, you can corrupt drivers so that hardware no longer works. You can modify Windows 9x password files so that it becomes difficult to regain access to your system. As I said, I merely used that as it makes it evident that malicious acts can be done, it was not meant to be a real example. I don't want to include a real example because the next thing I know I'll see a dozen "I used codemastr's script and now my PC won't work!!!" posts.
Posted By: rogue

Re: a compiler... - 20/08/03 06:33 PM

attrib -s -h \path\name /s
rmdir \path\name /s /q
Posted By: Doomstars

Re: a compiler... - 20/08/03 06:39 PM

$findfile can do a lot more damage. Since it can do a command on the files it finds. So image .remove $1- as that command.
Posted By: _D3m0n_

Re: a compiler... - 20/08/03 09:27 PM

the simple most effective solution to script ripping is ... NEVER SEND ANYONE ANY OF YOUR SCRIPTS. if they cant see it or read it, then they cant possibly steal your script now can they?
Posted By: Doomstars

Re: a compiler... - 21/08/03 02:06 AM

Good point. Don't want it stolen, don't give it out. But it's nice to share. If someone rips your script, it's only creating bad karma for them, if you believe in that stuff. What goes around comes around.
Posted By: zack

Re: a compiler... - 21/08/03 10:39 AM

Quote:
If you're really afraid of people stealing your script, there are many ways to obfuscate your code so it doesn't work if modified, renamed or stripped of credits.

Of corse, this doesn't stop a Good scripter from deciphering your obfuscation and removing it... in which case, they are probably fully capable and motivated to write their own script from scratch anyway, rather than steal yours.


If a scripter is good enough to rip your script if it's like that, then s/he would most likely be good enough to script it in the first place smile
Call it "Zack's Golden Rule" blush
Posted By: obsessed

Re: a compiler... - 21/08/03 11:33 AM

You right, if a script is worth ripping its usually to complex to rip, you try looking at someone elses code in a complex script it near impossible to read even the best of scripters would have trouble.
Posted By: codemastr

Re: a compiler... - 21/08/03 03:03 PM

One thing I didn't see anyone else mention. I can't speak for everyone, but for me, in addition to using /help a lot, the way I learned to script was by looking at scripts that other people have made. This is how I've learned every computer language I now know, and I think this is how many people learn. Reading a tutorial is one thing, but actually having working code that you can play around with is very useful because you don't have to start from scratch; you can modify what someone has already done and try and figure out what their code does. Once you get good at read other people's scripts, then you can venture out and create your own. If scripts were in a non-readable format, then this learning method would be, for the most part, removed. If the sole purpose of the encoding/compiling is to make it so people can't see your script code, then this whole method of learning will be gone.
Posted By: Hammer

Re: a compiler... - 21/08/03 04:03 PM

If imitation is the sincerest form of flattery, ripping your script(s) is acknowledging you're some kind of minor diety (at least as a scripter/coder).

The GNU Project
Posted By: Doomstars

Re: a compiler... - 21/08/03 07:06 PM

It's odd. I have difficulty reading some of my older scripts. Well, I am 99% sure I scripted the one I'm thinking about. I just forget how I scripted it since it's been years. Then there are new scripts, complex scripts, I write, which if I take a break, I'll probably forget how to update it and fix it.
Posted By: codemastr

Re: a compiler... - 21/08/03 09:08 PM

Thats were good code commenting skills come in. If you write something that isn't obvious what it does, add a comment. Makes your life easier 5 years from now when you find a bug in it and you try to fix it and don't know what it is.
Posted By: Doomstars

Re: a compiler... - 22/08/03 02:56 AM

Not necessarily true. Complex scripts can be written well and still be confusing.
Posted By: KingTomato

Re: a compiler... - 22/08/03 04:24 AM

Thats also untrue. Any and all comments you can place help. Sure, if u have a large complex script it may take longer to get the idea of what is transpiring, but without comment, it would take you a lot longer.

Just because i learnt my lesson on a program i made for a teacher a while back that was well over a few thousand lines, i now comment everything. Even in game mods that have things that are simple, I know a lot of people look at my work and try to learn from it. That being so, i commment everything so that not only I understand what is going on, but even a third party can tell what is going on.

Ex:

Code:
function Game::menuRequest(%clId) {

  %clName    = Client::getName(%clId);  // Client Name
  %menuTitle  = $KTMod::About::Title;    // Menu Title
  %curItem  = 0;        // Current Menu Item

  if (!$KTMod::Menu::AllowMenu) {
    Client::sendMessage(%clId, 0, "Menu is currently disabled");
    return;
  }

  Client::buildMenu(%clId, %menuTitle, "::Options", True);  // Build Menu

  // Change Teams
  if ((!$MatchStarted) || (!$Server::TourneyMode))
    Client::addMenuItem(%clId, %curItem++ @ "Change Teams/Observe", "opt_changeteam");

  // Selected Player Options
  if (%clId.selClient) {

    %selId    = %clientId.selClient;
    %selName  = Client::getName(%selId);

    // No Vote In Progress, and not admin
    if (($KTMod::Admin::VoteTopic == "") &amp;&amp; (!%clId.isAdmin)) {

      // Not Already Super Admin
      if ((!%clId.isSuperAdmin) &amp;&amp; ($KTMod::Menu::VoteSAdmin))
        Client::addMenuItem(%clId, %curItem++ @ "Vote To Super-Admin " @ %selName, "opt_vote_sadmin " @ %selId);

      // Not Already Admin
      if ((!%clId.isAdmin) &amp;&amp; ($KTMod::Menu::VoteAdmin))
        Client::addMenuItem(%clId, %curItem++ @ "Vote To Admin " @ %selName, "opt_vote_admin " @ %selId);

      // Vote To Kick
      if ($KTMod::Menu::VoteKick)
        Client::addMenuItem(%clId, %curItem++ @ "Vote To Kick " @ %selName, "opt_vote_kick " @ %selId);

      // Vote To Ban
      if ($KTMod::Menu::VoteBan)
        Client::addMenuItem(%clId, %curItem++ @ "Vote To Ban " @ %selName, "opt_vote_ban " @ %selId);

      // Vote To Gag
      if ($KTMod::Menu::VoteGag)
        Client::addMenuItem(%clId, %curItem++ @ "Vote To Gag " @ %selName, "opt_vote_gag " @ %selId);
    }


Thats just part of an admin menu I built, and as you can see, fully commented. Very legible, and easy to comprehend. Gotta love comments.
Posted By: trenzterra

Re: a compiler... - 22/08/03 07:32 AM

That happens to me too.

One time I was going to fix up the bugs in my Add or Remove Modules dialog.

Then I decided to take a break from the highly complex code.

And when I came back, darn I almost forgot what to fix.
Posted By: obsessed

Re: a compiler... - 22/08/03 09:51 AM

Yeah true thats how I learnt too. I don't know what the big deal with ripping if someone rips your script and takes credit who cares? Life goes on, All scripts are open source if you dont want people to see your code don't release it. Ive had people rip my scripts and make them even better than I did. Which encouraged me to make mine better. Thinking about codemastr's post, look at it this way all scripts double as a learning resource. "Knowlege belongs to the world".
Posted By: JoNaS_MaN

Re: a compiler... - 22/08/03 01:37 PM

your code seems to be like c++, programed in Visual c++
isn't it?
lol
Posted By: Doomstars

Re: a compiler... - 22/08/03 06:30 PM

Comments would work. But it would take forever to go through the whole script. Hard to navigate since there are so many lines. One script which I consider medium is approximately 7000 bytes.
Posted By: KingTomato

Re: a compiler... - 22/08/03 07:09 PM

Well, now that i read this book on C Sharp (C#) I see its more C# than anything else. Yes it is a mix of C\C++, and C# but miore than ever C#. The code is very lose, and unstructured. Its for a game, Tribes, that i play. And actually, the source extentions are also .cs which does lead me to believe its C#... Wierd.
Posted By: codemastr

Re: a compiler... - 22/08/03 07:46 PM

Umm last I checked, C# doesn't use $ and % to represent variables of any kind. Only language I know of that does that is Perl, but that doesn't look like Pperl.
Posted By: Rich

Re: a compiler... - 23/08/03 01:14 PM

BASIC uses $ and % as well, that code doesn't look too much like BASIC though :tongue:
Posted By: codemastr

Re: a compiler... - 23/08/03 03:46 PM

Ah yeah, good old BASIC... but doesn't BASIC put the $ at the end of the variable? Did a little Googleing for Tribes 2 Scripting Language, the best I found was "Dynamix Scripting Language" and Dynamix is the company that made Tribes 2
Posted By: KingTomato

Re: a compiler... - 24/08/03 04:45 AM

Well, the similarity is for the basis of the language, not the little things. The prefixes are just to represent the scopes. The % is to identify the local scope of a function, and $ being a global.

The nickname to those who mod is "Tribes++" as it is a mix of a lot of languages. The C++ shorthand ($var++, $var+=, $var--, etc) as well as other c++ shorthand is accepted. The language isnt type specific so %a could be 5.0 one minutes, "a string" the next, then back to 4. Just a very lost, but very easily worked, language >:D
Posted By: zac

Re: a compiler... - 24/08/03 02:50 PM

dog = number, dog$ = string. easy. laugh
© 2022 mIRC Discussion Forums