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