View Javadoc
1   package com.jsql.util;
2   
3   import com.jsql.model.InjectionModel;
4   import com.jsql.model.exception.JSqlRuntimeException;
5   import com.jsql.util.reverse.ModelReverse;
6   import org.apache.commons.lang3.StringUtils;
7   import org.apache.commons.lang3.SystemUtils;
8   import org.yaml.snakeyaml.LoaderOptions;
9   import org.yaml.snakeyaml.Yaml;
10  
11  import java.io.IOException;
12  import java.util.List;
13  import java.util.Map;
14  import java.util.prefs.Preferences;
15  import java.util.stream.Collectors;
16  
17  /**
18   * Utility class to manage JVM preferences previously saved into the system.
19   * Only general settings are processed by this utility, other specific preferences
20   * like those for proxy are defined from specific utility classes.
21   */
22  public class PreferencesUtil {
23  
24      public static final String EW_SPLIT = "verticalSplitter";
25      public static final String NS_SPLIT = "horizontalSplitter";
26      public static final String CHUNK_VISIBLE = "chunk_visible";
27      public static final String BINARY_VISIBLE = "binary_visible";
28      public static final String NETWORK_VISIBLE = "header_visible";
29      public static final String JAVA_VISIBLE = "java_visible";
30      public static final String IS_MAXIMIZED = "is_maximized";
31  
32      // File path saved in preference.
33      private String pathFile;
34  
35      private boolean isCheckingUpdate = true;
36      private boolean isShowNews = true;
37  
38      // True if bugs are sent to GitHub.
39      private boolean isReportingBugs = true;
40      
41      private boolean is4K = false;
42      
43      private boolean isFollowingRedirection = false;
44      private boolean isHttp2Disabled = false;
45      
46      private boolean isNotInjectingMetadata = false;
47      private boolean isNotSearchingCharInsertion = false;
48      private boolean isNotShowingVulnReport = false;
49  
50      private boolean isCheckingAllParam = false;
51      private boolean isCheckingAllURLParam = false;
52      private boolean isCheckingAllRequestParam = false;
53      private boolean isCheckingAllHeaderParam = false;
54      private boolean isCheckingAllBase64Param = false;
55      private boolean isCheckingAllJsonParam = false;
56      private boolean isCheckingAllCookieParam = false;
57      private boolean isCheckingAllSoapParam = false;
58      
59      private boolean isPerfIndexDisabled = false;
60      private boolean isDefaultStrategy = false;
61      private boolean isZipStrategy = false;
62      private boolean isDiosStrategy = false;
63      private boolean isUrlEncodingDisabled = false;
64      private boolean isUrlRandomSuffixDisabled = false;
65  
66      private boolean isParsingForm = false;
67      private boolean isNotTestingConnection = false;
68      private boolean isNotProcessingCookies = false;
69      private boolean isProcessingCsrf = false;
70      
71      private boolean isTamperingBase64 = false;
72      private boolean isTamperingFunctionComment = false;
73      private boolean isTamperingVersionComment = false;
74      private boolean isTamperingEqualToLike = false;
75      private boolean isTamperingRandomCase = false;
76      private boolean isTamperingEval = false;
77      private boolean isTamperingSpaceToMultilineComment = false;
78      private boolean isTamperingSpaceToDashComment = false;
79      private boolean isTamperingSpaceToSharpComment = false;
80  
81      private String csrfUserTag = StringUtils.EMPTY;
82      private String csrfUserTagOutput = StringUtils.EMPTY;
83      private boolean isCsrfUserTag = false;
84      private boolean isLimitingThreads = true;
85      private int countLimitingThreads = 5;
86      private boolean isConnectionTimeout = false;
87      private int countConnectionTimeout = 15;
88      private boolean isUnicodeDecodeDisabled = false;
89      private boolean isUrlDecodeDisabled = false;
90  
91      private boolean isStrategyTimeDisabled = false;
92      private boolean isStrategyBlindBinDisabled = false;
93      private boolean isStrategyBlindBitDisabled = false;
94      private boolean isStrategyMultibitDisabled = false;
95      private boolean isStrategyDnsDisabled = true;
96      private boolean isStrategyStackDisabled = false;
97      private boolean isStrategyErrorDisabled = false;
98      private boolean isStrategyUnionDisabled = false;
99  
100     private boolean isLimitingUnionIndex = false;
101     private int countUnionIndex = 50;
102     private boolean isLimitingSleepTimeStrategy = false;
103     private int countSleepTimeStrategy = 5;
104 
105     private String themeFlatLafName = StringUtils.EMPTY;
106     private String languageTag = StringUtils.EMPTY;
107     private boolean isUserAgentRandom = false;
108     private boolean isUrlDecodeNetworkTab = false;
109 
110     private String dnsDomain = "custom-domain.com";
111     private String dnsPort = "53";
112 
113     private final Yaml yaml;
114     private String commandsReverseYaml;
115     private List<ModelReverse> commandsReverse;
116 
117     public PreferencesUtil() {
118         var loaderOptions = new LoaderOptions();
119         loaderOptions.setWarnOnDuplicateKeys(false);  // required to prevent snakeyaml logs
120         this.yaml = new Yaml(loaderOptions);
121         try {
122             this.parseReverseCommands(StringUtil.fromBase64Zip(StringUtil.getFile("exploit/reverse.yml").trim()));
123         } catch (IOException e) {
124             throw new JSqlRuntimeException(e);
125         }
126     }
127 
128     public void parseReverseCommands(String commandsReverseYaml) {
129         List<Map<String, String>> commandsReverseMap = this.yaml.load(commandsReverseYaml);
130         this.commandsReverse = commandsReverseMap.stream()
131             .map(map -> new ModelReverse(
132                 map.get("name"),
133                 map.get("command").replaceAll("\\n\\s*", StringUtils.EMPTY)
134             ))
135             .collect(Collectors.toList());
136         this.commandsReverseYaml = commandsReverseYaml;
137     }
138 
139     /**
140      * Initialize the utility class with previously saved JVM preferences and apply
141      * loaded settings to the system.
142      */
143     public void loadSavedPreferences() {
144         
145         // Use Preferences API to persist proxy configuration
146         Preferences preferences = Preferences.userRoot().node(InjectionModel.class.getName());
147         
148         this.pathFile = preferences.get("pathFile", SystemUtils.USER_DIR);
149         
150         this.isCheckingUpdate = preferences.getBoolean("isCheckingUpdate", true);
151         this.isReportingBugs = preferences.getBoolean("isReportingBugs", true);
152         
153         this.isFollowingRedirection = preferences.getBoolean("isFollowingRedirection", false);
154         this.isHttp2Disabled = preferences.getBoolean("isHttp2Disabled", false);
155         this.isNotInjectingMetadata = preferences.getBoolean("isNotInjectingMetadata", false);
156         this.isNotSearchingCharInsertion = preferences.getBoolean("isNotSearchingCharInsertion", false);
157         this.isNotShowingVulnReport = preferences.getBoolean("isNotShowingVulnReport", false);
158 
159         this.isCheckingAllParam = preferences.getBoolean("isCheckingAllParam", false);
160         this.isCheckingAllURLParam = preferences.getBoolean("isCheckingAllURLParam", false);
161         this.isCheckingAllRequestParam = preferences.getBoolean("isCheckingAllRequestParam", false);
162         this.isCheckingAllHeaderParam = preferences.getBoolean("isCheckingAllHeaderParam", false);
163         this.isCheckingAllBase64Param = preferences.getBoolean("isCheckingAllBase64Param", false);
164         this.isCheckingAllJsonParam = preferences.getBoolean("isCheckingAllJsonParam", false);
165         this.isCheckingAllCookieParam = preferences.getBoolean("isCheckingAllCookieParam", false);
166         this.isCheckingAllSoapParam = preferences.getBoolean("isCheckingAllSoapParam", false);
167         
168         this.isPerfIndexDisabled = preferences.getBoolean("isPerfIndexDisabled", false);
169         this.isDefaultStrategy = preferences.getBoolean("isDefaultStrategy", false);
170         this.isZipStrategy = preferences.getBoolean("isZipStrategy", false);
171         this.isDiosStrategy = preferences.getBoolean("isDiosStrategy", false);
172         this.isUrlEncodingDisabled = preferences.getBoolean("isUrlEncodingDisabled", false);
173         this.isUrlRandomSuffixDisabled = preferences.getBoolean("isUrlRandomSuffixDisabled", false);
174 
175         this.isParsingForm = preferences.getBoolean("isParsingForm", false);
176         this.isNotTestingConnection = preferences.getBoolean("isNotTestingConnection", false);
177         this.isNotProcessingCookies = preferences.getBoolean("isNotProcessingCookies", false);
178         this.isProcessingCsrf = preferences.getBoolean("isProcessingCsrf", false);
179         
180         this.isTamperingBase64 = preferences.getBoolean("isTamperingBase64", false);
181         this.isTamperingEqualToLike = preferences.getBoolean("isTamperingEqualToLike", false);
182         this.isTamperingFunctionComment = preferences.getBoolean("isTamperingFunctionComment", false);
183         this.isTamperingVersionComment = preferences.getBoolean("isTamperingVersionComment", false);
184         this.isTamperingRandomCase = preferences.getBoolean("isTamperingRandomCase", false);
185         this.isTamperingEval = preferences.getBoolean("isTamperingEval", false);
186         this.isTamperingSpaceToDashComment = preferences.getBoolean("isTamperingSpaceToDashComment", false);
187         this.isTamperingSpaceToMultilineComment = preferences.getBoolean("isTamperingSpaceToMultilineComment", false);
188         this.isTamperingSpaceToSharpComment = preferences.getBoolean("isTamperingSpaceToSharpComment", false);
189         
190         this.is4K = preferences.getBoolean("is4K", false);
191         this.isCsrfUserTag = preferences.getBoolean("isCsrfUserTag", false);
192         this.csrfUserTag = preferences.get("csrfUserTag", StringUtils.EMPTY);
193         this.csrfUserTagOutput = preferences.get("csrfUserTagOutput", StringUtils.EMPTY);
194         this.isLimitingThreads = preferences.getBoolean("isLimitingThreads", true);
195         this.countLimitingThreads = preferences.getInt("countLimitingThreads", 5);
196         this.isConnectionTimeout = preferences.getBoolean("isConnectionTimeout", false);
197         this.countConnectionTimeout = preferences.getInt("countConnectionTimeout", 15);
198         this.isUnicodeDecodeDisabled = preferences.getBoolean("isUnicodeDecodeDisabled", false);
199         this.isUrlDecodeDisabled = preferences.getBoolean("isUrlDecodeDisabled", false);
200         this.countUnionIndex = preferences.getInt("countUnionIndex", 50);
201         this.isLimitingUnionIndex = preferences.getBoolean("isLimitingUnionIndex", false);
202         this.countSleepTimeStrategy = preferences.getInt("countSleepTimeStrategy", 5);
203         this.isLimitingSleepTimeStrategy = preferences.getBoolean("isLimitingSleepTimeStrategy", false);
204 
205         this.isStrategyTimeDisabled = preferences.getBoolean("isStrategyTimeDisabled", false);
206         this.isStrategyBlindBinDisabled = preferences.getBoolean("isStrategyBlindBinDisabled", false);
207         this.isStrategyBlindBitDisabled = preferences.getBoolean("isStrategyBlindBitDisabled", false);
208         this.isStrategyMultibitDisabled = preferences.getBoolean("isStrategyMultibitDisabled", false);
209         this.isStrategyDnsDisabled = preferences.getBoolean("isStrategyDnsDisabled", true);
210         this.isStrategyStackDisabled = preferences.getBoolean("isStrategyStackDisabled", false);
211         this.isStrategyErrorDisabled = preferences.getBoolean("isStrategyErrorDisabled", false);
212         this.isStrategyUnionDisabled = preferences.getBoolean("isStrategyUnionDisabled", false);
213 
214         this.isUserAgentRandom = preferences.getBoolean("isUserAgentRandom", false);
215 
216         this.themeFlatLafName = preferences.get("themeFlatLafName", StringUtils.EMPTY);
217         this.languageTag = preferences.get("languageTag", StringUtils.EMPTY);
218         this.isUrlDecodeNetworkTab = preferences.getBoolean("isUrlDecodeNetworkTab", false);
219 
220         this.dnsDomain = preferences.get("dnsDomain", "custom-domain.com");
221         this.dnsPort = preferences.get("dnsPort", "53");
222     }
223     
224     /**
225      * Initialize the utility class, persist preferences and
226      * apply change to the JVM.
227      */
228     public void persist() {
229         
230         var preferences = Preferences.userRoot().node(InjectionModel.class.getName());
231 
232         preferences.putBoolean("isCheckingUpdate", this.isCheckingUpdate);
233         preferences.putBoolean("isReportingBugs", this.isReportingBugs);
234         preferences.putBoolean("is4K", this.is4K);
235         preferences.putBoolean("isUnicodeDecodeDisabled", this.isUnicodeDecodeDisabled);
236         preferences.putBoolean("isUrlDecodeDisabled", this.isUrlDecodeDisabled);
237         preferences.putBoolean("isLimitingThreads", this.isLimitingThreads);
238         preferences.putInt("countLimitingThreads", this.countLimitingThreads);
239         preferences.putBoolean("isConnectionTimeout", this.isConnectionTimeout);
240         preferences.putInt("countConnectionTimeout", this.countConnectionTimeout);
241         preferences.putBoolean("isLimitingUnionIndex", this.isLimitingUnionIndex);
242         preferences.putInt("countUnionIndex", this.countUnionIndex);
243         preferences.putBoolean("isLimitingSleepTimeStrategy", this.isLimitingSleepTimeStrategy);
244         preferences.putInt("countSleepTimeStrategy", this.countSleepTimeStrategy);
245         preferences.putBoolean("isCsrfUserTag", this.isCsrfUserTag);
246         preferences.put("csrfUserTag", this.csrfUserTag);
247         preferences.put("csrfUserTagOutput", this.csrfUserTagOutput);
248         
249         preferences.putBoolean("isFollowingRedirection", this.isFollowingRedirection);
250         preferences.putBoolean("isHttp2Disabled", this.isHttp2Disabled);
251         preferences.putBoolean("isNotInjectingMetadata", this.isNotInjectingMetadata);
252         preferences.putBoolean("isNotSearchingCharInsertion", this.isNotSearchingCharInsertion);
253         preferences.putBoolean("isNotShowingVulnReport", this.isNotShowingVulnReport);
254         preferences.putBoolean("isCheckingAllParam", this.isCheckingAllParam);
255         preferences.putBoolean("isCheckingAllURLParam", this.isCheckingAllURLParam);
256         preferences.putBoolean("isCheckingAllRequestParam", this.isCheckingAllRequestParam);
257         preferences.putBoolean("isCheckingAllHeaderParam", this.isCheckingAllHeaderParam);
258         
259         preferences.putBoolean("isCheckingAllBase64Param", this.isCheckingAllBase64Param);
260         preferences.putBoolean("isCheckingAllJsonParam", this.isCheckingAllJsonParam);
261         preferences.putBoolean("isCheckingAllCookieParam", this.isCheckingAllCookieParam);
262         preferences.putBoolean("isCheckingAllSoapParam", this.isCheckingAllSoapParam);
263         preferences.putBoolean("isParsingForm", this.isParsingForm);
264         preferences.putBoolean("isNotTestingConnection", this.isNotTestingConnection);
265         preferences.putBoolean("isNotProcessingCookies", this.isNotProcessingCookies);
266         preferences.putBoolean("isProcessingCsrf", this.isProcessingCsrf);
267         
268         preferences.putBoolean("isPerfIndexDisabled", this.isPerfIndexDisabled);
269         preferences.putBoolean("isDefaultStrategy", this.isDefaultStrategy);
270         preferences.putBoolean("isZipStrategy", this.isZipStrategy);
271         preferences.putBoolean("isDiosStrategy", this.isDiosStrategy);
272         preferences.putBoolean("isUrlEncodingDisabled", this.isUrlEncodingDisabled);
273         preferences.putBoolean("isUrlRandomSuffixDisabled", this.isUrlRandomSuffixDisabled);
274 
275         preferences.putBoolean("isTamperingBase64", this.isTamperingBase64);
276         preferences.putBoolean("isTamperingEqualToLike", this.isTamperingEqualToLike);
277         preferences.putBoolean("isTamperingVersionComment", this.isTamperingVersionComment);
278         preferences.putBoolean("isTamperingFunctionComment", this.isTamperingFunctionComment);
279         preferences.putBoolean("isTamperingRandomCase", this.isTamperingRandomCase);
280         preferences.putBoolean("isTamperingEval", this.isTamperingEval);
281         preferences.putBoolean("isTamperingSpaceToDashComment", this.isTamperingSpaceToDashComment);
282         preferences.putBoolean("isTamperingSpaceToMultilineComment", this.isTamperingSpaceToMultilineComment);
283         preferences.putBoolean("isTamperingSpaceToSharpComment", this.isTamperingSpaceToSharpComment);
284         
285         preferences.putBoolean("isStrategyTimeDisabled", this.isStrategyTimeDisabled);
286         preferences.putBoolean("isStrategyBlindBinDisabled", this.isStrategyBlindBinDisabled);
287         preferences.putBoolean("isStrategyBlindBitDisabled", this.isStrategyBlindBitDisabled);
288         preferences.putBoolean("isStrategyMultibitDisabled", this.isStrategyMultibitDisabled);
289         preferences.putBoolean("isStrategyDnsDisabled", this.isStrategyDnsDisabled);
290         preferences.putBoolean("isStrategyStackDisabled", this.isStrategyStackDisabled);
291         preferences.putBoolean("isStrategyErrorDisabled", this.isStrategyErrorDisabled);
292         preferences.putBoolean("isStrategyUnionDisabled", this.isStrategyUnionDisabled);
293 
294         preferences.putBoolean("isUserAgentRandom", this.isUserAgentRandom);
295         preferences.putBoolean("isUrlDecodeNetworkTab", this.isUrlDecodeNetworkTab);
296 
297         preferences.put("themeFlatLafName", this.themeFlatLafName);
298         preferences.put("languageTag", this.languageTag);
299 
300         preferences.put("dnsDomain", this.dnsDomain);
301         preferences.put("dnsPort", this.dnsPort);
302     }
303     
304     /**
305      * Set the general file path to the utility class and persist to JVM preferences.
306      * @param path folder path to persist
307      */
308     public void set(String path) {
309         this.pathFile = path;
310         Preferences preferences = Preferences.userRoot().node(InjectionModel.class.getName());
311         preferences.put("pathFile", this.pathFile);
312     }
313     
314     
315     // Getters and setters
316     
317     public String getPathFile() {
318         return this.pathFile;
319     }
320     
321     public boolean isCheckingUpdate() {
322         return this.isCheckingUpdate;
323     }
324 
325     public boolean isShowNews() {
326         return this.isShowNews;
327     }
328     
329     public boolean isFollowingRedirection() {
330         return this.isFollowingRedirection;
331     }
332     
333     public boolean isHttp2Disabled() {
334         return this.isHttp2Disabled;
335     }
336     
337     public boolean isReportingBugs() {
338         return this.isReportingBugs;
339     }
340 
341     public boolean isNotInjectingMetadata() {
342         return this.isNotInjectingMetadata;
343     }
344 
345     public boolean isNotSearchingCharInsertion() {
346         return this.isNotSearchingCharInsertion;
347     }
348 
349     public boolean isNotShowingVulnReport() {
350         return this.isNotShowingVulnReport;
351     }
352 
353     public boolean isCheckingAllURLParam() {
354         return this.isCheckingAllURLParam;
355     }
356 
357     public boolean isCheckingAllRequestParam() {
358         return this.isCheckingAllRequestParam;
359     }
360 
361     public boolean isCheckingAllHeaderParam() {
362         return this.isCheckingAllHeaderParam;
363     }
364 
365     public boolean isCheckingAllBase64Param() {
366         return this.isCheckingAllBase64Param;
367     }
368     
369     public boolean isCheckingAllJsonParam() {
370         return this.isCheckingAllJsonParam;
371     }
372 
373     public boolean isParsingForm() {
374         return this.isParsingForm;
375     }
376 
377     public boolean isNotTestingConnection() {
378         return this.isNotTestingConnection;
379     }
380 
381     public boolean isNotProcessingCookies() {
382         return this.isNotProcessingCookies;
383     }
384 
385     public boolean isCheckingAllParam() {
386         return this.isCheckingAllParam;
387     }
388 
389     public boolean isProcessingCsrf() {
390         return this.isProcessingCsrf;
391     }
392 
393     public boolean isCheckingAllCookieParam() {
394         return this.isCheckingAllCookieParam;
395     }
396 
397     public boolean isTamperingBase64() {
398         return this.isTamperingBase64;
399     }
400 
401     public boolean isTamperingFunctionComment() {
402         return this.isTamperingFunctionComment;
403     }
404 
405     public boolean isTamperingEqualToLike() {
406         return this.isTamperingEqualToLike;
407     }
408 
409     public boolean isTamperingRandomCase() {
410         return this.isTamperingRandomCase;
411     }
412 
413     public boolean isTamperingSpaceToMultilineComment() {
414         return this.isTamperingSpaceToMultilineComment;
415     }
416 
417     public boolean isTamperingSpaceToDashComment() {
418         return this.isTamperingSpaceToDashComment;
419     }
420 
421     public boolean isTamperingSpaceToSharpComment() {
422         return this.isTamperingSpaceToSharpComment;
423     }
424 
425     public boolean isTamperingVersionComment() {
426         return this.isTamperingVersionComment;
427     }
428 
429     public boolean isTamperingEval() {
430         return this.isTamperingEval;
431     }
432 
433     public boolean isCheckingAllSoapParam() {
434         return this.isCheckingAllSoapParam;
435     }
436 
437     public boolean is4K() {
438         return this.is4K;
439     }
440 
441     public boolean isLimitingThreads() {
442         return this.isLimitingThreads;
443     }
444     
445     public boolean isLimitingSleepTimeStrategy() {
446         return this.isLimitingSleepTimeStrategy;
447     }
448     
449     public boolean isConnectionTimeout() {
450         return this.isConnectionTimeout;
451     }
452     
453     public boolean isUnicodeDecodeDisabled() {
454         return this.isUnicodeDecodeDisabled;
455     }
456     
457     public boolean isUrlDecodeDisabled() {
458         return this.isUrlDecodeDisabled;
459     }
460     
461     public int countLimitingThreads() {
462         return this.countLimitingThreads;
463     }
464     
465     public int countConnectionTimeout() {
466         return this.countConnectionTimeout;
467     }
468     
469     public int countUnionIndex() {
470         return this.countUnionIndex;
471     }
472     
473     public int countSleepTimeStrategy() {
474         return this.countSleepTimeStrategy;
475     }
476     
477     public boolean isLimitingUnionIndex() {
478         return this.isLimitingUnionIndex;
479     }
480     
481     public boolean isCsrfUserTag() {
482         return this.isCsrfUserTag;
483     }
484     
485     public String csrfUserTag() {
486         return this.csrfUserTag;
487     }
488     
489     public String csrfUserTagOutput() {
490         return this.csrfUserTagOutput;
491     }
492     
493     public boolean isPerfIndexDisabled() {
494         return this.isPerfIndexDisabled;
495     }
496     
497     public boolean isZipStrategy() {
498         return this.isZipStrategy;
499     }
500     
501     public boolean isDefaultStrategy() {
502         return this.isDefaultStrategy;
503     }
504     
505     public boolean isDiosStrategy() {
506         return this.isDiosStrategy;
507     }
508     
509     public boolean isUrlEncodingDisabled() {
510         return this.isUrlEncodingDisabled;
511     }
512     
513     public boolean isUrlRandomSuffixDisabled() {
514         return this.isUrlRandomSuffixDisabled;
515     }
516 
517     public boolean isStrategyTimeDisabled() {
518         return this.isStrategyTimeDisabled;
519     }
520 
521     public boolean isStrategyBlindBitDisabled() {
522         return this.isStrategyBlindBitDisabled;
523     }
524 
525     public boolean isStrategyBlindBinDisabled() {
526         return this.isStrategyBlindBinDisabled;
527     }
528 
529     public boolean isStrategyMultibitDisabled() {
530         return this.isStrategyMultibitDisabled;
531     }
532 
533     public boolean isStrategyStackDisabled() {
534         return this.isStrategyStackDisabled;
535     }
536 
537     public boolean isStrategyDnsDisabled() {
538         return this.isStrategyDnsDisabled;
539     }
540 
541     public boolean isStrategyErrorDisabled() {
542         return this.isStrategyErrorDisabled;
543     }
544 
545     public boolean isStrategyUnionDisabled() {
546         return this.isStrategyUnionDisabled;
547     }
548 
549     public boolean isUserAgentRandom() {
550         return this.isUserAgentRandom;
551     }
552 
553     public String getThemeFlatLafName() {
554         return this.themeFlatLafName;
555     }
556 
557     public String getLanguageTag() {
558         return this.languageTag;
559     }
560 
561     public boolean isUrlDecodeNetworkTab() {
562         return this.isUrlDecodeNetworkTab;
563     }
564 
565     public String getCommandsReverseYaml() {
566         return this.commandsReverseYaml;
567     }
568 
569     public List<ModelReverse> getCommandsReverse() {
570         return this.commandsReverse;
571     }
572 
573     public String getDnsDomain() {
574         return this.dnsDomain;
575     }
576 
577     public String getDnsPort() {
578         return this.dnsPort;
579     }
580 
581 
582     // Builder
583 
584     public PreferencesUtil withIsCheckingUpdate(boolean isCheckingUpdate) {
585         this.isCheckingUpdate = isCheckingUpdate;
586         return this;
587     }
588 
589     public void withIsShowNews(boolean isShowNews) {
590         this.isShowNews = isShowNews;
591     }
592 
593     public PreferencesUtil withIsReportingBugs(boolean isReportingBugs) {
594         this.isReportingBugs = isReportingBugs;
595         return this;
596     }
597 
598     public PreferencesUtil withIs4K(boolean is4K) {
599         this.is4K = is4K;
600         return this;
601     }
602 
603     public PreferencesUtil withIsFollowingRedirection(boolean isFollowingRedirection) {
604         this.isFollowingRedirection = isFollowingRedirection;
605         return this;
606     }
607     
608     public PreferencesUtil withIsHttp2Disabled(boolean isHttp2Disabled) {
609         this.isHttp2Disabled = isHttp2Disabled;
610         return this;
611     }
612     
613     public PreferencesUtil withIsUnicodeDecodeDisabled(boolean isUnicodeDecodeDisabled) {
614         this.isUnicodeDecodeDisabled = isUnicodeDecodeDisabled;
615         return this;
616     }
617     
618     public PreferencesUtil withIsUrlDecodeDisabled(boolean isUrlDecodeDisabled) {
619         this.isUrlDecodeDisabled = isUrlDecodeDisabled;
620         return this;
621     }
622 
623     public PreferencesUtil withIsNotInjectingMetadata(boolean isNotInjectingMetadata) {
624         this.isNotInjectingMetadata = isNotInjectingMetadata;
625         return this;
626     }
627 
628     public PreferencesUtil withIsNotSearchingCharInsertion(boolean isNotSearchingCharInsertion) {
629         this.isNotSearchingCharInsertion = isNotSearchingCharInsertion;
630         return this;
631     }
632 
633     public PreferencesUtil withIsNotShowingVulnReport(boolean isNotShowingVulnReport) {
634         this.isNotShowingVulnReport = isNotShowingVulnReport;
635         return this;
636     }
637 
638     public PreferencesUtil withIsCheckingAllParam(boolean isCheckingAllParam) {
639         this.isCheckingAllParam = isCheckingAllParam;
640         return this;
641     }
642 
643     public PreferencesUtil withIsCheckingAllURLParam(boolean isCheckingAllURLParam) {
644         this.isCheckingAllURLParam = isCheckingAllURLParam;
645         return this;
646     }
647 
648     public PreferencesUtil withIsCheckingAllRequestParam(boolean isCheckingAllRequestParam) {
649         this.isCheckingAllRequestParam = isCheckingAllRequestParam;
650         return this;
651     }
652 
653     public PreferencesUtil withIsCheckingAllHeaderParam(boolean isCheckingAllHeaderParam) {
654         this.isCheckingAllHeaderParam = isCheckingAllHeaderParam;
655         return this;
656     }
657 
658     public PreferencesUtil withIsCheckingAllBase64Param(boolean isCheckingAllBase64Param) {
659         this.isCheckingAllBase64Param = isCheckingAllBase64Param;
660         return this;
661     }
662     
663     public PreferencesUtil withIsCheckingAllJsonParam(boolean isCheckingAllJSONParam) {
664         this.isCheckingAllJsonParam = isCheckingAllJSONParam;
665         return this;
666     }
667 
668     public PreferencesUtil withIsCheckingAllCookieParam(boolean isCheckingAllCookieParam) {
669         this.isCheckingAllCookieParam = isCheckingAllCookieParam;
670         return this;
671     }
672 
673     public PreferencesUtil withIsCheckingAllSoapParam(boolean isCheckingAllSOAPParam) {
674         this.isCheckingAllSoapParam = isCheckingAllSOAPParam;
675         return this;
676     }
677 
678     public PreferencesUtil withIsParsingForm(boolean isParsingForm) {
679         this.isParsingForm = isParsingForm;
680         return this;
681     }
682 
683     public PreferencesUtil withIsNotTestingConnection(boolean isNotTestingConnection) {
684         this.isNotTestingConnection = isNotTestingConnection;
685         return this;
686     }
687 
688     public PreferencesUtil withIsNotProcessingCookies(boolean isNotProcessingCookies) {
689         this.isNotProcessingCookies = isNotProcessingCookies;
690         return this;
691     }
692 
693     public PreferencesUtil withIsProcessingCsrf(boolean isProcessingCsrf) {
694         this.isProcessingCsrf = isProcessingCsrf;
695         return this;
696     }
697 
698     public PreferencesUtil withIsTamperingBase64(boolean isTamperingBase64) {
699         this.isTamperingBase64 = isTamperingBase64;
700         return this;
701     }
702 
703     public PreferencesUtil withIsTamperingFunctionComment(boolean isTamperingFunctionComment) {
704         this.isTamperingFunctionComment = isTamperingFunctionComment;
705         return this;
706     }
707 
708     public PreferencesUtil withIsTamperingVersionComment(boolean isTamperingVersionComment) {
709         this.isTamperingVersionComment = isTamperingVersionComment;
710         return this;
711     }
712 
713     public PreferencesUtil withIsTamperingEqualToLike(boolean isTamperingEqualToLike) {
714         this.isTamperingEqualToLike = isTamperingEqualToLike;
715         return this;
716     }
717 
718     public PreferencesUtil withIsTamperingRandomCase(boolean isTamperingRandomCase) {
719         this.isTamperingRandomCase = isTamperingRandomCase;
720         return this;
721     }
722 
723     public PreferencesUtil withIsTamperingEval(boolean isTamperingEval) {
724         this.isTamperingEval = isTamperingEval;
725         return this;
726     }
727 
728     public PreferencesUtil withIsTamperingSpaceToMultilineComment(boolean isTamperingSpaceToMultilineComment) {
729         this.isTamperingSpaceToMultilineComment = isTamperingSpaceToMultilineComment;
730         return this;
731     }
732 
733     public PreferencesUtil withIsTamperingSpaceToDashComment(boolean isTamperingSpaceToDashComment) {
734         this.isTamperingSpaceToDashComment = isTamperingSpaceToDashComment;
735         return this;
736     }
737 
738     public PreferencesUtil withIsTamperingSpaceToSharpComment(boolean isTamperingSpaceToSharpComment) {
739         this.isTamperingSpaceToSharpComment = isTamperingSpaceToSharpComment;
740         return this;
741     }
742 
743     public PreferencesUtil withCsrfUserTag(String csrfUserTag) {
744         this.csrfUserTag = csrfUserTag;
745         return this;
746     }
747     
748     public PreferencesUtil withCsrfUserTagOutput(String csrfUserTagOutput) {
749         this.csrfUserTagOutput = csrfUserTagOutput;
750         return this;
751     }
752 
753     public PreferencesUtil withIsCsrfUserTag(boolean isCsrfUserTag) {
754         this.isCsrfUserTag = isCsrfUserTag;
755         return this;
756     }
757 
758     public PreferencesUtil withIsLimitingThreads(boolean isLimitingThreads) {
759         this.isLimitingThreads = isLimitingThreads;
760         return this;
761     }
762     
763     public PreferencesUtil withIsConnectionTimeout(boolean isConnectionTimeout) {
764         this.isConnectionTimeout = isConnectionTimeout;
765         return this;
766     }
767     
768     public PreferencesUtil withIsLimitingSleepTimeStrategy(boolean isLimitingSleepTimeStrategy) {
769         this.isLimitingSleepTimeStrategy = isLimitingSleepTimeStrategy;
770         return this;
771     }
772 
773     public PreferencesUtil withCountLimitingThreads(int countLimitingThreads) {
774         this.countLimitingThreads = countLimitingThreads;
775         return this;
776     }
777     
778     public PreferencesUtil withCountConnectionTimeout(int countConnectionTimeout) {
779         this.countConnectionTimeout = countConnectionTimeout;
780         return this;
781     }
782     
783     public PreferencesUtil withCountSleepTimeStrategy(int countSleepTimeStrategy) {
784         this.countSleepTimeStrategy = countSleepTimeStrategy;
785         return this;
786     }
787     
788     public PreferencesUtil withIsZipStrategy(boolean isZipStrategy) {
789         this.isZipStrategy = isZipStrategy;
790         return this;
791     }
792     
793     public PreferencesUtil withIsDefaultStrategy(boolean isDefaultStrategy) {
794         this.isDefaultStrategy = isDefaultStrategy;
795         return this;
796     }
797     
798     public PreferencesUtil withIsDiosStrategy(boolean isDiosStrategy) {
799         this.isDiosStrategy = isDiosStrategy;
800         return this;
801     }
802     
803     public PreferencesUtil withIsPerfIndexDisabled(boolean isPerfIndexDisabled) {
804         this.isPerfIndexDisabled = isPerfIndexDisabled;
805         return this;
806     }
807     
808     public PreferencesUtil withIsUrlEncodingDisabled(boolean isUrlEncodingDisabled) {
809         this.isUrlEncodingDisabled = isUrlEncodingDisabled;
810         return this;
811     }
812 
813     public PreferencesUtil withIsUrlRandomSuffixDisabled(boolean isUrlRandomSuffixDisabled) {
814         this.isUrlRandomSuffixDisabled = isUrlRandomSuffixDisabled;
815         return this;
816     }
817 
818     public PreferencesUtil withIsLimitingUnionIndex(boolean isLimitingUnionIndex) {
819         this.isLimitingUnionIndex = isLimitingUnionIndex;
820         return this;
821     }
822 
823     public PreferencesUtil withCountUnionIndex(int countUnionIndex) {
824         this.countUnionIndex = countUnionIndex;
825         return this;
826     }
827 
828     public PreferencesUtil withDnsDomain(String dnsDomain) {
829         this.dnsDomain = dnsDomain;
830         return this;
831     }
832 
833     public PreferencesUtil withDnsPort(String dnsPort) {
834         this.dnsPort = dnsPort;
835         return this;
836     }
837 
838     public PreferencesUtil withIsStrategyTimeDisabled(boolean isStrategyTimeDisabled) {
839         this.isStrategyTimeDisabled = isStrategyTimeDisabled;
840         return this;
841     }
842 
843     public PreferencesUtil withIsStrategyBlindBitDisabled(boolean isStrategyBlindBitDisabled) {
844         this.isStrategyBlindBitDisabled = isStrategyBlindBitDisabled;
845         return this;
846     }
847 
848     public PreferencesUtil withIsStrategyBlindBinDisabled(boolean isStrategyBlindBinDisabled) {
849         this.isStrategyBlindBinDisabled = isStrategyBlindBinDisabled;
850         return this;
851     }
852 
853     public PreferencesUtil withIsStrategyMultibitDisabled(boolean isStrategyMultibitDisabled) {
854         this.isStrategyMultibitDisabled = isStrategyMultibitDisabled;
855         return this;
856     }
857 
858     public PreferencesUtil withIsStrategyStackDisabled(boolean isStrategyStackDisabled) {
859         this.isStrategyStackDisabled = isStrategyStackDisabled;
860         return this;
861     }
862 
863     public PreferencesUtil withIsStrategyDnsDisabled(boolean isStrategyDnsDisabled) {
864         this.isStrategyDnsDisabled = isStrategyDnsDisabled;
865         return this;
866     }
867 
868     public PreferencesUtil withIsStrategyErrorDisabled(boolean isStrategyErrorDisabled) {
869         this.isStrategyErrorDisabled = isStrategyErrorDisabled;
870         return this;
871     }
872 
873     public PreferencesUtil withIsStrategyUnionDisabled(boolean isStrategyUnionDisabled) {
874         this.isStrategyUnionDisabled = isStrategyUnionDisabled;
875         return this;
876     }
877 
878     public PreferencesUtil withThemeFlatLafName(String themeFlatLafName) {
879         this.themeFlatLafName = themeFlatLafName;
880         return this;
881     }
882 
883     public PreferencesUtil withIsUrlDecodeNetworkTab(boolean isUrlDecodeNetworkTab) {
884         this.isUrlDecodeNetworkTab = isUrlDecodeNetworkTab;
885         return this;
886     }
887 
888     public PreferencesUtil withLanguageTag(String languageTag) {
889         this.languageTag = languageTag;
890         return this;
891     }
892 
893     public PreferencesUtil withIsUserAgentRandom(boolean selected) {
894         this.isUserAgentRandom = selected;
895         return this;
896     }
897 }