[1.7.10] fix computercraft pastebin

Discussion in 'Tutorials, Tips and Tricks' started by p5k, Jan 20, 2022.

  1. p5k

    p5k Well-Known Member

    Messages:
    247
    Likes Received:
    205
    Local Time:
    7:26 PM
    On 1.7.10 computercraft pastebin seems to be broken, as the raw url was changed. This can be fixed quite easily within the computer:

    Code:
    copy rom/programs/http/pastebin pastebin
    edit pastebin
    
    Go to line 24 and change
    Code:
    "http://pastebin.com/raw.php?i="..textutils.urlEncode( paste )
    to
    Code:
    "https://pastebin.com/raw/"..textutils.urlEncode( paste )
    After that, pastebin get should work on that computer.
    There may be a way to apply this server-wide.
     
  2. BookerTheGeek

    BookerTheGeek Patron Tier 3

    Messages:
    3,257
    Likes Received:
    1,097
    Local Time:
    12:26 PM
    This can be added to the launcher so that it is automatically fixed for everyone using the MyM launcher

    Place THIS in the Minecraft installation directory's "resourcepack" subfolder and restart the game. MyM will also need to put it in place within the server's installation directory also and restart the server.

    This is from the CC Forums as a fix, listed here


    EDIT: Outdated it seems.

    1. Open computer
    2. open lua
    3. paste the following and hit enter
      • Code:
        local r = http.get("https://pastebin.com/raw/jCfCfBPn"); local f = fs.open( shell.resolve( "pastebin" ), "w" ); f.write( r.readAll() ); f.close(); r.close()
    4. Fixed
    This is from a YouTube video, and I've used it for as long as this issue has been around.
     
    Last edited: Jan 20, 2022
  3. p5k

    p5k Well-Known Member

    Messages:
    247
    Likes Received:
    205
    Local Time:
    7:26 PM
    This one is outdated as well. Note that it uses http and not https, so it doesn't work, though it could easily be adapted
     
    BookerTheGeek likes this.
  4. BookerTheGeek

    BookerTheGeek Patron Tier 3

    Messages:
    3,257
    Likes Received:
    1,097
    Local Time:
    12:26 PM
    Updated my post.
     
  5. p5k

    p5k Well-Known Member

    Messages:
    247
    Likes Received:
    205
    Local Time:
    7:26 PM
    here is an updated version that i made
    EDIT: pastebin put is now also fixed
     
    Last edited: Jan 27, 2022

Share This Page