This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
PixelToast's profile picture

problem with io library

Started by PixelToast, 02 June 2012 - 04:09 AM
PixelToast #1
Posted 02 June 2012 - 06:09 AM
so i want to find the current program that is running like: "/someprogram" i need it for my virus so it can take its own code and inject it into other programs

also having trouble with the io library, everything i try gives me a attempt to call nil
D3matt #2
Posted 02 June 2012 - 06:11 AM
No. Die in hell.
PixelToast #3
Posted 02 June 2012 - 06:17 AM
No. Die in hell.
i just wanted to make a supervirus :C, ill just have to have it scan for a infected file then use that data instead i just wanted a shortcut, updated OP
Luanub #4
Posted 02 June 2012 - 06:18 AM
you will want to use shell.getRunningProgram() to return the absolute file path for the current running program.

As far the as io attempt to call nil error, will need to see the code to try and to help with that. The first thing I would check is to make sure the file you are trying to work with is available to the computer you are working from.
D3matt #5
Posted 02 June 2012 - 06:25 AM
Don't post malicous scripts. This should also apply to jackass LulzSec fanboys who can't read the damn wiki asking for help.
Luanub #6
Posted 02 June 2012 - 06:27 AM
There's other ways to provide the code without posting it if you need help. :)/>/>
D3matt #7
Posted 02 June 2012 - 06:32 AM
You shouldn't be helping him at all. If you want to be an asshole, you can do your own research into the process. It would take all of 30 seconds of using your brain and searching the wiki to figure it out.
PixelToast #8
Posted 02 June 2012 - 06:35 AM
nevermind, i got it working for now

sorry but i was trying to track an error through some horribly awful looking obufuscated code
PixelToast #9
Posted 02 June 2012 - 06:42 AM
Don't post malicous scripts. This should also apply to jackass LulzSec fanboys who can't read the damn wiki asking for help.
You shouldn't be helping him at all. If you want to be an asshole, you can do your own research into the process. It would take all of 30 seconds of using your brain and searching the wiki to figure it out.

1. i did not post any malicious scripts and i dont plan on doing so
2. the wiki leads to the lua reference manual, that is what i have been using
3. stop calling me a jackass/asshole just because i said i was going to make a virus, i am not going to ruin your hours of figuring out how to use the print command
Luanub #10
Posted 02 June 2012 - 06:45 AM
You shouldn't be helping him at all. If you want to be an asshole, you can do your own research into the process. It would take all of 30 seconds of using your brain and searching the wiki to figure it out.

Can you explain why I shouldn't?

It's understandable why that type of content should not be publicly posted, but if he wants that type of stuff to put on his server so be it.

I think it could be fun to start a round of cyber warfare with some friends as long as it is something that is not going to damage the server.
D3matt #11
Posted 02 June 2012 - 07:03 AM
Don't post malicous scripts. This should also apply to jackass LulzSec fanboys who can't read the damn wiki asking for help.
You shouldn't be helping him at all. If you want to be an asshole, you can do your own research into the process. It would take all of 30 seconds of using your brain and searching the wiki to figure it out.

1. i did not post any malicious scripts and i dont plan on doing so
2. the wiki leads to the lua reference manual, that is what i have been using
3. stop calling me a jackass/asshole just because i said i was going to make a virus, i am not going to ruin your hours of figuring out how to use the print command
2) No it doesn't. OS, Shell, RS, etc are all CC-specific and aren't going to be in the reference manual.
3) *insert joker laugh here* If belittling my programming ability makes you feel better about your own, go right ahead.
You shouldn't be helping him at all. If you want to be an asshole, you can do your own research into the process. It would take all of 30 seconds of using your brain and searching the wiki to figure it out.

Can you explain why I shouldn't?

It's understandable why that type of content should not be publicly posted, but if he wants that type of stuff to put on his server so be it.

I think it could be fun to start a round of cyber warfare with some friends as long as it is something that is not going to damage the server.
How do I know it's for his server?

I don't mind people asking for stuff that they could've found on the wiki normally, but if you're making a virus it should be well within your ability to find it yourself. I'm sick of viruses everywhere, if you want to do that, do your own research as far as I'm concerned.

If it was some complex coding question that he'd clearly attempted himself, I'd have no problem with it. But that's not the case.

His second question, for example, is fine. On that subject, I'd suggesting using fs instead of io, but that's just me. Make sure the handle you're trying to call does in fact exist. Remember that fs.open() doesn't auto-create directories. It's hard to say what's wrong without more specific information.
PixelToast #12
Posted 02 June 2012 - 08:49 AM
-snip-
2) No it doesn't. OS, Shell, RS, etc are all CC-specific and aren't going to be in the reference manual.
3) *insert joker laugh here* If belittling my programming ability makes you feel better about your own, go right ahead.
-snip-
You shouldn't be helping him at all. If you want to be an asshole, you can do your own research into the process. It would take all of 30 seconds of using your brain and searching the wiki to figure it out.
mayby if you would actually look at the page for io then you would see that there is nothing but the reference manual and io commands missing from CC
meant the page on the wiki not the wiki itself, the wiki links to the reference manual when it is a default api

oh and the reason your saying this is because there are too many "viruses" that dont do anything and are written by noobs
trust me when this is finished it will infect a whole server in a few hours without anyone knowing anything happened
oh an remote controlling and keylogging any computer by its id is also a nice touch too
im thinking of having it target a specific id then when the virus spreads to it it sends a signal to remove itself from every ocmputer besides the target
D3matt #13
Posted 02 June 2012 - 07:06 PM
I was not talking about helping you with IO, I was talking about helping you with your original question.

You should know as well as anybody you can't infect a computer remotely without A) Some fail rednet listener or :)/>/> Exploiting the LUA VM. And your last post basically proved my point about why I really don't want you being helped.
cant_delete_account #14
Posted 02 June 2012 - 08:13 PM
I was not talking about helping you with IO, I was talking about helping you with your original question.

You should know as well as anybody you can't infect a computer remotely without A) Some fail rednet listener or :)/>/> Exploiting the LUA VM. And your last post basically proved my point about why I really don't want you being helped.
*facepalm*
PixelToast #15
Posted 02 June 2012 - 09:58 PM
:)/>/>

i need it for my virus so it can take its own code and inject it into other programs
took literally 7 seconds to understand what this meant
D3matt #16
Posted 02 June 2012 - 10:39 PM
Actually that what happens when you try to type
:)/>/>
PixelToast #17
Posted 03 June 2012 - 03:52 AM
-snip-
cant_delete_account #18
Posted 03 June 2012 - 06:06 PM
Actually that what happens when you try to type
B)
B)

Kthxbai.
PixelToast #19
Posted 04 June 2012 - 07:25 PM
Actually that what happens when you try to type
:)/>/>
:D/>/>

Kthxbai.
[acronym='just bypass the formatting by posting raw data instead of using the post editor']hacks[/acronym]