| 885 | |
| 886 | # SMB2_CREATE |
| 887 | class SMB2Create(Structure): |
| 888 | SIZE = 56 |
| 889 | structure = ( |
| 890 | ('StructureSize','<H=57'), |
| 891 | ('SecurityFlags','<B=0'), |
| 892 | ('RequestedOplockLevel','<B=0'), |
| 893 | ('ImpersonationLevel','<L=0'), |
| 894 | ('SmbCreateFlags','<Q=0'), |
| 895 | ('Reserved','<Q=0'), |
| 896 | ('DesiredAccess','<L=0'), |
| 897 | ('FileAttributes','<L=0'), |
| 898 | ('ShareAccess','<L=0'), |
| 899 | ('CreateDisposition','<L=0'), |
| 900 | ('CreateOptions','<L=0'), |
| 901 | ('NameOffset','<H=(self.SIZE + 64 + len(self["AlignPad"]))'), |
| 902 | ('NameLength','<H=0'), |
| 903 | ('CreateContextsOffset','<L=0'), |
| 904 | ('CreateContextsLength','<L=0'), |
| 905 | ('_AlignPad','_-AlignPad','self["NameOffset"] - (64 + self["StructureSize"] - 1)'), |
| 906 | ('AlignPad',':=""'), |
| 907 | ('_Buffer','_-Buffer','self["CreateContextsLength"]+self["NameLength"]'), |
| 908 | ('Buffer',':'), |
| 909 | ) |
| 910 | def __init__(self, data = None): |
| 911 | Structure.__init__(self,data) |
| 912 | if data is None: |
| 913 | self['AlignPad'] = '' |
| 914 | |
| 915 | class SMB2CreateContext(Structure): |
| 916 | structure = ( |