Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
LnkEnums.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2012-2019 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.coreutils;
20 
25 class LnkEnums {
26 
27  private static final byte[] CDRIVES = new byte[]{(byte) 0xe0, 0x4f, (byte) 0xd0, 0x20,
28  (byte) 0xea, 0x3a, 0x69, 0x10, (byte) 0xa2, (byte) 0xd8, 0x08, 0x00, 0x2b, 0x30, 0x30, (byte) 0x9d};
29  private static final byte[] CMYDOCS = new byte[]{(byte) 0xba, (byte) 0x8a, 0x0d,
30  0x45, 0x25, (byte) 0xad, (byte) 0xd0, 0x11, (byte) 0x98, (byte) 0xa8, 0x08, 0x00, 0x36, 0x1b, 0x11, 0x03};
31  private static final byte[] IEFRAME = new byte[]{(byte) 0x80, 0x53, 0x1c, (byte) 0x87, (byte) 0xa0,
32  0x42, 0x69, 0x10, (byte) 0xa2, (byte) 0xea, 0x08, 0x00, 0x2b, 0x30, 0x30, (byte) 0x9d};
33 
34  private LnkEnums() {
35  //private constructor for utility class
36  }
37 
38  public enum CommonCLSIDS {
39 
40  CDrivesFolder(CDRIVES),
41  CMyDocsFolder(CMYDOCS),
42  IEFrameDLL(IEFRAME),
43  Unknown(new byte[16]);
44 
45  private final byte[] flag;
46 
47  private CommonCLSIDS(byte[] flag) {
48  this.flag = flag.clone();
49  }
50 
51  static CommonCLSIDS valueOf(byte[] type) {
52  for (CommonCLSIDS value : CommonCLSIDS.values()) {
53  if (java.util.Arrays.equals(value.getFlag(), type)) {
54  return value;
55  }
56  }
57  return Unknown;
58  }
59 
60  byte[] getFlag() {
61  return flag.clone();
62  }
63  }
64 
65  public enum LinkFlags {
66 
67  HasLinkTargetIDList(0x00000001),
68  HasLinkInfo(0x00000002),
69  HasName(0x00000004),
70  HasRelativePath(0x00000008),
71  HasWorkingDir(0x00000010),
72  HasArguments(0x00000020),
73  HasIconLocation(0x00000040),
74  IsUnicode(0x00000080),
75  ForceNoLinkInfo(0x00000100),
76  HasExpString(0x00000200),
77  RunInSeparateProcess(0x00000400),
78  Unused1(0x00000800),
79  HasDarwinID(0x00001000),
80  RunAsUser(0x00002000),
81  HasExpIcon(0x00004000),
82  NoPidlAlias(0x00008000),
83  Unused2(0x00010000),
84  RunWithShimLayer(0x00020000),
85  ForceNoLinkTrack(0x00040000),
86  EnableTargetMetaData(0x00080000),
90  AllowLinkToLink(0x00800000),
91  UnaliasOnSave(0x01000000),
92  PreferEnvironmentPath(0x02000000),
94 
95  private final int flag;
96 
97  private LinkFlags(int flag) {
98  this.flag = flag;
99  }
100 
101  public int getFlag() {
102  return flag;
103  }
104  }
105 
106  public enum DriveType {
107 
108  DRIVE_UNKNOWN(0x00000000),
109  DRIVE_NO_ROOT_DIR(0x00000001),
110  DRIVE_REMOVABLE(0x00000002),
111  DRIVE_FIXED(0x00000003),
112  DRIVE_REMOTE(0x00000004),
113  DRIVE_CDROM(0x00000005),
114  DRIVE_RAMDISK(0x00000006);
115 
116  private final int flag;
117 
118  private DriveType(int flag) {
119  this.flag = flag;
120  }
121 
122  public int getFlag() {
123  return flag;
124  }
125 
126  static DriveType valueOf(int type) {
127  for (DriveType value : DriveType.values()) {
128  if (value.getFlag() == type) {
129  return value;
130  }
131  }
132  return DRIVE_UNKNOWN;
133  }
134  }
135 
136  public enum FileAttributesFlags {
137 
138  READONLY(0x00000001),
139  HIDDEN(0x00000002),
140  SYSTEM(0x00000004),
141  RESERVED1(0x00000008),
142  DIRECTORY(0x00000010),
143  ARCHIVE(0x00000020),
144  RESERVED2(0x00000040),
145  NORMAL(0x00000080),
146  TEMPORARY(0x00000100),
147  SPARSE_FILE(0x00000200),
148  REPARSE_POINT(0x00000400),
149  COMPRESSED(0x00000800),
150  OFFLINE(0x00001000),
151  NOT_CONTENT_INDEXED(0x00002000),
152  ENCRYPTED(0x00004000);
153 
154  private final int flag;
155 
156  private FileAttributesFlags(int flag) {
157  this.flag = flag;
158  }
159 
160  public int getFlag() {
161  return flag;
162  }
163  }
164 
165  public enum LinkInfoFlags {
166 
169 
170  private final int flag;
171 
172  private LinkInfoFlags(int flag) {
173  this.flag = flag;
174  }
175 
176  public int getFlag() {
177  return flag;
178  }
179  }
180 
182 
183  ValidDevice(0x00000001),
184  ValidNetType(0x00000002);
185 
186  private final int flag;
187 
188  private CommonNetworkRelativeLinkFlags(int flag) {
189  this.flag = flag;
190  }
191 
192  public int getFlag() {
193  return flag;
194  }
195  }
196 
197  public enum NetworkProviderType {
198 
199  WNNC_NET_AVID(0x001A0000),
200  WNNC_NET_DOCUSPACE(0x001B0000),
201  WNNC_NET_MANGOSOFT(0x001C0000),
202  WNNC_NET_SERNET(0x001D0000),
203  WNNC_NET_RIVERFRONT1(0x001E0000),
204  WNNC_NET_RIVERFRONT2(0x001F0000),
205  WNNC_NET_DECORB(0x00200000),
206  WNNC_NET_PROTSTOR(0x00210000),
207  WNNC_NET_FJ_REDIR(0x00220000),
208  WNNC_NET_DISTINCT(0x00230000),
209  WNNC_NET_TWINS(0x00240000),
210  WNNC_NET_RDR2SAMPLE(0x00250000),
211  WNNC_NET_CSC(0x00260000),
212  WNNC_NET_3IN1(0x00270000),
213  WNNC_NET_EXTENDNET(0x00290000),
214  WNNC_NET_STAC(0x002A0000),
215  WNNC_NET_FOXBAT(0x002B0000),
216  WNNC_NET_YAHOO(0x002C0000),
217  WNNC_NET_EXIFS(0x002D0000),
218  WNNC_NET_DAV(0x002E0000),
219  WNNC_NET_KNOWARE(0x002F0000),
220  WNNC_NET_OBJECT_DIRE(0x00300000),
221  WNNC_NET_MASFAX(0x00310000),
222  WNNC_NET_HOB_NFS(0x00320000),
223  WNNC_NET_SHIVA(0x00330000),
224  WNNC_NET_IBMAL(0x00340000),
225  WNNC_NET_LOCK(0x00350000),
226  WNNC_NET_TERMSRV(0x00360000),
227  WNNC_NET_SRT(0x00370000),
228  WNNC_NET_QUINCY(0x00380000),
229  WNNC_NET_OPENAFS(0x00390000),
230  WNNC_NET_AVID1(0x003A0000),
231  WNNC_NET_DFS(0x003B0000),
232  WNNC_NET_KWNP(0x003C0000),
233  WNNC_NET_ZENWORKS(0x003D0000),
234  WNNC_NET_DRIVEONWEB(0x003E0000),
235  WNNC_NET_VMWARE(0x003F0000),
236  WNNC_NET_RSFX(0x00400000),
237  WNNC_NET_MFILES(0x00410000),
238  WNNC_NET_MS_NFS(0x00420000),
239  WNNC_NET_GOOGLE(0x00430000),
240  WNNC_NET_UNKNOWN(0x00000000);
241 
242  private final int flag;
243 
244  private NetworkProviderType(int flag) {
245  this.flag = flag;
246  }
247 
248  static NetworkProviderType valueOf(int type) {
249  for (NetworkProviderType value : NetworkProviderType.values()) {
250  if (value.getFlag() == type) {
251  return value;
252  }
253  }
254  return WNNC_NET_UNKNOWN;
255  }
256 
257  public int getFlag() {
258  return flag;
259  }
260  }
261 
262 }
static CommonCLSIDS valueOf(byte[] type)
Definition: LnkEnums.java:51

Copyright © 2012-2022 Basis Technology. Generated on: Thu Sep 29 2022
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.