Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Desktop;
- import java.io.IOException;
- import java.lang.System.Logger.Level;
- import java.net.MalformedURLException;
- import java.net.URL;
- import java.util.Scanner;
- import java.util.logging.Logger;
- import com.gargoylesoftware.css.parser.CSSException;
- import com.gargoylesoftware.css.parser.CSSParseException;
- import com.gargoylesoftware.htmlunit.DefaultCssErrorHandler;
- import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
- import com.gargoylesoftware.htmlunit.WebClient;
- import com.gargoylesoftware.htmlunit.html.HtmlPage;
- public class neder {
- static String user;
- static String pass;
- public static void main(String[] args) {
- System.out.println(" ________ __ __ __ ______ ______ \r\n" +
- "/ | / | / | / | / | / \\ \r\n" +
- "$$$$$$$$/ _______ ____$$ | ______ ______ $$/ _______ _$$ |_ $$$$$$/ /$$$$$$ |\r\n" +
- "$$ |__ / \\ / $$ | / \\ / \\ / |/ \\ / $$ | $$ | $$ | $$ |\r\n" +
- "$$ | $$$$$$$ |/$$$$$$$ |/$$$$$$ |/$$$$$$ |$$ |$$$$$$$ |$$$$$$/ $$ | $$ | $$ |\r\n" +
- "$$$$$/ $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ | $$ | $$ | __ $$ | $$ | $$ |\r\n" +
- "$$ |_____ $$ | $$ |$$ \\__$$ |$$ |__$$ |$$ \\__$$ |$$ |$$ | $$ | $$ |/ | _$$ |_ $$ \\__$$ |\r\n" +
- "$$ |$$ | $$ |$$ $$ |$$ $$/ $$ $$/ $$ |$$ | $$ | $$ $$/ / $$ |$$ $$/ \r\n" +
- "$$$$$$$$/ $$/ $$/ $$$$$$$/ $$$$$$$/ $$$$$$/ $$/ $$/ $$/ $$$$/ $$$$$$/ $$$$$$/ \r\n" +
- " $$ | \r\n" +
- " $$ | \r\n" +
- " $$/ ");
- System.out.println("\nEndpointIO v0\nDeveloped by santa claus#6969");
- Scanner input = new Scanner(System.in);
- System.out.println("\nPlease enter your username");
- user = input.next();
- System.out.println("\nPlease enter your password");
- pass = input.next();
- if(user.contentEquals("santa") && pass.contentEquals("claus")) {
- semi();
- }
- else {
- System.out.println("User or pass incorrect, ending script.");
- System.exit(1);
- }
- }
- public class QuietCssErrorHandler
- extends DefaultCssErrorHandler
- {
- @Override public void error( CSSParseException e ) throws CSSException
- {
- super.error( e ) ;
- }
- @Override public void fatalError( CSSParseException e ) throws CSSException
- {
- super.fatalError( e ) ;
- }
- @Override public void warning( CSSParseException e ) throws CSSException
- {
- }
- }
- static void semi() {
- Scanner input = new Scanner(System.in);
- try {
- if (System.getProperty("os.name").contains("Windows"))
- new ProcessBuilder("cmd", "/c", "cls").inheritIO().start().waitFor();
- else
- Runtime.getRuntime().exec("clear");
- } catch (IOException | InterruptedException ex) {}
- System.out.print("Welcome to the very first version of Endpoint IO, redone by santa himself ;)\n\nEnter a site url: ");
- String myString = input.next();
- boolean isFound = myString.contains("http");
- System.out.print("Enter the product's variant: ");
- String var = input.next();
- String link = ("");
- if (isFound) {
- link = (myString + "/cart/add?quantity=1&id=" + var);
- }
- else
- {
- link = ("http://" + myString + "/cart/add?quantity=1&id=" + var);
- }
- try (final WebClient webClient = new WebClient()) {
- try {
- webClient.getOptions().setJavaScriptEnabled(false);
- final HtmlPage page = webClient.getPage(link);
- } catch (FailingHttpStatusCodeException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- System.out.println("\nWould you like to generate more links? Answer \"y\" or \"n\"");
- String answer = input.next();
- if(answer.contentEquals("y")) {
- semi();
- }
- else {
- System.out.println("Session complete, ending script.");
- System.exit(0);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement