Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there simple service to store strings under my key that can be used by bots?

Requirements:

  1. Simple command line access, automatic posting allowed
  2. No need to keep some session with the service alive
  3. I choose the key (so pastebins fail)
  4. No requirement for registration/authentication (for simplicity)
  5. The string should be kept for about a month.

I want something like:

Store:
$ echo some_data_0x1299C0FF | store_my_string testtest2011

Retrieve:
$ retrive_my_string testtest2011
some_data_0x1299C0FF

Do you have ideas what should I use for it? I can only think of using IRC somehow (channel topics, /whowas, ...), but this is too complex for this simple task.

No security is needed: anyone can update my string. The task looks very simple, so I expect the solution to be similarly simple. Expecting something like single simple curl call.

share|improve this question
    
That had better not be the kind of bots I'm thinking about. –  grawity Jun 23 '11 at 19:30
    
@grawity, Bot here means the program will run on shedule (or in response to events) and change the string for that key. In my use case the even is change of Teredo IP and the action is updating content of some known key with the new IPv6 address. (workarounding dyndns). –  Vi. Jun 23 '11 at 22:28
    
@Vi: Aha. And what problem are you trying to solve with this? –  grawity Jun 23 '11 at 22:29
    
@grawity, Making poor man's dyndns where you can add hosts easily (without launching a browser and pre-registering anything or using specialized "dyndns updaters" as clients), Security is not an issue, it's handled by SSH. –  Vi. Jun 23 '11 at 22:55
add comment

2 Answers

You can use DNS TXT records to store strings in such a manner. I'm not sure how easily they would be to set, but that would depend upon how your DNS server is set up.

share|improve this answer
    
1. I mean public services, not "my" servers. 2. Settings DNS records without any credentials? Basically I want to use it as alternative to dynamic DNS as dyndns are full with registrations, speciallized clients and "pay to have more that 2 hosts" things. –  Vi. Jun 23 '11 at 15:29
    
@Vi: There are public DNS hosts (such as freedns.afraid.org). –  grawity Jun 23 '11 at 19:26
add comment

You usually can't get away from the 3rd requirement unless you host your own service – due to possible problems caused by collisions. There is an ugly workaround: hide the pastebin behind a link shortener – some of them, such as http://tinyurl.com/, allow choosing your own prefix.

Most pastebins allow retrieval of the "raw" paste, and submitting can be done with a simple HTTP request. The simplest is sprunge:

$ echo "This is a test" | curl -F 'sprunge=<-' http://sprunge.us
 http://sprunge.us/fiea

$ curl http://sprunge.us/fiea
This is a test
share|improve this answer
    
When I do second invocation I don't know the exact key. The key should be known by both peers beforehand. Also it will be good it I can update the string by that key. –  Vi. Jun 23 '11 at 22:23
    
Collisions? I also want to override the value for a key. In short, I want thing like dynamic DNS, but without the hassle with registration. –  Vi. Jun 23 '11 at 22:24
    
@Vi: You could use something like pastie.org in that case - create a paste, distribute the key, edit the paste. –  grawity Jun 23 '11 at 22:24
    
pastice.org> "You appear to be a bot, I can't accept your paste. JS is now required to paste." => too unfriendly. –  Vi. Jun 23 '11 at 22:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.