| 1 | package com.jsql.view.subscriber; | |
| 2 | ||
| 3 | import com.jsql.model.bean.database.AbstractElementDatabase; | |
| 4 | import com.jsql.model.bean.database.Column; | |
| 5 | import com.jsql.model.bean.database.Database; | |
| 6 | import com.jsql.model.bean.database.Table; | |
| 7 | import com.jsql.model.injection.strategy.AbstractStrategy; | |
| 8 | import com.jsql.model.injection.strategy.blind.callable.AbstractCallableBit; | |
| 9 | import com.jsql.model.injection.engine.model.Engine; | |
| 10 | import org.apache.logging.log4j.util.Strings; | |
| 11 | ||
| 12 | import java.util.*; | |
| 13 | import java.util.function.BiConsumer; | |
| 14 | ||
| 15 | public sealed interface Seal permits | |
| 16 | Seal.AddColumns, | |
| 17 | Seal.AddDatabases, | |
| 18 | Seal.AddTables, | |
| 19 | Seal.CreateValuesTab, | |
| 20 | ||
| 21 | Seal.MarkEngineFound, | |
| 22 | Seal.ActivateEngine, | |
| 23 | ||
| 24 | Seal.MarkStrategyInvulnerable, | |
| 25 | Seal.MarkStrategyVulnerable, | |
| 26 | Seal.ActivateStrategy, | |
| 27 | ||
| 28 | Seal.MarkFileSystemInvulnerable, | |
| 29 | Seal.MarkFileSystemVulnerable, | |
| 30 | ||
| 31 | Seal.MessageBinary, | |
| 32 | Seal.MessageChunk, | |
| 33 | Seal.MessageHeader, | |
| 34 | ||
| 35 | Seal.AddTabExploitSql, | |
| 36 | Seal.AddTabExploitUdf, | |
| 37 | Seal.AddTabExploitWeb, | |
| 38 | Seal.GetTerminalResult, | |
| 39 | ||
| 40 | Seal.CreateAdminPageTab, | |
| 41 | Seal.CreateAnalysisReport, | |
| 42 | Seal.CreateFileTab, | |
| 43 | ||
| 44 | Seal.EndIndeterminateProgress, | |
| 45 | Seal.EndPreparation, | |
| 46 | Seal.EndProgress, | |
| 47 | Seal.StartIndeterminateProgress, | |
| 48 | Seal.StartProgress, | |
| 49 | Seal.UpdateProgress { | |
| 50 | ||
| 51 | record AddColumns(List<Column> columns) implements Seal {} | |
| 52 | record AddDatabases(List<Database> databases) implements Seal {} | |
| 53 | record AddTables(List<Table> tables) implements Seal {} | |
| 54 | record CreateValuesTab(String[] columns, String[][] table, Table tableBean) implements Seal { | |
| 55 | ||
| 56 | @Override | |
| 57 | public boolean equals(Object o) { | |
| 58 |
3
1. equals : replaced boolean return with true for com/jsql/view/subscriber/Seal$CreateValuesTab::equals → NO_COVERAGE 2. equals : negated conditional → NO_COVERAGE 3. equals : negated conditional → NO_COVERAGE |
if (o == null || this.getClass() != o.getClass()) return false; |
| 59 | CreateValuesTab that = (CreateValuesTab) o; | |
| 60 |
4
1. equals : negated conditional → NO_COVERAGE 2. equals : negated conditional → NO_COVERAGE 3. equals : replaced boolean return with true for com/jsql/view/subscriber/Seal$CreateValuesTab::equals → NO_COVERAGE 4. equals : negated conditional → NO_COVERAGE |
return Objects.equals(this.tableBean, that.tableBean) && Objects.deepEquals(this.columns, that.columns) && Objects.deepEquals(this.table, that.table); |
| 61 | } | |
| 62 | ||
| 63 | @Override | |
| 64 | public int hashCode() { | |
| 65 |
1
1. hashCode : replaced int return with 0 for com/jsql/view/subscriber/Seal$CreateValuesTab::hashCode → NO_COVERAGE |
return Objects.hash(Arrays.hashCode(this.columns), Arrays.deepHashCode(this.table), this.tableBean); |
| 66 | } | |
| 67 | ||
| 68 | @Override | |
| 69 | public String toString() { | |
| 70 |
1
1. toString : replaced return value with "" for com/jsql/view/subscriber/Seal$CreateValuesTab::toString → NO_COVERAGE |
return "CreateValuesTab{" + |
| 71 | "columns=" + Arrays.toString(columns) + | |
| 72 | ", table=" + Arrays.toString(table) + | |
| 73 | ", tableBean=" + tableBean + | |
| 74 | '}'; | |
| 75 | } | |
| 76 | } | |
| 77 | ||
| 78 | /** End the refreshing of administration page search button */ | |
| 79 | record MarkEngineFound(Engine engine) implements Seal {} | |
| 80 | record ActivateEngine(Engine engine) implements Seal {} | |
| 81 | ||
| 82 | record MarkStrategyInvulnerable(int indexError, AbstractStrategy strategy) implements Seal { | |
| 83 | public MarkStrategyInvulnerable(AbstractStrategy strategy) { | |
| 84 | this(-1, strategy); | |
| 85 | } | |
| 86 | } | |
| 87 | record MarkStrategyVulnerable(int indexError, AbstractStrategy strategy) implements Seal { | |
| 88 | public MarkStrategyVulnerable(AbstractStrategy strategy) { | |
| 89 | this(-1, strategy); | |
| 90 | } | |
| 91 | } | |
| 92 | record ActivateStrategy(AbstractStrategy strategy) implements Seal {} | |
| 93 | ||
| 94 | record MarkFileSystemInvulnerable() implements Seal {} | |
| 95 | record MarkFileSystemVulnerable() implements Seal {} | |
| 96 | ||
| 97 | record MessageChunk(String message) implements Seal {} | |
| 98 | record MessageBinary(String message) implements Seal {} | |
| 99 | record MessageHeader( | |
| 100 | String url, | |
| 101 | String post, | |
| 102 | Map<String, String> header, | |
| 103 | Map<String, String> response, | |
| 104 | String source, | |
| 105 | String size, | |
| 106 | String metadataStrategy, | |
| 107 | String metadataProcess, | |
| 108 | AbstractCallableBit<?> metadataBoolean | |
| 109 | ) implements Seal { | |
| 110 | public MessageHeader( | |
| 111 | String url, | |
| 112 | String post, | |
| 113 | Map<String, String> header, | |
| 114 | Map<String, String> response, | |
| 115 | String source, | |
| 116 | String size, | |
| 117 | String metadataStrategy, | |
| 118 | String metadataProcess, | |
| 119 | AbstractCallableBit<?> metadataBoolean | |
| 120 | ) { | |
| 121 | this.url = url == null ? Strings.EMPTY : url; | |
| 122 | this.post = post == null ? Strings.EMPTY : post; | |
| 123 | this.header = header == null ? Collections.emptyMap() : header; | |
| 124 | this.response = response == null ? Collections.emptyMap() : response; | |
| 125 | this.source = source == null ? Strings.EMPTY : source; | |
| 126 | this.size = size == null ? Strings.EMPTY : size; | |
| 127 | this.metadataStrategy = metadataStrategy == null ? Strings.EMPTY : metadataStrategy; | |
| 128 | this.metadataProcess = metadataProcess == null ? Strings.EMPTY : metadataProcess; | |
| 129 | this.metadataBoolean = metadataBoolean; | |
| 130 | } | |
| 131 | } | |
| 132 | ||
| 133 | record AddTabExploitSql(String urlSuccess, String username, String password) implements Seal {} | |
| 134 | record AddTabExploitUdf(BiConsumer<String, UUID> biConsumerRunCmd) implements Seal {} | |
| 135 | record AddTabExploitWeb(String urlSuccess) implements Seal {} | |
| 136 | record GetTerminalResult(UUID uuidShell, String result) implements Seal {} | |
| 137 | ||
| 138 | record CreateAdminPageTab(String urlSuccess) implements Seal {} | |
| 139 | record CreateAnalysisReport(String content) implements Seal {} | |
| 140 | record CreateFileTab(String name, String content, String path) implements Seal {} | |
| 141 | ||
| 142 | record EndIndeterminateProgress(Table table) implements Seal {} | |
| 143 | record EndPreparation() implements Seal {} | |
| 144 | record EndProgress(AbstractElementDatabase elementDatabase) implements Seal {} | |
| 145 | record StartIndeterminateProgress(Table table) implements Seal {} | |
| 146 | record StartProgress(AbstractElementDatabase elementDatabase) implements Seal {} | |
| 147 | record UpdateProgress(AbstractElementDatabase elementDatabase, int countProgress) implements Seal {} | |
| 148 | } | |
Mutations | ||
| 58 |
1.1 2.2 3.3 |
|
| 60 |
1.1 2.2 3.3 4.4 |
|
| 65 |
1.1 |
|
| 70 |
1.1 |