Created
February 15, 2016 01:33
-
-
Save pwnfoo/77cacbb5678c3ffa678e to your computer and use it in GitHub Desktop.
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
| /* | |
| * Decompiled with CFR 0_110. | |
| * | |
| * Could not load the following classes: | |
| * org.eclipse.swt.events.FocusAdapter | |
| * org.eclipse.swt.events.FocusEvent | |
| * org.eclipse.swt.events.FocusListener | |
| * org.eclipse.swt.events.SelectionAdapter | |
| * org.eclipse.swt.events.SelectionEvent | |
| * org.eclipse.swt.events.SelectionListener | |
| * org.eclipse.swt.graphics.Color | |
| * org.eclipse.swt.graphics.Font | |
| * org.eclipse.swt.widgets.Button | |
| * org.eclipse.swt.widgets.Composite | |
| * org.eclipse.swt.widgets.Display | |
| * org.eclipse.swt.widgets.Label | |
| * org.eclipse.swt.widgets.Shell | |
| * org.eclipse.swt.widgets.Text | |
| * org.eclipse.swt.widgets.Widget | |
| * org.eclipse.wb.swt.SWTResourceManager | |
| */ | |
| package com.code.anokha; | |
| import com.code.anokha.CryptName; | |
| import org.eclipse.swt.events.FocusAdapter; | |
| import org.eclipse.swt.events.FocusEvent; | |
| import org.eclipse.swt.events.FocusListener; | |
| import org.eclipse.swt.events.SelectionAdapter; | |
| import org.eclipse.swt.events.SelectionEvent; | |
| import org.eclipse.swt.events.SelectionListener; | |
| import org.eclipse.swt.graphics.Color; | |
| import org.eclipse.swt.graphics.Font; | |
| import org.eclipse.swt.widgets.Button; | |
| import org.eclipse.swt.widgets.Composite; | |
| import org.eclipse.swt.widgets.Display; | |
| import org.eclipse.swt.widgets.Label; | |
| import org.eclipse.swt.widgets.Shell; | |
| import org.eclipse.swt.widgets.Text; | |
| import org.eclipse.swt.widgets.Widget; | |
| import org.eclipse.wb.swt.SWTResourceManager; | |
| public class productKey { | |
| protected Shell shlProductXKey; | |
| private Text nametext; | |
| private Text producttext; | |
| CryptName cryptname = null; | |
| public static void main(String[] args) { | |
| try { | |
| productKey window = new productKey(); | |
| window.open(); | |
| } | |
| catch (Exception e) { | |
| e.printStackTrace(); | |
| } | |
| } | |
| public void open() { | |
| Display display = Display.getDefault(); | |
| this.createContents(); | |
| this.shlProductXKey.open(); | |
| this.shlProductXKey.layout(); | |
| while (!this.shlProductXKey.isDisposed()) { | |
| if (display.readAndDispatch()) continue; | |
| display.sleep(); | |
| } | |
| } | |
| protected void createContents() { | |
| this.cryptname = new CryptName(); | |
| this.shlProductXKey = new Shell(); | |
| this.shlProductXKey.setSize(420, 190); | |
| this.shlProductXKey.setText("Product X Key"); | |
| Composite composite = new Composite((Composite)this.shlProductXKey, 0); | |
| composite.setBounds(10, 10, 399, 145); | |
| this.nametext = new Text(composite, 16779264); | |
| this.nametext.setBounds(128, 28, 258, 19); | |
| Label lblNewLabel = new Label(composite, 0); | |
| lblNewLabel.setFont(SWTResourceManager.getFont((String)"Lucida Grande", (int)12, (int)0)); | |
| lblNewLabel.setBounds(10, 28, 54, 16); | |
| lblNewLabel.setText("Name"); | |
| this.producttext = new Text(composite, 16779264); | |
| this.producttext.setBackground(SWTResourceManager.getColor((int)1)); | |
| this.producttext.setBounds(128, 60, 258, 19); | |
| Label lblProductKey = new Label(composite, 0); | |
| lblProductKey.setBounds(10, 61, 83, 14); | |
| lblProductKey.setText("Product key"); | |
| Button SubmitButton = new Button(composite, 0); | |
| SubmitButton.setBounds(295, 100, 94, 28); | |
| SubmitButton.setText("Enter"); | |
| final Label StatusBar = new Label(composite, 0); | |
| StatusBar.setBounds(10, 107, 254, 14); | |
| this.nametext.addFocusListener((FocusListener)new FocusAdapter(){ | |
| public void focusLost(FocusEvent e) { | |
| Text source = (Text)e.widget; | |
| String username = source.getText(); | |
| if (username.length() < 4) { | |
| StatusBar.setText("Enter You Full Name Please"); | |
| } else { | |
| productKey.this.cryptname.setName(username); | |
| } | |
| } | |
| public void focusGained(FocusEvent e) { | |
| productKey.this.nametext.setText(""); | |
| productKey.this.producttext.setText(""); | |
| StatusBar.setText(""); | |
| productKey.this.cryptname.clearData(); | |
| } | |
| }); | |
| this.producttext.addFocusListener((FocusListener)new FocusAdapter(){ | |
| public void focusLost(FocusEvent e) { | |
| Text source = (Text)e.widget; | |
| String key = source.getText(); | |
| if (key.length() < 16) { | |
| StatusBar.setText("Incorrect Product Key"); | |
| } else { | |
| productKey.this.cryptname.setKey(key); | |
| } | |
| } | |
| }); | |
| SubmitButton.addSelectionListener((SelectionListener)new SelectionAdapter(){ | |
| public void widgetSelected(SelectionEvent e) { | |
| if (productKey.this.cryptname.getKey() != null || productKey.this.cryptname.getKey() != null) { | |
| boolean KeyPass = productKey.this.cryptname.isTrueKey(productKey.this.cryptname.getKey(), productKey.this.cryptname.getName()); | |
| if (KeyPass) { | |
| StatusBar.setText("Verified Successfully !!"); | |
| } else { | |
| StatusBar.setText("Incorrect Product Key! Try Again."); | |
| } | |
| } | |
| } | |
| }); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment