-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
isayan
committed
Jul 20, 2024
1 parent
8717f26
commit 5cbcecf
Showing
11 changed files
with
316 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package yagura.model; | ||
|
||
import com.google.gson.annotations.Expose; | ||
import extend.util.external.TransUtil; | ||
import extension.burp.IPropertyConfig; | ||
import extension.helpers.json.JsonUtil; | ||
import java.nio.charset.StandardCharsets; | ||
|
||
/** | ||
* | ||
* @author isayan | ||
*/ | ||
public class YaguraProperty implements IPropertyConfig { | ||
|
||
public final static String YAGURA_PROPERTY = "YaguraProperty"; | ||
|
||
@Expose | ||
private String selectEncoding = StandardCharsets.UTF_8.name(); | ||
|
||
/** | ||
* @return the selectEncoding | ||
*/ | ||
public String getSelectEncoding() { | ||
return selectEncoding; | ||
} | ||
|
||
/** | ||
* @param selectEncoding the selectEncoding to set | ||
*/ | ||
public void setSelectEncoding(String selectEncoding) { | ||
this.selectEncoding = selectEncoding; | ||
} | ||
|
||
@Expose | ||
private TransUtil.EncodeType encodeType = TransUtil.EncodeType.ALL; | ||
|
||
/** | ||
* @return the encodeType | ||
*/ | ||
public TransUtil.EncodeType getEncodeType() { | ||
return encodeType; | ||
} | ||
|
||
/** | ||
* @param encodeType the encodeType to set | ||
*/ | ||
public void setEncodeType(TransUtil.EncodeType encodeType) { | ||
this.encodeType = encodeType; | ||
} | ||
|
||
public void setProperty(YaguraProperty property) { | ||
this.setSelectEncoding(property.getSelectEncoding()); | ||
this.setEncodeType(property.getEncodeType()); | ||
} | ||
|
||
@Override | ||
public String getSettingName() { | ||
return YAGURA_PROPERTY; | ||
} | ||
|
||
@Override | ||
public void saveSetting(String value) { | ||
YaguraProperty property = JsonUtil.jsonFromString(value, YaguraProperty.class, true); | ||
this.setProperty(property); | ||
} | ||
|
||
@Override | ||
public String loadSetting() { | ||
return JsonUtil.jsonToString(this, true); | ||
} | ||
|
||
@Override | ||
public String defaultSetting() { | ||
YaguraProperty property = new YaguraProperty(); | ||
return JsonUtil.jsonToString(property, true); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters