Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.59 KB | None | 0 0
  1. import java.awt.Desktop;
  2. import java.io.IOException;
  3. import java.lang.System.Logger.Level;
  4. import java.net.MalformedURLException;
  5. import java.net.URL;
  6. import java.util.Scanner;
  7. import java.util.logging.Logger;
  8.  
  9. import com.gargoylesoftware.css.parser.CSSException;
  10. import com.gargoylesoftware.css.parser.CSSParseException;
  11. import com.gargoylesoftware.htmlunit.DefaultCssErrorHandler;
  12. import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
  13. import com.gargoylesoftware.htmlunit.WebClient;
  14. import com.gargoylesoftware.htmlunit.html.HtmlPage;
  15.  
  16. public class neder {
  17. static String user;
  18. static String pass;
  19. public static void main(String[] args) {
  20.  
  21. System.out.println(" ________ __ __ __ ______ ______ \r\n" +
  22. "/ | / | / | / | / | / \\ \r\n" +
  23. "$$$$$$$$/ _______ ____$$ | ______ ______ $$/ _______ _$$ |_ $$$$$$/ /$$$$$$ |\r\n" +
  24. "$$ |__ / \\ / $$ | / \\ / \\ / |/ \\ / $$ | $$ | $$ | $$ |\r\n" +
  25. "$$ | $$$$$$$ |/$$$$$$$ |/$$$$$$ |/$$$$$$ |$$ |$$$$$$$ |$$$$$$/ $$ | $$ | $$ |\r\n" +
  26. "$$$$$/ $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ | $$ | $$ | __ $$ | $$ | $$ |\r\n" +
  27. "$$ |_____ $$ | $$ |$$ \\__$$ |$$ |__$$ |$$ \\__$$ |$$ |$$ | $$ | $$ |/ | _$$ |_ $$ \\__$$ |\r\n" +
  28. "$$ |$$ | $$ |$$ $$ |$$ $$/ $$ $$/ $$ |$$ | $$ | $$ $$/ / $$ |$$ $$/ \r\n" +
  29. "$$$$$$$$/ $$/ $$/ $$$$$$$/ $$$$$$$/ $$$$$$/ $$/ $$/ $$/ $$$$/ $$$$$$/ $$$$$$/ \r\n" +
  30. " $$ | \r\n" +
  31. " $$ | \r\n" +
  32. " $$/ ");
  33. System.out.println("\nEndpointIO v0\nDeveloped by santa claus#6969");
  34.  
  35. Scanner input = new Scanner(System.in);
  36.  
  37. System.out.println("\nPlease enter your username");
  38. user = input.next();
  39. System.out.println("\nPlease enter your password");
  40. pass = input.next();
  41. if(user.contentEquals("santa") && pass.contentEquals("claus")) {
  42. semi();
  43. }
  44. else {
  45. System.out.println("User or pass incorrect, ending script.");
  46. System.exit(1);
  47. }
  48. }
  49. public class QuietCssErrorHandler
  50. extends DefaultCssErrorHandler
  51. {
  52.  
  53. @Override public void error( CSSParseException e ) throws CSSException
  54. {
  55. super.error( e ) ;
  56. }
  57.  
  58. @Override public void fatalError( CSSParseException e ) throws CSSException
  59. {
  60. super.fatalError( e ) ;
  61. }
  62.  
  63. @Override public void warning( CSSParseException e ) throws CSSException
  64. {
  65. }
  66. }
  67. static void semi() {
  68. Scanner input = new Scanner(System.in);
  69. try {
  70. if (System.getProperty("os.name").contains("Windows"))
  71. new ProcessBuilder("cmd", "/c", "cls").inheritIO().start().waitFor();
  72. else
  73. Runtime.getRuntime().exec("clear");
  74. } catch (IOException | InterruptedException ex) {}
  75. System.out.print("Welcome to the very first version of Endpoint IO, redone by santa himself ;)\n\nEnter a site url: ");
  76. String myString = input.next();
  77. boolean isFound = myString.contains("http");
  78. System.out.print("Enter the product's variant: ");
  79. String var = input.next();
  80. String link = ("");
  81. if (isFound) {
  82. link = (myString + "/cart/add?quantity=1&id=" + var);
  83. }
  84. else
  85. {
  86. link = ("http://" + myString + "/cart/add?quantity=1&id=" + var);
  87. }
  88. try (final WebClient webClient = new WebClient()) {
  89. try {
  90. webClient.getOptions().setJavaScriptEnabled(false);
  91. final HtmlPage page = webClient.getPage(link);
  92. } catch (FailingHttpStatusCodeException e) {
  93. // TODO Auto-generated catch block
  94. e.printStackTrace();
  95. } catch (MalformedURLException e) {
  96. // TODO Auto-generated catch block
  97. e.printStackTrace();
  98. } catch (IOException e) {
  99. // TODO Auto-generated catch block
  100. e.printStackTrace();
  101. }
  102. System.out.println("\nWould you like to generate more links? Answer \"y\" or \"n\"");
  103. String answer = input.next();
  104. if(answer.contentEquals("y")) {
  105. semi();
  106. }
  107. else {
  108. System.out.println("Session complete, ending script.");
  109. System.exit(0);
  110. }
  111. }
  112. }
  113. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement