Skip to content

Instantly share code, notes, and snippets.

@steeve85
Created June 9, 2012 22:32
Show Gist options
  • Save steeve85/2902847 to your computer and use it in GitHub Desktop.
Save steeve85/2902847 to your computer and use it in GitHub Desktop.
Nmap Dionaea SMB
class SMB_Negociate_Protocol_Response(Packet):
name="SMB Negociate Response"
smb_cmd = SMB_COM_NEGOTIATE #0x72
fields_desc = [
#[..],
ConditionalField(UnicodeNullField("OemDomainName", "HINMAP"), lambda x: not x.Capabilities & CAP_EXTENDED_SECURITY),
# "ServerName" field needed for case without CAP_EXTENDED_SECURITY
ConditionalField(UnicodeNullField("ServerName", "TRYHARDER"), lambda x: not x.Capabilities & CAP_EXTENDED_SECURITY),
#[..],]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment