TPT file transfer v2

  • mniip
    1st May 2012 Developer 3 Permalink
    This is a new version of my tpt file transfer, it works in 78.0b and later since there is a new save format - OPS
    It is much easier to use, just load the script (dofile,require or autorun)
    to upload type upload()
    to download type download()
    follow the steps and it works
    download script here,
    http://pastebin.com/9hjSvfVT
    it can store up to 3.3 MB in a save
    any feedback is welcome
  • Simon
    1st May 2012 Administrator 2 Permalink
    Just a warning: If you publish saves made from this tool, you will be banned.
  • mniip
    1st May 2012 Developer 0 Permalink
  • darkhog
    2nd May 2012 Member 1 Permalink
    Simon, why?
  • R3APER
    2nd May 2012 Member 0 Permalink
    @Simon (View Post)
    Why would this be punishable by ban if used? Can you exactly explain what this does anyways? I'm not fully understanding what this does.
  • boxmein
    2nd May 2012 Former Staff 0 Permalink
    @R3APER (View Post) @darkhog (View Post)
    Well.. He may not want people to use the code to use TPT's saves as a file uploading site.
  • jacob1
    2nd May 2012 Developer 0 Permalink
    @mniip (View Post)
    Maybe you can make it so that it only will upload and run lua scripts, and then use a lua sandbox. I think that would get rid of the only two reason Simon wouldn't allow this, because the server wouldn't be filled with saves that have downloads of random things, viruses, or lua viruses. I have an example of a lua sandbox at the bottom of luaconsole.c on github, you could probably find it online easily too. I only made a few changes from what I found.
  • R3APER
    2nd May 2012 Member 0 Permalink

    boxmein:

    @R3APER (View Post) @darkhog (View Post)
    Well.. He may not want people to use the code to use TPT's saves as a file uploading site.


    Sorry for being naive but what exactly would happen if you used this for files? It would take up space?
  • jacksonmj
    2nd May 2012 Developer 0 Permalink
    @R3APER (View Post)
    It's a lua script to embed arbitrary binary data inside particle properties. It could be used to store files inside TPT saves.

    The server is for sharing things made in Powder Toy, not for sharing images or other random files. That is why uploading saves made using this script is not allowed (and why image plotting is not allowed in uploaded saves either). It takes up space, and is not the intended purpose of the server.
  • mniip
    3rd May 2012 Developer 0 Permalink
    @jacob1, I know how to sandbox, and btw your sandbox isn't perfect

    so, I think I'm going to reprofile it for attaching lua scripts