Zxian Posted January 28, 2005 Posted January 28, 2005 Hey everyone,In class yesterday, we were going over operating systems in my computer science class, and the prof put up some code that would cause a Win9x computer to crash and burn, while a Win2K or XP computer would simply throw an error at you.while(1) { *( (char *) random() ) = 62; }The code is in C. For those of you who don't understand what it's doing, is...while(1) = loop foreverrandom() = generates a random number between 0 and 2^31-1(char *) random() = tells the program that the random number is now an address in memory.*( (char *) random() ) = 62; ===> Finds that address in memory and stores the 8-bit representation of 62 there.No compiler or anti-virus program would catch this problem, ever...
un4given1 Posted January 28, 2005 Posted January 28, 2005 don't think I have ever heard of anyone having that happen to them... That's like saying "no antivirus program would ever catch this: del c: /s /q /f" That's a command, not a virus.
Wraith Posted January 28, 2005 Posted January 28, 2005 Of course, if you knew how to code properly, you wouldn't do this in the first place.
mark Posted January 29, 2005 Posted January 29, 2005 But isn't a virus bad code? Chernoble (sp?) from what I have read would take your computer running Win95 and zero it out completely, including your bios.All someone who writes code for an OS can do is try to get the OS to catch and stop mistakes. If the OS ever gets to the point where it can catch all mistakes, it will probably start writing itself with no help from us. Addapt to us. You start to play a game and the OS recognizes that it is not optimally configured, a mistake, and makes adjustments.Just talking.DL
Zxian Posted January 30, 2005 Author Posted January 30, 2005 If the OS ever gets to the point where it can catch all mistakes, it will probably start writing itself with no help from us.The only problem here is that you're starting to talk about AI, and I don't think that any company is ready to start deveolping that. Just look at all the movies with that theme. They're there for a reason. Asimov imagined that type of thing happening 50 years ago...Oh, and yeah, it's just stupid code, but a good example of what a good OS should be able to deal with. The UNIX machines that we have in the computer labs at UBC have been able to deal with that type of code for years... And un4given1, just because no anti-virus program would ever catch "del C:\ /s /q /f" doesn't mean that it's not harmful. A virus could be as simple as that... to simply delete vital files and cripple the OS, or corrupt the memory as in my example.
phoenix_nf Posted January 30, 2005 Posted January 30, 2005 Viruses....BAD virus writers intelligence....GOOD usage.....BADwhy cant virus writers use their intelligence to do something good like increasing the speed of my net connection. okok everyones net connection speed.
aadipa Posted January 30, 2005 Posted January 30, 2005 No compiler or anti-virus program would catch this problem, ever...i did tried simillar code few years ago in lab.... changing a value in memory location directly.While McAfee and Norton were not able to catch it, AntiViru Personal Edition (Free Antivirus.. may be some typo in name ) catch the code and gave an error of virus like codeAfter that i used that antivirus to check my C code for accessing memory that is not declared.
prathapml Posted January 30, 2005 Posted January 30, 2005 How to crash win98 - (Note: this is not illegal in any way)It is not difficult to crash windows 98. You could do this in win95 as well.Make sure no open files or important apps are running, close all windows.Run command.exetype DEBUG to start the debugging utility that came with DOSThe C prompt now becomes a hyphen.at the hyphen, key in he following line- f 0:0 ffff 0Press <Enter> and your screen will go haywire and computer hangs. You will have to do a restart manually to get back to booting windows again.What has happened is you filled the first megabyte of your memory with zeroes (thereby "kicking" the OS kernel) which should not really have happened if the VMM was monitoring what was done.Today windows 98 is mostly being used in commercial, public-access PCs (like in internet access centres). I happen to know some people who go to those places and put the the above in a batch-file, compile it to EXE and get task scheduler to run it every 60 minutes. Its not a surprise that within a week the owner wants to upgrade to a newer version (giving up win98 for good) - and these guys get good money to do the upgrade. Post the above info everywhere you want - spread the gospel. Crap, if nothing else, atleast the above should scare you (I mean, any win98 lover) to move to win2k/XP.
indianarchie Posted January 31, 2005 Posted January 31, 2005 How to crash win98 - (Note: this is not illegal in any way)It is not difficult to crash windows 98. You could do this in win95 as well.Make sure no open files or important apps are running, close all windows.Run command.exetype DEBUG to start the debugging utility that came with DOSThe C prompt now becomes a hyphen.at the hyphen, key in he following line- f 0:0 ffff 0Press <Enter> and your screen will go haywire and computer hangs. You will have to do a restart manually to get back to booting windows again.What has happened is you filled the first megabyte of your memory with zeroes (thereby "kicking" the OS kernel) which should not really have happened if the VMM was monitoring what was done.Today windows 98 is mostly being used in commercial, public-access PCs (like in internet access centres). I happen to know some people who go to those places and put the the above in a batch-file, compile it to EXE and get task scheduler to run it every 60 minutes. Its not a surprise that within a week the owner wants to upgrade to a newer version (giving up win98 for good) - and these guys get good money to do the upgrade. Post the above info everywhere you want - spread the gospel. Crap, if nothing else, atleast the above should scare you (I mean, any win98 lover) to move to win2k/XP.Thts a good piece of knowledge prathapml..I didnt know it was that simple!
prathapml Posted January 31, 2005 Posted January 31, 2005 Thts a good piece of knowledge prathapml..I didnt know it was that simple!hehe, another piece then...quote as less as you can - or avoid quoting if possible. While quoting dlete all lines and keep only the exact part you're responding to. When you're replying to the last post in a thread, its almost unnecessary to quote the post just above yours.(no offense meant, this is just to keep the forum tidy)MSFN - Where People Go to Know! B)
Zxian Posted January 31, 2005 Author Posted January 31, 2005 That's pretty hilarious...It's just really funny to see stuff like this happen. I guess this is why the computers at my university are all UNIX based, since when they got the computers, Win98 couldn't handle situations like these.It's just really funny to see stupid code like this...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now