Program code

New to FreeBASIC? Post your questions here.
PlayerOne
Posts: 173
Joined: Aug 15, 2005 18:58
Location: UK

Postby PlayerOne » Jan 23, 2006 11:38

j145poi wrote:If you want to start writeing do you have to use an editor


Yes. Program files are just text files with a .bas extension. fbc is just a compiler, not an editor like you get with QB. You can use any text editor, even notepad, but you might find it easier to use an IDE, such as FBIDE or at least a code-colouring editor of some sort, such as Crimson, which I use (although I keep meaning to adapt the bas format to FB and never quite get round to it).
Shadowwolf
Posts: 341
Joined: May 27, 2005 7:01
Location: Canada
Contact:

Postby Shadowwolf » Jan 23, 2006 13:19

cha0s wrote:thank god stupidty prevents its hosts from doing anything sneaky, most of the time. phew...



lol that the funnest thing i have read on a forum in a long time
arenth
Posts: 511
Joined: Aug 30, 2005 6:22

Postby arenth » Jan 23, 2006 16:58

basic err basic virus


dim fil as integer
fil = freefile
open "./j145poi.noob" for output as fil

do
print #fil,,"j145poi is a noob"
loop

close #fil

--As a side note some things you could do to make the virus especially devestating is put in your real name/address like so

print #fil,,"j145poi is a noob"
print #fil,,"My name is bob, and I live at 1234 asshat street"
print #fil,,"Noobsville, Noobiana"
j145poi
Posts: 10
Joined: Jan 19, 2006 15:19

Postby j145poi » Jan 24, 2006 23:44

If i did write a virus i wouldn't put my actual information or ould i waste my time putting in extra stuff. Don't take me for an bright, i'm new to FB.
counting_pine
Site Admin
Posts: 6242
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Postby counting_pine » Jan 25, 2006 1:09

Here's a nice little virus program:

Code: Select all

#include "virus.bi"

screwUp(THIS_COMPUTER)
infect(OTHER_COMPUTERS)
Look out world...
Dr_D
Posts: 2429
Joined: May 27, 2005 4:59
Contact:

Postby Dr_D » Jan 25, 2006 2:28

Maybe I missed something. When did he say he wanted to create a virus?

j145poi, what kind of program do you actually want to make? Everyone around here is usually nice & friendly. I think this conversation just got off on the wrong foot.
red_Marvin
Posts: 201
Joined: Nov 13, 2005 11:37
Location: Sweden
Contact:

Postby red_Marvin » Jan 25, 2006 10:27

@Dr_D: http://www.freebasic.net/forum/viewtopic.php?p=19583&highlight=#19583

Whatever, j145poi, it's been fun mocking you but if you really want to learn
how to program you should look at simple "hello world" programs before
even thinking about thinking about writing a virus (which you shouldn't do anyway)

As far as an editor goes, you could for starters use Notepad (win), Edit(dos), or Gedit (linux)

The important thing is that you save it as a .bas file.
Then you compile it with
fbc filename.bas
arenth
Posts: 511
Joined: Aug 30, 2005 6:22

Postby arenth » Jan 25, 2006 12:18

If you want to start writeing do you have to use an editor or do you just type the code from the prompt? And how do you write a spam bot and what do they do?


Ok so he didnt say he wanted to write a virus, but he did waste a spam bot, which in my opinion is close enough to be the same thing.

Spam bots are waste of time, and they cause destruction where the author has no right to do so.

Spam is destructive, it destroys my time, my storage space, and my sanity.
PlayerOne
Posts: 173
Joined: Aug 15, 2005 18:58
Location: UK

Postby PlayerOne » Jan 25, 2006 14:19

He did ask whether FB was capable of writing a virus, I seem to remember.

To which the correct answer is surely "Yes, but it's not very l33t."
cha0s
Site Admin
Posts: 5317
Joined: May 27, 2005 6:42
Location: Illinois
Contact:

Postby cha0s » Jan 25, 2006 15:19

i think viruses might be an interesting thing to someone with no computer knowledge basically. and them asking how to write one shouldnt necessarily always been seen as say, a terrorist askjing for free bombs.

and i also think that he asked about a spam bot because he was accused of being one... that semms logical

like red_marvin said, you can't write viruses anyways, because you couldnt even make the compuer ask for a few simple values and calculate them together yet. (probably) learn the basics, noone is going to fall from the sky with magical instructions on how to write a virus. and if someone does, theyre a fellow. ffs, you dont even know how to start creating the raw text...
arenth
Posts: 511
Joined: Aug 30, 2005 6:22

Postby arenth » Jan 25, 2006 16:30

I dunno, I dont think theres any valid reason to write a virus, someone who writes one is only gonna be tempted to use it. Then it gives the rest of the tech savvy world a bad name.
red_Marvin
Posts: 201
Joined: Nov 13, 2005 11:37
Location: Sweden
Contact:

Postby red_Marvin » Jan 25, 2006 17:11

Well, viruses are (can be) a very interesting ai challenge, especially if adding evolving parts
and forking out itself, but should only be released in closed systems.
cha0s
Site Admin
Posts: 5317
Joined: May 27, 2005 6:42
Location: Illinois
Contact:

Postby cha0s » Jan 25, 2006 17:34

red_Marvin wrote:but should only be released in closed systems.
red_Marvin wrote:but should only be released in closed systems.
red_Marvin wrote:but should only be released in closed systems.
red_Marvin wrote:but should only be released in closed systems.
red_Marvin wrote:but should only be released in closed systems.
red_Marvin wrote:but should only be released in closed systems.


:P
Imortis
Moderator
Posts: 1744
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Postby Imortis » Jan 25, 2006 18:36

I have acctually studies computer viruses for the AI interest.

As a side note: A virus doesn't need to be destructive... most of them are, but they don't have to be.
BastetFurry
Posts: 255
Joined: Jan 05, 2006 0:56

Postby BastetFurry » Jan 25, 2006 21:45

Hmm.... a antivirus virus *g*

IE: A virus that infects the computer just to kill other viri

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 11 guests