Determining if some dig answer is authoritative or not - networking

I'm being asked to determine whether this dig answer is authoritative or not.
I'd say yes, but I am not too keen on that.
The rationale behind believing it is indeed authoritative is that the AUTHORITATIVE SECTION contains two addresses, that from what one can see from the ADDITIONAL SECTION map to 194.117.22.138 and 10.101.85.6.
We know that this answer was replied from 194.117.22.138, so it must be the case that the server is authoritative.
Is my reasoning correct or am I taking the wrong approach here?

Please see DNS response flags on the third line of dig output. There is a flag named aa which means "authoritative answer".

Related

Force responses to be from a specific custom slot, repeatedly

I'm attempting to write a "trivia quiz" skill, like many others that already exist, but I would like the user to be able to give actual answers rather than "a/b/c" or "1/2/3". So the conversation will go like this:
Alexa: Which planet is closest to the Sun: Mercury or Venus?
User: Mercury
Alexa: That's correct! You have one point. Which company makes the Corvette, Cadillac or Chevrolet?
User: Chevrolet
Alexa: That's right! You have two points. What were George Washington's false teeth made from? Wood or ivory?
...etc...
Since each question has its own set of answers, I'm happy to create one custom slot type per question, so I'd have a LIST_Q1_ANSWERS slot of ["Mercury", "Venus"] and a LIST_Q2_ANSWERS slot of ["Cadillac", "Chevrolet"], and that's all fine. However, I do not know how to tell my skill that answers should come from this particular custom slot only.
I can of course create a specific Intent for each question, so I create Q1Intent, I start a Dialog, and I Elicit my Q1Intent. However, this doesn't work out, because in my response to their filling in the required LIST_Q1_ANSWERS slot, I have to say "correct" and also ask the next question, which means that I have to Elicit the Q2Intent... and that's not allowed; I'd have to end the Dialog first, and then start a new one. (So the conversation would go "Which planet...?" "Mercury" "Correct! Do you want the next question?" "Yes" "OK. Which company..." and that's no good.)
I may be over-complicating things here. Perhaps there's an easier way to model the voice interface that I want. I can of course define all the different answers in one big custom slot, and then just have one single AnswerIntent, but then people can answer Chevrolet to the planets question and that's silly. (I know that I have to cope with any answers to a question, not just the ones in the slot, but I'd like to bias the question towards choosing answers from the slot; that's what slots are for.)
So, how should I be doing this? Dialogs won't work, I don't think.
That is a very reasonable request, IMO, but it is still not possible with Alexa. With some other bot/AI platforms you can specify a context that causes it to try to match the user response against a subset of your skills intents (usually just 1, I would think).
Here is a popular Alexa feature request that gets at the same point:
Allow temporarily disabling intents/utterances based on application state
https://forums.developer.amazon.com/content/idea/40045/allow-temporarily-disabling-intentsutterances-base.html
Yes, I believe that you can do exactly what you want. I did something similar in my "Who's On First?" baseball skit skill.
There are probably many other ways to accomplish this also, but I took the following approach:
Create an intent for each user response. For example, in the above example you stated, "mercury" and "chevrolet" would each be intents.
Pass information forward in the session object. A database could be used, but the session works well in this case. This information will allow your intent handlers to identify the question that was asked. This isn't really necessary if every answer is unique, but it allows multiple questions to have the same answer. For example, maybe the answer "mercury" is an answer to both questions "name a planet" as well as "name a liquid metal".
Since there will be more possible incorrect answers than correct answers, it might make sense to use slots for the incorrect answers. Alternatively, you might just handle unmatched intents as incorrect answers, and use the question ID passed in the session to identify which question was incorrect.
You can put together the response string programmatically. So if the answer is correct, prepend "Correct, the next question is " to the beginning of the next question your skill says.
I hope this gives you an idea for how to proceed. A lot is possible with Alexa. We just need to get creative sometimes.

Why do Request.Cookies and Response.Cookies both use the same object?

