Skip to content

Commit

Permalink
Small formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
qtc-de committed Oct 3, 2023
1 parent d397005 commit aa9637a
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 66 deletions.
8 changes: 4 additions & 4 deletions src/de/qtc/rmg/Starter.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
*
* @author Tobias Neitzel (@qtc_de)
*/
public class Starter {

public static void main(String[] argv) {

public class Starter
{
public static void main(String[] argv)
{
ArgumentHandler handler = new ArgumentHandler(argv);
Operation operation = handler.getAction();

Expand Down
8 changes: 6 additions & 2 deletions src/de/qtc/rmg/endpoints/KnownEndpoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*
* @author Tobias Neitzel (@qtc_de)
*/
public class KnownEndpoint {

public class KnownEndpoint
{
private String name;
private String description;

Expand Down Expand Up @@ -96,9 +96,13 @@ public void printEnum()
String format = String.format("(known class: %s)", name);

if( vulnerabilities.size() == 0 )
{
Logger.printlnPlainGreen(format);
}

else
{
Logger.printlnPlainYellow(format);
}
}
}
24 changes: 16 additions & 8 deletions src/de/qtc/rmg/endpoints/KnownEndpointHolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*
* @author Tobias Neitzel (@qtc_de)
*/
public class KnownEndpointHolder {

public class KnownEndpointHolder
{
private List<KnownEndpoint> knownEndpoints = null;
private static KnownEndpointHolder instance = null;

Expand Down Expand Up @@ -53,13 +53,18 @@ public void setKnownEndpoints(List<KnownEndpoint> knownEndpoints)
*/
public KnownEndpoint lookup(String className)
{
if( knownEndpoints == null )
if (knownEndpoints == null)
{
return null;
}

for( KnownEndpoint endpoint : knownEndpoints )

if( endpoint.getClassName().contains(className) )
for (KnownEndpoint endpoint : knownEndpoints)
{
if (endpoint.getClassName().contains(className))
{
return endpoint;
}
}

return null;
}
Expand All @@ -73,8 +78,10 @@ public KnownEndpoint lookup(String className)
*/
public boolean isKnown(String className)
{
if( lookup(className) == null )
if (lookup(className) == null)
{
return false;
}

return true;
}
Expand All @@ -92,7 +99,8 @@ public boolean isKnown(String className)
*/
public static KnownEndpointHolder getHolder()
{
if( instance == null ) {
if (instance == null)
{
Yaml yaml = new Yaml(new Constructor(KnownEndpointHolder.class));

InputStream stream = KnownEndpoint.class.getResourceAsStream(resource);
Expand Down
4 changes: 2 additions & 2 deletions src/de/qtc/rmg/endpoints/Vulnerability.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
*
* @author Tobias Neitzel (@qtc_de)
*/
public class Vulnerability {

public class Vulnerability
{
private String name;
private String description;

Expand Down
7 changes: 4 additions & 3 deletions src/de/qtc/rmg/exceptions/MalformedPluginException.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
*
* @author Tobias Neitzel (@qtc_de)
*/
public class MalformedPluginException extends Exception {

public class MalformedPluginException extends Exception
{
private static final long serialVersionUID = 1L;

public MalformedPluginException() {}

public MalformedPluginException(String message) {
public MalformedPluginException(String message)
{
super(message);
}
}
6 changes: 3 additions & 3 deletions src/de/qtc/rmg/exceptions/SSRFException.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.io.Serializable;

public class SSRFException extends Exception implements Serializable {

public class SSRFException extends Exception implements Serializable
{
private static final long serialVersionUID = 1L;
}
}
8 changes: 5 additions & 3 deletions src/de/qtc/rmg/exceptions/UnexpectedCharacterException.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
* @author Tobias Neitzel (@qtc_de)
*/
@SuppressWarnings("serial")
public class UnexpectedCharacterException extends Exception {
public class UnexpectedCharacterException extends Exception
{
public UnexpectedCharacterException() {}

public UnexpectedCharacterException(String message) {
public UnexpectedCharacterException(String message)
{
super(message);
}
}
}
Loading

0 comments on commit aa9637a

Please sign in to comment.