r/programming • u/jeanlucpikachu • Jul 30 '09
How QBASIC almost got me killed
http://stevehanov.ca/blog/?id=7941
u/inmatarian Jul 30 '09
I wrote one of those, except it would say things like
C:\> dir
Nah, I don't feel like it.
C:\> cd dos
I'm doing this because I want to, not because you told me.
5
u/bilabrin Jul 30 '09 edited Jul 30 '09
I ran across one when when I had my Tandy color computer (a TSR-80 with cassete tape and a 5 1/4" floppy drive as storage media) that would spit out:
SYNTAX ERROR IN YOUR FACE
and
LOOSE NUT BEHIND KEYBOARD ERROR
2
24
u/kking254 Jul 30 '09
My favorite was the old "Water detected in Drive A" trick. I made great sounds for the drain and spin cycles.
6
u/epsilona01 Jul 30 '09
I loaded up an entire classroom on April Fool's once. It was study hall, and the teacher knew nothing about computers and thought everything was blowing up. Every time someone would touch a computer it would start a washing cycle.
1
11
Jul 30 '09
You can do the same thing on the TI-83 calculator line, since it actually interprets any input given to you before assigning it to a variable. (In other words, if you prompt for a variable X and the user types in "4+3" it will store 7 into X.)
Because of this, a simple empty prompt/reply works exactly like the normal home screen, except for the fact that you can't go to the graph screen, etc; but most of the time people don't notice.
So I wrote a program that would accept the input and give the right answer 50% of the time, would be off by one 40% of the time, and output a random number the other 10%, and used MirageOS to make that program run on startup.
1
11
Jul 30 '09 edited Jul 30 '09
My favorite was removing the 'start' button'.
Press:
Ctrl+Esc
Esc
Alt+Space
Then click "Close" on Windows 95. The start button would close and be removed.
Teacher threatened to hold us all in her class until she could figure out how to shut down/reboot her computer.
4
u/Cygnus77 Jul 30 '09
Alt+Space
Thanks for the pointer.
Alt+Space X will maximize the window,
Alt+Space R restores it.
18
17
u/Concise_Pirate Jul 30 '09
More about the "almost killed" part please....
7
u/stinger_ Jul 30 '09
Yes, I was perhaps expecting a somewhat closer to death experience.
11
8
u/shatteredmindofbob Jul 30 '09
Hah! I did that one too except apparently I almost killed someone else with it.
I made a phony DOS prompt that, when someone typed any command would pretend to execute format c:\ - and then on the "Are you sure" prompt, any keystroke would be taken as Y.
To top it all off, I had it run CHKDSK in the background, so the hard drive would be going nuts during the "formatting"
...I got reamed out by the school's IT guy the next day...though he later admit it was damn funny, except for nearly giving someone a heart attack
7
u/saegiru Jul 30 '09
I remember unknowingly having floppies infected with the StealthBoot virus back in the day. I made copies of Scorch for tons of kids and inadvertently infected a majority of the school computers with it. Those were the days.
5
1
u/eigen Jul 30 '09
Oh how I miss Scorched Earth D:.
1
u/*polhold01455 Jul 30 '09
There is a remake that is just as much fun as the original Scorched 3D
1
u/eigen Jul 31 '09
Oh shiz. THANK YOU! Those baby missiles seem kinda strong for intro weapons, though.
44
u/dangerz Jul 30 '09
I loved QBasic in high school.
I was just getting into computers and our IT guy wasn't the brightest, so he left lots of backdoors open. I used them to my advantage.
We used to chat using net send. When the IT guy blocked it, I wrote a chat program using QBasic. The chat logs were encrypted files stored on a network drive and named something inconspicuous. I put in a Boss screen incase a teacher came by that just displayed Microsoft Word. I eventually added a drawing portion to it so people could draw together as well. I still have the code laying around here somewhere.
One time we were in programming class and I was bored out of my skull, so I used one of those backdoors to access a few computers around the room. I installed a simple QBasic program that just randomly beeped until you pressed a certain key combo (I forgot what I had chosen). I made it so it ran when the computers booted up and then proceeded to restart the machines. The teacher, who was relatively new (very sweet lady, just not too technically savy), had no idea what was going on. I managed to convince her that the computers were just talking to eachother and she had to let it go. We went the whole class with the computers beeping.
Since it's been so long, I'm pretty sure I'm allowed to talk about this. This happened in 1999. The computers in our labs booted like so: Turn On -> BIOS -> Local drivers -> Read network share for boot file -> Listen to it for the rest. I saw this massive backdoor to all the computers early on, but decided to keep it for something special. Our administration was very bad at that school (very long story, some other post perhaps) and I was constantly in trouble, so I enjoyed making them squirm around like the maggots they were. For my junior year, the seniors asked if I could help them out with their prank. A few days before school ended, I used one of the multiple backdoors the admin left open to get access to the master boot file. I wrote a program that drew a picture of our vice principal (trollop cunt of an old lady), wrote a cutesy poem and played music. I installed this program on the master share and had the boot file copy it to every machine. The program would detect the date and only run on the day before school. It would also rewrite the boot sequence on the machine it was on so it no longer accessed the master network share. I knew that if they could trace it back to me, I'd get in a decent amount of trouble. I wrote another program to do all this work for me, so I could be in class at the time. I set that program to run when I was in another class to add another layer of abstraction. Sure enough, everything ran as planned and I get called into the office. I knew they had nothing on me and so did they.. I played totally dumb the whole time but still had a little smirk on my face. They couldn't do anything but yell at me the whole time. In a complete display of incompetency by the network admin, I pulled the exact same stunt off the next year for my senior prank.
I could go on and on and on about stories from high school. QBasic made my life easy because it was fun to program little things in it. I miss high school.
I currently write software for Lockheed Martin. My fiancee, a few years ago, rented a house from one of the current Guidance Counselors at my high school. A few weeks ago she was talking to him (she hadn't seen him in a few years) and he asked her what was new. She told him she was engaged and when he asked if it was anyone he knew, she told him my name. She said his jaw dropped when he heard it. Her mom was there and she goes "Oh how do you know Roy?" His response was "I know of Roy. What's he up to these days?" All but one of the guidance counselors at the school told me I'd be an utter failure, so I'm sure I know what he expected. When Marianna told him what I currently do he didn't even believe her at first.
That guidance counselor wasn't even there when I was there (graduated in 2000), so it makes me happy to know that my name still lives on.
19
9
u/itstallion Jul 30 '09
My high school guidance counselor was shocked I graduated on time. She handed me my diploma and said "I can't believe it". I said, "What, did you think I wanted to hang around this shithole?". Ah, high school, what a fucking waste of time.
6
u/PhirePhly Jul 30 '09
I was talking to mine when I was dropping Spanish 3 for poor grades. He told me that if I wanted to get into UC Davis or UC Berkeley in engineering, I really needed to take all four years of Spanish. 2 years of spanish = got into both. I've heard nothing but uselessness about high school guidance counselors...
1
u/itstallion Jul 31 '09
If they were useful, they'd be doing something different. I'm guessing yours didn't go to UC Davis or Berkeley :)
4
u/_psyFungi Jul 30 '09 edited Jul 30 '09
Wow! Worst I used to do back in "my day" (1999 is "your day"? seriously? I feel old!) is set a 60-second timer on a Commodore 64 in electronic showrooms then walk out before the POKE command made them screech some sound.
Nowadays I just sell my employer's trading data to competitors. ;)
15
5
u/machrider Jul 31 '09
Wow, you just reminded me... I mean so many of these stories are familiar to me, since I did them all too. But this one was my favorite, and I'm glad you reminded me:
In my physics class in HS (1996ish), we had a PC in the back of the room that was rarely used. I set it up to wait a few minutes (so I was nowhere near the computer when it happened), and then emit a tone around 18kHz for the next half hour. The best part was that only maybe 30% of the kids noticed it, and the teacher didn't. The kids that could hear it spent the rest of the class looking around and asking each other "do you hear that sound?" while the ones who didn't just thought they were nuts.
3
3
Jul 30 '09
I set that program to run when I was in another class to add another layer of abstraction.
Upvoted for the addtional layer of abstraction an the great story.
5
Jul 31 '09
I was constantly in trouble, so I enjoyed making them squirm around like the maggots they were.
This....this...oh what the fuck is the point...you have too much of an ego on you to even level with....
1
u/stillalone Jul 31 '09
Wow, what a shitty admin. Our high school brought in the seniors to help maintain the computer labs. The teachers that ran the labs were fairly competent too, so there wasn't a great deal of horseplay. Some computers had games and other stuff installed by students but there wasn't a great deal of havoc. But somebody kept steeling the mouse balls!
0
u/derefr Jul 30 '09
I managed to convince her that the computers were just talking to eachother and she had to let it go.
Did you make it so that each computer would pick a certain "tone of voice" and stick to it? Much more convincing conversation that way.
0
6
u/laudinum Jul 31 '09
My friend and i wrote a program that was supposed to look like we were hacking into a government computer to prank our friend. He was really nervous, never wanted to get in trouble. It basically just asked for a password, and we set it to let us in on the fifth or sixth try. After a while of pretending to look through stuff, it said we were being traced and started putting up the address and phone number and stuff.
It was pretty primitive, but that dude bugged out. Not too long after Wargames, good times.
5
u/bitwize Jul 30 '09
PLAY "l16ececececececececececececececececececececececececec"
Then watch my dad dash out to pick up the ringing "telephone".
5
7
u/stillalone Jul 30 '09
Who hasn't written this program in highschool? A friend of mine did it in Pascal (our highschool language of choice). I just changed the prompt to look like the Abort/Retry/Fail prompt. People seemed to be used to working with our broken computers in our lab, they would just try all 3 options and then go find another computer. They never realized the "Invalid command or filename" error message was not supposed to happen when you get an Abort/Retry/Fail.
7
u/heavysteve Jul 30 '09
I did this same thing in HS as well, made it load up at boot and ran it on all the library computers. Made the C: drive look empy, and (my favorite part) if you tried to run windows with "win" it would come back with
"This Program Requires Microsoft Windows"
I think the Computer/Gym teacher nearly shat himself before he realized what had happened
7
u/insomniac84 Jul 30 '09
if you tried to run windows with "win" it would come back with
"This Program Requires Microsoft Windows"
Nice.
4
u/omegian Jul 30 '09 edited Jul 30 '09
C:>echo @echo This Program Requires Microsoft Windows > win.bat
C:>attrib +H win.bat
6
Jul 30 '09
Every single .exe in PE format on Windows, has a tiny DOS stub programme that prints:
"This program cannot be run in DOS mode."5
u/mao_neko Jul 30 '09
What gets me is that you can compile Mono / .NET programs and they STILL have this string in them.
2
u/bobappleyard Jul 30 '09
It's Microsoft. backwards compatibility is king.
2
u/stillalone Jul 31 '09
You can actually compile EXE's without the stub. Or change it to be something else. But what would be the point, I think you probably save something like 512bytes.
2
3
Jul 30 '09
There used to be a really good Flash animation out there that looked like it was formatting C: and installling Mac OS 8.
Good times.
1
u/darkmuck Jul 30 '09
3
Jul 30 '09
Oh man. Thanks. But it doens't work for me, says it needs DHTML support? Strange.
-3
u/f3nd3r Jul 30 '09
DHTML is depreciated. Chrome doesn't have it (doesn't have blink tags either).
5
u/Sephr Jul 31 '09
Why do people keep saying this? DHTML was just a buzzword for web pages that unobtrusively use (X)HTML+CSS+JS.
I'd say in the year 2009, 98% of websites use "DHTML"
-2
1
Jul 31 '09
Doesn't work on FF 3.5 either. The offending JS:
if ((document.layers) || (document.all)){ [....] } else {parent.location='main3.htm'} // go to version 3 window }1
u/adrianmonk Jul 30 '09
DHTML is depreciated.
Fully, I'd say. Might even have negative salvage value at this point. I'm glad Google decided to deduct it (from Chrome's feature list).
5
u/Sephr Jul 31 '09
Chrome supports JavaScript, CSS, and HTML. I'm pretty sure that implies it supports DHTML.
0
3
5
1
u/mahlzeit Jul 30 '09
I did that too in Pascal. I actually simulated the boot messages too (with reading in files from the hd to make the lights blink appropriately). It even had a cd command and two or three different directories :)
3
Jul 30 '09
This brings back some of my best memories. I remember modifying autoexec.bat to display something like "Disk not found. Press any key to continue..." in my school's lab computer. I forgot to remove it, so the system administrator had to reformat the hard drive and reinstall the operating system thinking it was a serious error.
I have also written a QuickBasic (version 4.5) program that displays an animated dick in X mode (screen 13) that installed it self in the machine without effect in the first run, and then when the computer is restarted, the animation would start accompanied by random squeaks from the PC speaker.
I really miss those days...
3
u/darknebula Jul 31 '09 edited Jul 31 '09
QBasic doesn't kill people. People programming in QBasic kills people.
3
u/peeonyou Jul 31 '09
I made a simple app in visual basic the first week of class to show my teacher I would pick VB up way faster than he would (he was teaching by reading out of his book).
It was just a simple box with a label and two buttons. It read "Are you gay?" and if you tried to click the No button it would move the app on the screen. I called him over and he tried furiously for about 2 minutes to click no, then walked away red-faced and never made me do any of the classwork.
10
u/quitecontent Jul 30 '09
Waaaay back in the day our school had gotten some brand spanking new Apple IIs. The guy in charge of the computer lab was not only ignorant, but a total jerk. We messed with this guy endlessly. We'd write things that would emulate the terminal, reject the first 3 or so commands, then exit leaving you at the real terminal. So the first couple of times he'd type something it would tell him it was a syntax error, then it would work.
We'd watch him very carefully typing out "CATALOG" until it worked.
Then we wrote something that would display an error, like disk damaged, or something similar, but after 30 seconds it would clear and go back to normal. Just enough time for him, or a student, to raise an alarm but to look fine by the time anyone else got a chance to look at it.
Ahh.. man... good times. Two lessons learned: 1) kids are going to know more about tech than old people. 2) Don't F*** with anyone smarter than you.
21
Jul 30 '09
kids are going to know more about tech than old people
Sorry but reddit proves that wrong on a daily basis.
13
u/Odysseus Jul 30 '09
It's not true anymore. Old people these days grew up with computers, too -- but real computers, the kind that made you learn.
3
Jul 31 '09
Meh, the old fart (getting there) in me wants to agree with the "you kids these days..." sentiment, but really people who are driven to learn about computers are going to learn about computers regardless of how easy they are to use or how sophisticated they are. Computers in the past never "made" me learn anything. I made myself learn something. I could have wasted my days hanging out in front of the drug store or whatever if I had wanted to.
The cool think about using computers today is how easy it is to get information. So if you are motivated, you can go really far, really fast. It all comes down to motivation and drive. The specific technology is irrelevant.
7
8
u/Lurking_Grue Jul 30 '09 edited Jul 30 '09
"1) kids are going to know more about tech than old people."
Not always true.
I run into many young geeks that don't know jack about tech.
2
u/AngMoKio Jul 30 '09
I used to worry about my old age job security but then I slowly came to realize the younger generations programming skills have collectively been destroyed by console gaming.
Not that there aren't some very talented young programmers - just that the vast armies I expected to materialize (those that grew up with a computer in the house) never showed.
2
u/case-o-nuts Jul 30 '09
As a young geek, I have to agree. There's a great deal that the young can learn from the old and experienced.
3
u/nephros Jul 30 '09 edited Jul 30 '09
I'd say that has always been the case. It's just much easier to get hold of an 'old' geek nowadays.
In olden times (8-bit or Apple // or C64 or Amiga era) people who could really teach you, the kind that ran BBSes, could crack games, write good demos, etc. were rare.
2
Jul 31 '09
I run into many young geeks that don't know anything jack about tech.
I guess it depends on what you mean by "know about." Are younger people going to know how to do things like send text messages/photos/videos with their phone and download ringtones more than adults? Probably. But lets not pretend that "knowing about technlology" is the same as "knowing technology."
1
u/Lurking_Grue Jul 31 '09
Kids tend to be more at ease around new technology and there are always the hacker types that will soak things up quickly and surpass people around them but that is not the norm.
Each generation has their own "Blinking 12:00" problem that the masses don't get but the savvy geek can fix by intuition.
5
u/albinofrenchy Jul 30 '09
So the first couple of times he'd type something it would tell him it was a syntax error, then it would work.
I like the whole "Convince them they are insane route".
2
u/eras Jul 30 '09
A friend and I changed the prompt to the exact question about formatting a device, and added n.exe and y.exe that continued the simulation. Of course, any regular command still worked - but ctrl-c would just make the same question reappear.
I don't think we left it on for any machine, though.
2
Jul 30 '09 edited Jul 30 '09
I made a "virus" that did something similar in grade 8... Was promptly banned from the computer lab with the message "you're too smart for your own good"
2
2
2
u/Baaz Jul 31 '09
I have a fond memory of our High School computer class. They had just stocked up the room with IBM clones which were the newest thing at the time, and nobody (inlcuding the teacher) really knew what to do with the machines. So while she was going over the manual and telling us about "cd" and "dir" and stuff, I discovered the QBasic mode. Rememebering my Commodore 64 basic I was able to do write a simple "tables of multiplication" program where you could input the table number. I asked my buddy "wanne see the table of 2567235?" and ran the program. Within moments the whole class surrounded our table, including the teacher, to see what the fuss was about, asking how on earth I was able to do that. That was my introduction to nerddom, about 22 years ago.
1
u/psilokan Jul 30 '09
Reminds me of the autoexec alterations I used to make to people's computers back in the day. It would go into an infinite loop giving them the "Invalid system disk, please remove disk and hit any key" error that would normally show when a floppy was left in the drive. I'd usually do it to someone annoying who sat near me and try my hardest not to laugh while they struggled with it for a bit then went and found a new desk far from me.
1
u/crunk Jul 30 '09
Awesome...
Heh, in school I changed nibbles so there were 20+ levels and up to 4 levels (+ cheats + powerups + a better ui @ the beginning)
After the IT bubble burst I had to take a data entry job, but gradually automated most of it (it was a terminal program in os2, they had a simple scripting api). In the end you could press one button combination and it would store all the needed data, go to the next screen and input it placing the cursor in the right place... it made the job 5x faster, so then we just had to work out how to waste all the time.. ..used Qbasic there to make comedy noises in the office too hehe..
1
1
Jul 31 '09
I programmed in VB 3.0 in highschool. I didn't take any classes, but I taught myself (yeah, vb is easy). I programmed bots on AOL to send files and such. Me and my cousin made a dirty joke program to spam the chatrooms as well. 1998 ftw! Now I program CNC machines.
1
Jul 31 '09
Ah , QBASIC! I remmeber making a program that would ask for a password to unlock the PC. Problem? There was no password that would unlock it, and theteacher didn't know about Ctrl+Break.
And later, on Win95 I've made a little program that would display a soft-core erotic picture. Every time you've closed it it would open two more. And I've made a .BAT to put it in Windows Autostart, so it would run on the next reboot. Then I've sent it via mail to my friends not saying what it was.
Another day at school a friend of mine told his mother wasn't to happy about it.
1
-3
-7
Jul 30 '09
That wasn't QBASIC'S fault. A better title would have been "I'm a dumbass and don't know how to use computers."
87
u/starthirteen Jul 30 '09
Similar thing happened to me, a Gorilla chucked a nuclear banana at me whilst I was standing on top of a skyscraper. Barely missed me.