Implemented ComputerCraft can't communicate to pastebin

Discussion in 'The Dark Trilogy' started by LucidTheStick, Dec 15, 2014.

  1. LucidTheStick

    LucidTheStick Well-Known Member

    Messages:
    3,143
    Likes Received:
    1,327
    Local Time:
    5:27 AM
    Asked several people and confirmed that pastebin is not working on turtles or computers. Can't put or get.
     
  2. Lawmonark

    Lawmonark Well-Known Member

    Messages:
    2,558
    Likes Received:
    770
    Local Time:
    11:27 AM
    -snip
     
    Last edited: Dec 17, 2014
  3. LucidTheStick

    LucidTheStick Well-Known Member

    Messages:
    3,143
    Likes Received:
    1,327
    Local Time:
    5:27 AM
    It works fine on Modsauce which is 1.7. I'm guessing pastebin isn't whitelisted.
     
  4. SirWill

    SirWill Founder

    Messages:
    12,284
    Likes Received:
    3,708
    Local Time:
    11:27 AM
    Dark Trilogy config:
    Code:
    	# A semicolon limited list of wildcards for domains that can be accessed through the "http" API on Computers. Set this to "*" to access to the entire internet. Example: "*.pastebin.com;*.github.com;*.computercraft.info" will restrict access to just those 3 domains.
    	S:http_whitelist=*.pastebin.com;*.github.com;*.computercraft.info
     
  5. BookerTheGeek

    BookerTheGeek Patron Tier 3

    Messages:
    3,257
    Likes Received:
    1,097
    Local Time:
    4:27 AM
    do we need the "quotes" around that?
     
  6. Xfel11

    Xfel11 Consultant

    Messages:
    635
    Likes Received:
    157
    Local Time:
    11:27 AM
    What will actually happn if you type the command?
     
  7. LucidTheStick

    LucidTheStick Well-Known Member

    Messages:
    3,143
    Likes Received:
    1,327
    Local Time:
    5:27 AM
    Thanks for looking. What is the below option set to? I will try with another of the listed sites tonight to see if maybe it's on pastebin's side.

    # Enable the "http" API on Computers
    B:enableAPI_http=true
     
  8. SirWill

    SirWill Founder

    Messages:
    12,284
    Likes Received:
    3,708
    Local Time:
    11:27 AM
    It's enabled
     
  9. LucidTheStick

    LucidTheStick Well-Known Member

    Messages:
    3,143
    Likes Received:
    1,327
    Local Time:
    5:27 AM
    http.get will pull pastebin and the other sites. Pastebin may have the IP banned for too many pulls. Would it be possible to get hastebin.com added to whitelist?
     
  10. SirWill

    SirWill Founder

    Messages:
    12,284
    Likes Received:
    3,708
    Local Time:
    11:27 AM
    added with the next restart
     
    JavaBond likes this.
  11. LucidTheStick

    LucidTheStick Well-Known Member

    Messages:
    3,143
    Likes Received:
    1,327
    Local Time:
    5:27 AM
    Thank you! You guys rock!
     
  12. JavaBond

    JavaBond Well-Known Member

    Messages:
    108
    Likes Received:
    14
    Local Time:
    7:27 AM
    Nice :)
     
  13. LucidTheStick

    LucidTheStick Well-Known Member

    Messages:
    3,143
    Likes Received:
    1,327
    Local Time:
    5:27 AM
    edit:
    Ok I got pastebin working by using www. Not sure why the default pastebin isn't working. Can we add pastebin.com (along with *.pastebin.com entry) to whitelist for testing?


    For testing here is the code..

    Code:
    http.request("http://www.pastebin.com")
    
    local requesting = true
    
    while requesting do
      local event, url, sourceText = os.pullEvent()
    
      if event == "http_success" then
    	local respondedText = sourceText.readAll()
     
    	sourceText.close()
    	print(respondedText)
     
    	requesting = false
      elseif event == "http_failure" then
    	print("Server didn't respond.")
     
    	requesting = false
      end
    end
    [DOUBLEPOST=1418694089,1418692746][/DOUBLEPOST]Confirmed! It's the . on .pastebin. Looking at Crackpack here is what it is..
    Code:
    S:http_whitelist=*pastebin.com;*computercraft.info
    Can we remove the . on pastebin in current whitelist?
     
    Last edited: Dec 16, 2014
  14. Bennyboy1695

    Bennyboy1695 Well-Known Member

    Messages:
    1,888
    Likes Received:
    498
    Local Time:
    10:27 AM
    This has been fixed now , marking post as done
     
  15. SirWill

    SirWill Founder

    Messages:
    12,284
    Likes Received:
    3,708
    Local Time:
    11:27 AM
    That would also allow sites like blablubpastebin.com Not sure if this would be a security risk. @Slind14 what do you think?
     
  16. Bennyboy1695

    Bennyboy1695 Well-Known Member

    Messages:
    1,888
    Likes Received:
    498
    Local Time:
    10:27 AM
    The dot has been removed and they now work so it's obviously up to you if you keep it as that or not but I'd just thought I'd tell you how it was fixed
     
  17. LucidTheStick

    LucidTheStick Well-Known Member

    Messages:
    3,143
    Likes Received:
    1,327
    Local Time:
    5:27 AM
    Can also edit computercraft to make default pastebin program use www. instead of pastebin.com
     
  18. Slind

    Slind Founder

    Messages:
    8,332
    Likes Received:
    3,018
    Local Time:
    11:27 AM
    depends on the programs that get downloaded. but they could also be rewritten, so it doesn't much a too big difference.
    computercraft is closed source
     
  19. LucidTheStick

    LucidTheStick Well-Known Member

    Messages:
    3,143
    Likes Received:
    1,327
    Local Time:
    5:27 AM
    Just a thought if you wanted to go with that method...

    Open the .jar with 7-zip
    Navigate to \assets\computercraft\lua\rom\programs\http\
    Edit pastebin file located in there
    Find and Replace all "pastebin.com" references to
    Code:
    www.pastebin.com
    WARNING: Have not tested this on a server if it rejects clients after change or if it even works.
     
  20. Slind

    Slind Founder

    Messages:
    8,332
    Likes Received:
    3,018
    Local Time:
    11:27 AM
    ohh thanks
     

Share This Page