kingfisher/testdata/java_vulnerable.java
2025-06-24 17:17:16 -07:00

87 lines
No EOL
4.1 KiB
Java
Vendored
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// public class HelloWorld {
// public static void main(String[] args) {
// Prints "Hello, World" to the terminal window.
private static String ipAddress = new String("8.8.8.8");
private static String password = new String("s3cr3tp@ssw0rd"); //NOKINGFISHER
private static String passwd = new String("9043hfdlasf023");
private static String pwd = new String("a9lah209la81la3");
private static String passphrase = new String("all along the watchtower");
private static String key = new String("qpsbnoewdmdsoeg");
private static String secret_key = new String("402750613792034973");
private static String private_key = new String("ja4wALsaho20af21dS");
//
private static String ipAddress = "8.8.8.8";
private static String password = "s3cr3tp@ssw0rd 2";//NOKINGFISHER
private static String passwd = "9043hfdlasf023";
private static String pwd = "a9lah209la81la3";
private static String passphrase = "all along the watchtower";
private static String key = "qpsbnoewdmdsoeg";
private static String secret_key = "402750613792034973";
private static String private_key = "ja4wALsaho20af21dS";
//
private static String ipAddress = "1a2w3eqwerty";
private static String password = "grape1999";
private static String passwd = "grape2020";
private static String pwd = "qwertyuiop123";
private static String passphrase = "trustno1"; //NOKINGFISHER
private static String key_id = "AKIA6ODU5DHT7VPXGCE4";
private static String aws_secret = "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";
private static String hidden_passphrase = "blink182";
System.out.println("Hello, World");
// }
// }
public class HelloWorld{
String strPassword;
String foobarPassword;
String horsePassword;
public static void main(String []args){
HelloWorld myObj1 = new HelloWorld();
myObj1.strPassword = "sunshine123";
myObj1.foobarPassword = "kingpin987";
myObj1.horsePassword = "kingpin987";
// Prints "Hello, World" to the terminal window.
private static String ipAddress = new String("8.8.8.8");
private static String password = new String("s3cr3tp@ssw0rd"); //NOKINGFISHER
private static String passwd = new String("9043hfdlasf023");
private static String pwd = new String("a9lah209la81la3");
private static String passphrase = new String("all along the watchtower");
private static String key = new String("qpsbnoewdmdsoeg");
private static String secret_key = new String("402750613792034973");
private static String private_key = new String("ja4wALsaho20af21dS");
//
private static String ipAddress = "8.8.8.8";
private static String password = "s3cr3tp@ssw0rd 2";//NOKINGFISHER
private static String passwd = "9043hfdlasf023";
private static String pwd = "a9lah209la81la3";
private static String passphrase = "all along the watchtower";
private static String key = "qpsbnoewdmdsoeg";
private static String secret_key = "402750613792034973";
private static String private_key = "ja4wALsaho20af21dS";
//
private static String ipAddress = "1a2w3eqwerty";
private static String password = "grape87";
private static String passwd = "grape2020";
private static String pwd = "qwertyuiop123";
private static String passphrase = "trustno1"; //NOKINGFISHER
System.out.println("Hello, World");
try{
Hashtable env = new Hashtable();
env.put(Context.SECURITY_CREDENTIALS,"412389uSwYkRm1Tg!");
env.put(Context.SECURITY_PRINCIPAL,"fakefakefake@contoso.com");
dirContext = new InitialDirContext(env);
System.out.println("InitialDirContext");
}catch(Exception e){
System.out.println(e.getMessage());
System.out.println(e);
}
}
}