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