This file contains hidden or 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
#!/bin/sh | |
# | |
# init script for a Java application | |
# | |
# Check the application status | |
# | |
# This function checks if the application is running | |
check_status() { | |
# Running ps with some arguments to check if the PID exists | |
# -C : specifies the command name |
This file contains hidden or 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
@Slf4j | |
@Getter | |
@Setter | |
@NoArgsConstructor | |
@AllArgsConstructor | |
public class SsrfChecker { | |
private List<String> allowedProtocols; | |
private List<Integer> allowedPorts; | |
private List<String> deniedHosts; | |
private List<String> allowedHosts; |
This file contains hidden or 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
public class Subset { | |
@SafeVarargs | |
public static <T> List<List<T>> subsets(T... items) { | |
List<T> elements = new ArrayList<>(new HashSet<>(Arrays.asList(items))); | |
List<List<T>> results = new ArrayList<>(); | |
for (T e : elements) { | |
// Record size as the list will change | |
int size = results.size(); | |
for (int i = 0; i < size; i++) { |