Getting a client to run "jpeg"?

I see that running jpeg is blocked through lua, but is there any way to get them to save a screenshot?
I would even delete the screenshot when I’m done with it.

I’ve tried pl:ConCommand() from the server, and RunConsoleCommand from the client.

http://luabin.foszor.com/code/gamemodes/sandbox/entities/weapons/gmod_camera/shared.lua#71

I just doesn’t work.
No error, not blocked, just doesn’t write the file…

] lua_run_cl RunConsoleCommand(“jpeg”)
Wrote ‘screenshots/gm_flatgrass0001.jpg’: 3.89 MB (1440x900) compresssed (quality 90) to 268.38 KB

The file is written. It works perfectly fine for me.

Pl:SendLua([[hook.Add(“Think”, “lololololol”, function() RunConsoleCommand(“jpeg”) end)]])

Lol.

ply:ConCommand(“wait 1;jpeg”) ?

[editline]11:23AM[/editline]

Wrote ‘screenshots/gm_flatgrass0005.jpg’: 5.29 MB (1680x1050) compresssed (quality 90) to 415.47 KB

Why do you need wait 1, did it not work without it?

you know that FCVAR SERVER_CAN_EXECUTE shit

Well I did see that it does work with lua_run_cl, but nothing seems to be happening in the script sent by the server to the client.
I do know that the script is running and that the command is being called.

Hold on, trying wait 1.

[editline]02:32AM[/editline]

K, now I’m having trouble with the jpeg.
Does file.Read work to get the pure text content of a jpeg?
Or am I dumb…

[editline]02:35AM[/editline]

Ok, doesn’t work, nevermind.

Is there any other way to transfer a jpeg to the server?

I don’t see a way without making it complicated.

You could use http.Get() to upload it, you would have to know the exact path of the file. I’m sure there is a function for it though. Look around on the wiki you should be able to find it.

What is this turning into? Taking screenshots of suspicious clients to see if they’re wallhacking? Clients will just use “alias jpeg; alias screenshot” to block it.

Unless they don’t know about it.

It’s really just for one client, and even if I get one screenshot of him, that’s alright.

No, you can’t. Images are sent using multipart-formdata (or whatever) and can’t be sent over http.Get without a browser encoding the request.

[editline]03:05PM[/editline]

Of course, if you wanted to make it work, I’m sure the HTML panel’s iexplore rendering will accept the <input type=“file”> HTML code. Worth a shot for anyone willing.

Then it’s just FCVAR_ARCHIVE that’s not working, since it doesn’t save the vars in config.cfg.

I think you’re looking for this thread.

[lua]
RunConsoleCommand(“jpeg”, “hax”)
http.Get(“myimageupload.com - This website is for sale! - my image upload Resources and Information.”))
[/lua]

You were saying?

Congrats, you found the path to the file. Now the image host will hack into your harddrive to upload the file.

Fail. Must have gotten my FireFox tabs mixed up.

Just wondering, why exactly will a file.read of a jpeg not write properly to another jpeg?

Because then what would stop it from reading and writing other binary files.

It only works on text files, it was made that way on purpose.