Implemented ComputerCraft can't communicate to pastebin

Dieses Thema im Forum "The Dark Trilogy" wurde erstellt von LucidTheStick, 15. Dezember 2014.

  1. LucidTheStick

    LucidTheStick Well-Known Member

    Beiträge:
    3.143
    Zustimmungen:
    1.327
    Ortszeit:
    03:32
    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

    Beiträge:
    2.558
    Zustimmungen:
    770
    Ortszeit:
    09:32
    -snip
     
    Zuletzt bearbeitet: 17. Dezember 2014
  3. LucidTheStick

    LucidTheStick Well-Known Member

    Beiträge:
    3.143
    Zustimmungen:
    1.327
    Ortszeit:
    03:32
    It works fine on Modsauce which is 1.7. I'm guessing pastebin isn't whitelisted.
     
  4. SirWill

    SirWill Founder

    Beiträge:
    12.285
    Zustimmungen:
    3.712
    Ortszeit:
    09:32
    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 Well-Known Member

    Beiträge:
    3.257
    Zustimmungen:
    1.097
    Ortszeit:
    02:32
    do we need the "quotes" around that?
     
  6. Xfel11

    Xfel11 Consultant

    Beiträge:
    635
    Zustimmungen:
    157
    Ortszeit:
    09:32
    What will actually happn if you type the command?
     
  7. LucidTheStick

    LucidTheStick Well-Known Member

    Beiträge:
    3.143
    Zustimmungen:
    1.327
    Ortszeit:
    03:32
    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

    Beiträge:
    12.285
    Zustimmungen:
    3.712
    Ortszeit:
    09:32
    It's enabled
     
  9. LucidTheStick

    LucidTheStick Well-Known Member

    Beiträge:
    3.143
    Zustimmungen:
    1.327
    Ortszeit:
    03:32
    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

    Beiträge:
    12.285
    Zustimmungen:
    3.712
    Ortszeit:
    09:32
    added with the next restart
     
    JavaBond gefällt das.
  11. LucidTheStick

    LucidTheStick Well-Known Member

    Beiträge:
    3.143
    Zustimmungen:
    1.327
    Ortszeit:
    03:32
    Thank you! You guys rock!
     
  12. JavaBond

    JavaBond Well-Known Member

    Beiträge:
    108
    Zustimmungen:
    14
    Ortszeit:
    04:32
    Nice :)
     
  13. LucidTheStick

    LucidTheStick Well-Known Member

    Beiträge:
    3.143
    Zustimmungen:
    1.327
    Ortszeit:
    03:32
    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?
     
    Zuletzt bearbeitet: 16. Dezember 2014
  14. Bennyboy1695

    Bennyboy1695 Well-Known Member

    Beiträge:
    1.888
    Zustimmungen:
    498
    Ortszeit:
    08:32
    This has been fixed now , marking post as done
     
  15. SirWill

    SirWill Founder

    Beiträge:
    12.285
    Zustimmungen:
    3.712
    Ortszeit:
    09:32
    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

    Beiträge:
    1.888
    Zustimmungen:
    498
    Ortszeit:
    08:32
    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

    Beiträge:
    3.143
    Zustimmungen:
    1.327
    Ortszeit:
    03:32
    Can also edit computercraft to make default pastebin program use www. instead of pastebin.com
     
  18. Slind

    Slind Founder

    Beiträge:
    8.332
    Zustimmungen:
    3.018
    Ortszeit:
    09:32
    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

    Beiträge:
    3.143
    Zustimmungen:
    1.327
    Ortszeit:
    03:32
    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

    Beiträge:
    8.332
    Zustimmungen:
    3.018
    Ortszeit:
    09:32
    ohh thanks
     

Diese Seite empfehlen