Request.Cookies and Response.Cookies both contain a collection of HttpCookies, however, the usage of the Cookie object differs in each. For example, the value contained in Request.Cookies["MyCookie"].Expires seems to be useless, since browsers don't actually send the expiration date back to the server with the request. But since this field exists, it causes a lot of confusion with developers assuming the field has meaning, trying to use it, and then inevitably searching to find out why the expiration date is always 1/1/0001. There are other unused fields as well when looking at a cookie in the Response vs the Request because they are used in different ways, so I wonder:
What are the potential design reasons why a single class (HttpCookie) is used for both a request cookie and a response cookie, given the usage concerns noted above?
Edit: I see some people have voted to close this question because it is too opinion based. Someone certainly might know the answer to this, e.g. it was designed this way because of X. I would also be interested in knowing someone's best guess too, if no one outside of MS knows what X is.
Edit 2: Another valid answer would be that it was probably an oversight and they should be different objects.
I never found this in my original searching, but I'm guessing Anthony's response to this question is probably the best I'm going to get. He proposes:
Strictly speaking .NET ought to have used two different types (RequestCookie and ResponseCookie) but instead chose to use the same type for both circumstances.
I'll happily accept an answer that offers valid reasons (or conjecture) for why that choice was made, if it was intentional.

What is used to inverse an RC4 cipher?

I'm doing a research paper on WEP, and one of the things that has popped up immediately is that it's possible to obtain the keystream derived from specific IV, denoted RC4(v,k). I won't bother posting the proofs (unless requested), as I'm sure they're online and can be easily found.
The question is:
Once you have the value of RC4(v,k) where v is the IV (which is given) and k is the key (which is not given), how do you find the value of k?
I don't need detailed answers, just pointers in the right direction. I read something about rainbowtables, but I didn't really take the time to understand it. If possible, links would be awesome.
Thanks in advance!
Here is a link to an attack by Fluhrer Mantin and Shamir

What are RFC's?

I think there are a lot of people out there unaware of RFC's (Request for Comments). I know what they are at a logical level, but can anybody give a good description for a new developer? Also, sharing some resources on how to use and read them would be nice.
The term comes from the days of ARPANET, the predecessor to the internet, where the researchers would basically just throw ideas out there to, well, make a request for comments from the other researchers on the project. They could be about pretty much anything and were not very formal at the time. If you go read them, it’s pretty comical how informal they were.
Now, there are more standards about what goes in RFC's and you can't get an RFC published until you have met strict guidelines and have done extensive research. They are pretty much reserved for well researched network standards that have been approved by the IETF.
From http://linux.about.com/cs/linux101/g/rfclparrequestf.htm
The name of the result and the process
for creating a standard on the
Internet. New standards are proposed
and published on the Internet, as a
Request For Comments. The proposal is
reviewed by the Internet Engineering
Task Force (http://www.ietf.org/), a
consensus-building body that
facilitates discussion, and eventually
a new standard is established, but the
reference number/name for the standard
retains the acronym RFC, e.g. the
official standard for e-mail message
formats is RFC 822.
See also: RFC Wikipedia Article
This could also mean "Request for Change" in an Agile environment. Just throwing that out there as everyone is so certain is just means "Request for Comments".
Wikipedia gives a good description of what [RFC] is about but in a nutshell it is a set of recommendation from the Internet Engineering Task Force applicable to the working of the Internet and Internet-connected systems. They are used as the standards.
So if you're looking for a definitive source of the information about the implementation of FTP, LDAP, IMAP, POP etc you don't have to look further than the appropriate RFC documents.
It's a Request For Comments. That title is a little misleading though, as it's often used as a name for standards, mostly those by the IETF. See Wikipedia

DNS in Twenty-One Hours

I want the equivalent online resource to DNS in Twenty-One Days. I need one evening's reading that will explain what the different record types do, how do propagation and caching work, what is an SoA, etc.
I don't want anything that begins by explaining what DNS is.
Can anybody please point me in the right direction to find some online 'DNS for Geniuses' guide, please?
Check out DNS for Rocket Scientists
It does start with a very brief "What DNS is" but you can easily skip that.
You can also check out Records 101 which gives a good overview of the different record types - the examples are specific to DNSMadeEasy though.
I keep DNS and BIND on my bedside table. It was good to get me going (I used the TOC and skipped the "What is DNS" bits), and it keeps on giving me confidence and a helping hand.
I don't normally buy soot-on-dead-trees books, but this one is a rare exception that has repaid me many times over.
The definitive source, and quite readable (IMO):
http://www.ietf.org/rfc/rfc1035.txt
When I set up DNS for the first time I read DNS HOWTO. It worked pretty well for me.

Resources