2

Is the parameter prn in the sniff-function ofScapy an abbreviation for anything?

I know it is used to define a callback-function for the sniffed packet, I just can't find the meaning of prn.

I couldn't find an explanation for the abbreviation in the documentation.

2 Answers 2

3

I found something interesting but I'm not sure if it's relevant or not.

PRN is an abbreviation for the Latin term, "pro re nata" which loosely translates to "as needed." PRN is a term commonly used by healthcare employers and professionals to describe short-term, contract, part-time, or fill-in work by a nurse or allied health professional.

As prn takes the call-back function name, it sounds logical to me but I don't believe they would go this far to name a parameter.

1
  • I didn't know that. :p Now I feel ashamed. I just found it on the internet. That's all. :p
    – shamiul97
    Aug 4, 2019 at 10:44
2

That's probably for "print", since the result of the callback (if it is not None) is printed.

The first (historical) use of this callback was to print, for example, a .summary() or a .display() of each sniffed packet (see the tshark() function).

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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