diff --git a/IDEA-Project/FuckHamSports/.idea/.gitignore b/IDEA-Project/FuckHamSports/.idea/.gitignore new file mode 100644 index 0000000..dfe4dbb --- /dev/null +++ b/IDEA-Project/FuckHamSports/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/../../../../:\workspace\FuckHamSports\.idea/dataSources/ +/dataSources.local.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ diff --git a/IDEA-Project/FuckHamSports/.idea/artifacts/FuckHamSports_jar.xml b/IDEA-Project/FuckHamSports/.idea/artifacts/FuckHamSports_jar.xml new file mode 100644 index 0000000..a9f7767 --- /dev/null +++ b/IDEA-Project/FuckHamSports/.idea/artifacts/FuckHamSports_jar.xml @@ -0,0 +1,94 @@ + + + $PROJECT_DIR$/out/artifacts/FuckHamSports_jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/IDEA-Project/FuckHamSports/.idea/compiler.xml b/IDEA-Project/FuckHamSports/.idea/compiler.xml new file mode 100644 index 0000000..1479ee3 --- /dev/null +++ b/IDEA-Project/FuckHamSports/.idea/compiler.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/IDEA-Project/FuckHamSports/.idea/encodings.xml b/IDEA-Project/FuckHamSports/.idea/encodings.xml new file mode 100644 index 0000000..63e9001 --- /dev/null +++ b/IDEA-Project/FuckHamSports/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/IDEA-Project/FuckHamSports/.idea/jarRepositories.xml b/IDEA-Project/FuckHamSports/.idea/jarRepositories.xml new file mode 100644 index 0000000..be5f5c6 --- /dev/null +++ b/IDEA-Project/FuckHamSports/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/IDEA-Project/FuckHamSports/.idea/misc.xml b/IDEA-Project/FuckHamSports/.idea/misc.xml new file mode 100644 index 0000000..0f9e86a --- /dev/null +++ b/IDEA-Project/FuckHamSports/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/IDEA-Project/FuckHamSports/.idea/uiDesigner.xml b/IDEA-Project/FuckHamSports/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/IDEA-Project/FuckHamSports/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/IDEA-Project/FuckHamSports/FuckHamSports.iml b/IDEA-Project/FuckHamSports/FuckHamSports.iml new file mode 100644 index 0000000..36b073f --- /dev/null +++ b/IDEA-Project/FuckHamSports/FuckHamSports.iml @@ -0,0 +1,691 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IDEA-Project/FuckHamSports/pom.xml b/IDEA-Project/FuckHamSports/pom.xml new file mode 100644 index 0000000..0d74ce4 --- /dev/null +++ b/IDEA-Project/FuckHamSports/pom.xml @@ -0,0 +1,114 @@ + + + + 4.0.0 + + org.example + FuckHamSports + 1.0-SNAPSHOT + + FuckHamSports + + http://www.example.com + + + UTF-8 + 1.7 + 1.7 + + + + + junit + junit + 4.11 + test + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 3.0.0 + maven-plugin + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 3.0.0 + + + + + org.apache.httpcomponents + httpclient + 4.5.6 + + + + + org.json + json + 20201115 + + + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 10 + 10 + + + + + diff --git a/IDEA-Project/FuckHamSports/src/main/java/META-INF/MANIFEST.MF b/IDEA-Project/FuckHamSports/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 0000000..390a80a --- /dev/null +++ b/IDEA-Project/FuckHamSports/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: org.fuckham.GUI + diff --git a/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/AboutFrame.java b/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/AboutFrame.java new file mode 100644 index 0000000..8355769 --- /dev/null +++ b/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/AboutFrame.java @@ -0,0 +1,147 @@ +/* + * Created by JFormDesigner on Sat Mar 27 08:43:21 CST 2021 + */ + +package org.fuckham; + +import java.awt.*; +import javax.swing.*; +import javax.swing.GroupLayout; + +/** + * @author dasd + */ +public class AboutFrame extends JFrame { + public AboutFrame() { + initComponents(); + } + + private void initComponents() { + // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents + panel1 = new JPanel(); + label3 = new JLabel(); + label2 = new JLabel(); + label4 = new JLabel(); + label5 = new JLabel(); + label6 = new JLabel(); + label7 = new JLabel(); + label1 = new JLabel(); + + //======== this ======== + setTitle("About"); + setIconImage(new ImageIcon(getClass().getResource("/ico.jpg")).getImage()); + setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); + var contentPane = getContentPane(); + + //======== panel1 ======== + { + panel1.setBackground(Color.darkGray); + + //---- label3 ---- + label3.setIcon(new ImageIcon(getClass().getResource("/github.png"))); + + //---- label2 ---- + label2.setText("https://github.com/Waldenth"); + label2.setForeground(Color.white); + label2.setFont(new Font("Microsoft YaHei UI", Font.PLAIN, 16)); + + //---- label4 ---- + label4.setText("\u53c2\u8003\u9879\u76ee:/S-Ex1t/SunnyRunningPy
\u611f\u8c22@S-Ex1t\u7684\u9006\u5411\u5de5\u4f5c\u63d0\u4f9b\u7684\u601d\u8def"); + label4.setForeground(Color.white); + label4.setFont(new Font("Microsoft YaHei UI", Font.PLAIN, 16)); + + //---- label5 ---- + label5.setText("\u672c\u9879\u76ee\u9075\u5b88GPL3.0\u534f\u8bae-\u5b8c\u5168\u514d\u8d39"); + label5.setForeground(Color.white); + label5.setFont(new Font("Microsoft YaHei UI", Font.PLAIN, 16)); + + //---- label6 ---- + label6.setText("\u8d4f\u5305\u8fa3\u6761 Ciallo\uff5e(\u2220\u30fb\u03c9< )\u2312\u2606"); + label6.setForeground(Color.white); + label6.setFont(new Font("Microsoft YaHei UI", Font.PLAIN, 16)); + + //---- label7 ---- + label7.setIcon(new ImageIcon(getClass().getResource("/alipay.jpg"))); + + //---- label1 ---- + label1.setIcon(new ImageIcon(getClass().getResource("/wechatpay.png"))); + + GroupLayout panel1Layout = new GroupLayout(panel1); + panel1.setLayout(panel1Layout); + panel1Layout.setHorizontalGroup( + panel1Layout.createParallelGroup() + .addGroup(GroupLayout.Alignment.TRAILING, panel1Layout.createSequentialGroup() + .addGroup(panel1Layout.createParallelGroup(GroupLayout.Alignment.TRAILING) + .addGroup(panel1Layout.createSequentialGroup() + .addGap(46, 46, 46) + .addComponent(label3) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 22, Short.MAX_VALUE) + .addComponent(label2, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE)) + .addGroup(panel1Layout.createSequentialGroup() + .addGap(23, 23, 23) + .addComponent(label1) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(label7))) + .addGap(37, 37, 37)) + .addGroup(GroupLayout.Alignment.TRAILING, panel1Layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addGroup(panel1Layout.createParallelGroup() + .addComponent(label4, GroupLayout.PREFERRED_SIZE, 274, GroupLayout.PREFERRED_SIZE) + .addGroup(panel1Layout.createSequentialGroup() + .addGap(12, 12, 12) + .addGroup(panel1Layout.createParallelGroup(GroupLayout.Alignment.TRAILING) + .addComponent(label5, GroupLayout.PREFERRED_SIZE, 239, GroupLayout.PREFERRED_SIZE) + .addComponent(label6, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE)))) + .addGap(53, 53, 53)) + ); + panel1Layout.setVerticalGroup( + panel1Layout.createParallelGroup() + .addGroup(panel1Layout.createSequentialGroup() + .addGroup(panel1Layout.createParallelGroup() + .addGroup(panel1Layout.createSequentialGroup() + .addGap(55, 55, 55) + .addComponent(label3) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 22, Short.MAX_VALUE)) + .addGroup(GroupLayout.Alignment.TRAILING, panel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(label2, GroupLayout.PREFERRED_SIZE, 32, GroupLayout.PREFERRED_SIZE) + .addGap(30, 30, 30))) + .addComponent(label4, GroupLayout.PREFERRED_SIZE, 60, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(label5, GroupLayout.PREFERRED_SIZE, 32, GroupLayout.PREFERRED_SIZE) + .addGap(26, 26, 26) + .addComponent(label6, GroupLayout.PREFERRED_SIZE, 32, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE) + .addGroup(panel1Layout.createParallelGroup() + .addComponent(label1) + .addComponent(label7)) + .addGap(22, 22, 22)) + ); + } + + GroupLayout contentPaneLayout = new GroupLayout(contentPane); + contentPane.setLayout(contentPaneLayout); + contentPaneLayout.setHorizontalGroup( + contentPaneLayout.createParallelGroup() + .addComponent(panel1, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + contentPaneLayout.setVerticalGroup( + contentPaneLayout.createParallelGroup() + .addComponent(panel1, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + pack(); + setLocationRelativeTo(getOwner()); + // JFormDesigner - End of component initialization //GEN-END:initComponents + } + + // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables + private JPanel panel1; + private JLabel label3; + private JLabel label2; + private JLabel label4; + private JLabel label5; + private JLabel label6; + private JLabel label7; + private JLabel label1; + // JFormDesigner - End of variables declaration //GEN-END:variables +} diff --git a/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/AboutFrame.jfd b/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/AboutFrame.jfd new file mode 100644 index 0000000..451c4a8 --- /dev/null +++ b/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/AboutFrame.jfd @@ -0,0 +1,62 @@ +JFDML JFormDesigner: "7.0.1.0.272" Java: "11.0.8" encoding: "UTF-8" + +new FormModel { + contentType: "form/swing" + root: new FormRoot { + add( new FormWindow( "javax.swing.JFrame", new FormLayoutManager( class org.jdesktop.layout.GroupLayout ) { + "$horizontalGroup": "par l {comp panel1::l:::x}" + "$verticalGroup": "par l {comp panel1::l:::x}" + } ) { + name: "this" + "title": "About" + "iconImage": new com.jformdesigner.model.SwingIcon( 0, "/ico.jpg" ) + "defaultCloseOperation": 2 + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class org.jdesktop.layout.GroupLayout ) { + "$horizontalGroup": "par l {seq t {par t {seq {space :p:46:p, comp label3:::p::p, space ::22:x, comp label2:::p:233:p}, seq {space :p:23:p, comp label1:::p::p, space :::x, comp label7:::p::p}}, space :p:37:p}, seq t {space :0:0:x, par l {comp label4:::p:274:p, seq l {space :p:12:p, par t {comp label5:::p:239:p, comp label6:::p:233:p}}}, space :p:53:p}}" + "$verticalGroup": "par l {seq l {par l {seq l {space :p:55:p, comp label3:::p::p, space ::22:x}, seq t {space :::p, comp label2:::p:32:p, space :p:30:p}}, comp label4:::p:60:p, space :::p, comp label5:::p:32:p, space :p:26:p, comp label6:::p:32:p, space ::28:x, par l {comp label1:::p::p, comp label7:::p::p}, space :p:22:p}}" + } ) { + name: "panel1" + "background": sfield java.awt.Color darkGray + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label3" + "icon": new com.jformdesigner.model.SwingIcon( 0, "/github.png" ) + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label2" + "text": "https://github.com/Waldenth" + "foreground": &Color0 new java.awt.Color( 255, 255, 255, 255 ) + "font": &Font0 new java.awt.Font( "Microsoft YaHei UI", 0, 16 ) + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label4" + "text": "参考项目:/S-Ex1t/SunnyRunningPy
感谢@S-Ex1t的逆向工作提供的思路" + "foreground": #Color0 + "font": #Font0 + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label5" + "text": "本项目遵守GPL3.0协议-完全免费" + "foreground": #Color0 + "font": #Font0 + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label6" + "text": "赏包辣条 Ciallo~(∠・ω< )⌒☆" + "foreground": #Color0 + "font": #Font0 + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label7" + "icon": new com.jformdesigner.model.SwingIcon( 0, "/alipay.jpg" ) + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label1" + "icon": new com.jformdesigner.model.SwingIcon( 0, "/wechatpay.png" ) + } ) + } ) + }, new FormLayoutConstraints( null ) { + "location": new java.awt.Point( 0, 0 ) + "size": new java.awt.Dimension( 390, 485 ) + } ) + } +} diff --git a/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/GUI.java b/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/GUI.java new file mode 100644 index 0000000..70fce8a --- /dev/null +++ b/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/GUI.java @@ -0,0 +1,10 @@ +package org.fuckham; + +public class GUI { + public static void main(String[]args){ + MainFrame mainFrame =new MainFrame(); + mainFrame.setVisible(true); + AboutFrame aboutFrame=new AboutFrame(); + //aboutFrame.setVisible(true); + } +} diff --git a/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/MainFrame.java b/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/MainFrame.java new file mode 100644 index 0000000..aa82676 --- /dev/null +++ b/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/MainFrame.java @@ -0,0 +1,210 @@ +/* + * Created by JFormDesigner on Fri Mar 26 22:46:49 CST 2021 + */ + +package org.fuckham; + +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.*; +import javax.swing.GroupLayout; + +/** + * @author dasd + */ +public class MainFrame extends JFrame { + public MainFrame() { + initComponents(); + } + + private void initComponents() { + // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents + panel1 = new JPanel(); + titleLabel = new JLabel(); + imeiCodeTip = new JLabel(); + imeiCodeFileld = new JTextField(); + versionTip = new JLabel(); + versionComboBox = new JComboBox<>(); + startButton = new JButton(); + timeTip = new JLabel(); + timeField = new JTextField(); + stepTip = new JLabel(); + stepField = new JTextField(); + + //======== this ======== + setTitle("FuckHam"); + setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + setIconImage(new ImageIcon(getClass().getResource("/ico.jpg")).getImage()); + var contentPane = getContentPane(); + + //======== panel1 ======== + { + panel1.setBackground(new Color(102, 102, 102)); + + //---- titleLabel ---- + titleLabel.setText(" FuckHam"); + titleLabel.setFont(new Font("Microsoft YaHei UI", Font.BOLD, 22)); + titleLabel.setForeground(Color.white); + + //---- imeiCodeTip ---- + imeiCodeTip.setText("\u8bf7\u8f93\u5165IMEI\u7801"); + imeiCodeTip.setForeground(Color.white); + imeiCodeTip.setFont(new Font("Microsoft YaHei UI", Font.PLAIN, 16)); + + //---- imeiCodeFileld ---- + imeiCodeFileld.setFont(new Font("Microsoft YaHei UI", Font.PLAIN, 16)); + imeiCodeFileld.setForeground(Color.black); + imeiCodeFileld.setBackground(Color.white); + + //---- versionTip ---- + versionTip.setText("\u9009\u62e9\u7248\u672c"); + versionTip.setForeground(Color.white); + versionTip.setFont(new Font("Microsoft YaHei UI", Font.PLAIN, 16)); + + //---- versionComboBox ---- + versionComboBox.setBackground(Color.darkGray); + versionComboBox.setForeground(Color.white); + versionComboBox.setFont(new Font("Microsoft YaHei UI", Font.PLAIN, 14)); + versionComboBox.setEditable(true); + versionComboBox.setModel(new DefaultComboBoxModel<>(new String[] { + "2.40" + })); + + //---- startButton ---- + startButton.setText("Start"); + startButton.setFont(new Font("Microsoft YaHei UI", Font.PLAIN, 16)); + startButton.setBackground(Color.darkGray); + startButton.setForeground(Color.white); + + //---- timeTip ---- + timeTip.setText("\u8bf7\u8f93\u5165\u8dd1\u6b65\u65f6\u95f4(s)"); + timeTip.setForeground(Color.white); + timeTip.setFont(new Font("Microsoft YaHei UI", Font.PLAIN, 16)); + + //---- timeField ---- + timeField.setFont(new Font("Microsoft YaHei UI", Font.PLAIN, 16)); + timeField.setForeground(Color.white); + timeField.setBackground(Color.darkGray); + timeField.setText("600"); + + //---- stepTip ---- + stepTip.setText("\u8bf7\u8f93\u5165\u5927\u81f4\u6b65\u6570"); + stepTip.setForeground(Color.white); + stepTip.setFont(new Font("Microsoft YaHei UI", Font.PLAIN, 16)); + + //---- stepField ---- + stepField.setFont(new Font("Microsoft YaHei UI", Font.PLAIN, 16)); + stepField.setForeground(Color.white); + stepField.setBackground(Color.darkGray); + stepField.setText("1500"); + + GroupLayout panel1Layout = new GroupLayout(panel1); + panel1.setLayout(panel1Layout); + panel1Layout.setHorizontalGroup( + panel1Layout.createParallelGroup() + .addGroup(panel1Layout.createSequentialGroup() + .addGroup(panel1Layout.createParallelGroup() + .addGroup(panel1Layout.createSequentialGroup() + .addGap(214, 214, 214) + .addComponent(titleLabel, GroupLayout.PREFERRED_SIZE, 138, GroupLayout.PREFERRED_SIZE)) + .addGroup(panel1Layout.createSequentialGroup() + .addGap(56, 56, 56) + .addGroup(panel1Layout.createParallelGroup() + .addComponent(imeiCodeTip, GroupLayout.PREFERRED_SIZE, 139, GroupLayout.PREFERRED_SIZE) + .addComponent(imeiCodeFileld, GroupLayout.PREFERRED_SIZE, 228, GroupLayout.PREFERRED_SIZE) + .addGroup(panel1Layout.createParallelGroup(GroupLayout.Alignment.TRAILING, false) + .addComponent(versionComboBox, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE) + .addComponent(versionTip, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE))) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 111, Short.MAX_VALUE) + .addGroup(panel1Layout.createParallelGroup() + .addComponent(timeField, GroupLayout.PREFERRED_SIZE, 129, GroupLayout.PREFERRED_SIZE) + .addComponent(timeTip, GroupLayout.PREFERRED_SIZE, 139, GroupLayout.PREFERRED_SIZE) + .addComponent(stepTip, GroupLayout.PREFERRED_SIZE, 139, GroupLayout.PREFERRED_SIZE) + .addComponent(stepField, GroupLayout.PREFERRED_SIZE, 129, GroupLayout.PREFERRED_SIZE))) + .addGroup(panel1Layout.createSequentialGroup() + .addGap(235, 235, 235) + .addComponent(startButton, GroupLayout.PREFERRED_SIZE, 88, GroupLayout.PREFERRED_SIZE))) + .addGap(44, 44, 44)) + ); + panel1Layout.setVerticalGroup( + panel1Layout.createParallelGroup() + .addGroup(panel1Layout.createSequentialGroup() + .addGap(24, 24, 24) + .addComponent(titleLabel, GroupLayout.PREFERRED_SIZE, 77, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(panel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(imeiCodeTip, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE) + .addComponent(timeTip, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(panel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(imeiCodeFileld, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addComponent(timeField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) + .addGroup(panel1Layout.createParallelGroup() + .addGroup(panel1Layout.createSequentialGroup() + .addGap(18, 18, 18) + .addComponent(versionTip, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)) + .addGroup(panel1Layout.createSequentialGroup() + .addGap(26, 26, 26) + .addComponent(stepTip, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))) + .addGap(18, 18, 18) + .addGroup(panel1Layout.createParallelGroup() + .addComponent(versionComboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addComponent(stepField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 40, Short.MAX_VALUE) + .addComponent(startButton, GroupLayout.PREFERRED_SIZE, 39, GroupLayout.PREFERRED_SIZE) + .addGap(36, 36, 36)) + ); + } + + GroupLayout contentPaneLayout = new GroupLayout(contentPane); + contentPane.setLayout(contentPaneLayout); + contentPaneLayout.setHorizontalGroup( + contentPaneLayout.createParallelGroup() + .addComponent(panel1, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + contentPaneLayout.setVerticalGroup( + contentPaneLayout.createParallelGroup() + .addComponent(panel1, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + pack(); + setLocationRelativeTo(getOwner()); + // JFormDesigner - End of component initialization //GEN-END:initComponents + + + startButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + //System.out.println(imeiCodeFileld.getText()); + //System.out.println(versionComboBox.getSelectedItem().toString()); + //System.out.println(timeField.getText()); + //System.out.println(stepField.getText()); + int confirmed=JOptionPane.showConfirmDialog(null,"Your IMEI:"+imeiCodeFileld.getText()+"\n" + +"Your version:"+versionComboBox.getSelectedItem().toString()+"\n"+"Approximate time:"+timeField.getText()+"(s)\n" + +"Approximate steps:"+stepField.getText(),"确认",JOptionPane.YES_NO_OPTION); + //System.out.println(confirmed); + if(confirmed==0){ + WorkingFrame workingFrame= new WorkingFrame(imeiCodeFileld.getText(),versionComboBox.getSelectedItem().toString(),timeField.getText(),stepField.getText()); + workingFrame.setVisible(true); + } + } + }); + + + } + + // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables + private JPanel panel1; + private JLabel titleLabel; + private JLabel imeiCodeTip; + private JTextField imeiCodeFileld; + private JLabel versionTip; + private JComboBox versionComboBox; + private JButton startButton; + private JLabel timeTip; + private JTextField timeField; + private JLabel stepTip; + private JTextField stepField; + // JFormDesigner - End of variables declaration //GEN-END:variables + +} diff --git a/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/MainFrame.jfd b/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/MainFrame.jfd new file mode 100644 index 0000000..8ba665b --- /dev/null +++ b/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/MainFrame.jfd @@ -0,0 +1,94 @@ +JFDML JFormDesigner: "7.0.1.0.272" Java: "11.0.8" encoding: "UTF-8" + +new FormModel { + contentType: "form/swing" + root: new FormRoot { + add( new FormWindow( "javax.swing.JFrame", new FormLayoutManager( class org.jdesktop.layout.GroupLayout ) { + "$horizontalGroup": "par l {comp panel1::l:::x}" + "$verticalGroup": "par l {comp panel1::l:::x}" + } ) { + name: "this" + "title": "FuckHam" + "defaultCloseOperation": 3 + "iconImage": new com.jformdesigner.model.SwingIcon( 0, "/ico.jpg" ) + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class org.jdesktop.layout.GroupLayout ) { + "$horizontalGroup": "par l {seq {par l {seq l {space :p:214:p, comp titleLabel:::p:138:p}, seq l {space :p:56:p, par l {comp imeiCodeTip::l:p:139:p, comp imeiCodeFileld:::p:228:p, par t:l::p {comp versionComboBox::l::139:x, comp versionTip::l::139:x}}, space ::111:x, par l {comp timeField:::p:129:p, comp timeTip:::p:139:p, comp stepTip:::p:139:p, comp stepField:::p:129:p}}, seq l {space :p:235:p, comp startButton:::p:88:p}}, space :p:44:p}}" + "$verticalGroup": "par l {seq l {space :p:24:p, comp titleLabel:::p:77:p, space u:::p, par b {comp imeiCodeTip::b:p:25:p, comp timeTip::b:p:25:p}, space u:::p, par b {comp imeiCodeFileld::b:p::p, comp timeField::b:p::p}, par l {seq {space s:::p, comp versionTip:::p:25:p}, seq l {space :p:26:p, comp stepTip:::p:25:p}}, space s:::p, par l {comp versionComboBox:::p::p, comp stepField:::p::p}, space ::40:x, comp startButton:::p:39:p, space :p:36:p}}" + } ) { + name: "panel1" + "background": new java.awt.Color( 102, 102, 102, 255 ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "titleLabel" + "text": " FuckHam" + "font": new java.awt.Font( "Microsoft YaHei UI", 1, 22 ) + "foreground": new java.awt.Color( 255, 255, 255, 255 ) + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "imeiCodeTip" + "text": "请输入IMEI码" + "foreground": &Color0 new java.awt.Color( 255, 255, 255, 255 ) + "font": &Font0 new java.awt.Font( "Microsoft YaHei UI", 0, 16 ) + } ) + add( new FormComponent( "javax.swing.JTextField" ) { + name: "imeiCodeFileld" + "font": &Font1 new java.awt.Font( "Microsoft YaHei UI", 0, 16 ) + "foreground": sfield java.awt.Color black + "background": sfield java.awt.Color white + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "versionTip" + "text": "选择版本" + "foreground": #Color0 + "font": #Font0 + } ) + add( new FormComponent( "javax.swing.JComboBox" ) { + name: "versionComboBox" + "background": sfield java.awt.Color darkGray + "foreground": new java.awt.Color( 255, 255, 255, 255 ) + "font": new java.awt.Font( "Microsoft YaHei UI", 0, 14 ) + "editable": true + "model": new javax.swing.DefaultComboBoxModel { + selectedItem: "2.40" + addElement( "2.40" ) + } + } ) + add( new FormComponent( "javax.swing.JButton" ) { + name: "startButton" + "text": "Start" + "font": new java.awt.Font( "Microsoft YaHei UI", 0, 16 ) + "background": sfield java.awt.Color darkGray + "foreground": new java.awt.Color( 255, 255, 255, 255 ) + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "timeTip" + "text": "请输入跑步时间(s)" + "foreground": #Color0 + "font": #Font0 + } ) + add( new FormComponent( "javax.swing.JTextField" ) { + name: "timeField" + "font": #Font1 + "foreground": sfield java.awt.Color white + "background": sfield java.awt.Color darkGray + "text": "600" + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "stepTip" + "text": "请输入大致步数" + "foreground": #Color0 + "font": #Font0 + } ) + add( new FormComponent( "javax.swing.JTextField" ) { + name: "stepField" + "font": #Font1 + "foreground": sfield java.awt.Color white + "background": sfield java.awt.Color darkGray + "text": "1500" + } ) + } ) + }, new FormLayoutConstraints( null ) { + "location": new java.awt.Point( 0, 0 ) + "size": new java.awt.Dimension( 580, 430 ) + } ) + } +} diff --git a/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/RunFuck.java b/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/RunFuck.java new file mode 100644 index 0000000..1538d0a --- /dev/null +++ b/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/RunFuck.java @@ -0,0 +1,498 @@ +package org.fuckham; + +import org.apache.http.Header; +import org.apache.http.HttpEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.message.BasicHeader; +import org.apache.http.util.EntityUtils; +import org.json.JSONObject; + +import javax.swing.*; +import java.io.IOException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.*; + + +public class RunFuck { + private static Listalphabet= Arrays.asList("abcdefghijklmnopqrstuvwxyz".split("")); + + private static String table=""; + + public static boolean isRandom=false; + + public static int currProgress=0; + + public static Random rand = new Random(); + + + //2021-3-26 2.40版本 有效 + public static String imeiCode; + public static String version; + public static String API_ROOT = "http://client3.aipao.me/api"; + public static String API_CUR="/%7Btoken%7D/QM_Users/Login_AndroidSchool?IMEICode="; + public static String token=""; + public static String userID=""; + public static String timespan=""; + public static String auth=""; + public static String nonce=""; + public static String sign=""; + public static String Lengths=""; + public static String RunId=""; + public static String RunTime=""; + public static String RunDist=""; + public static String RunStep=""; + //获取个人信息的url + public static String GSurl=""; + //获取开始长跑信息的url + public static String SRSurl=""; + //发送结束长跑信息的url + public static String Endurl=""; + + + public static boolean randomAlphabet(){ + Collections.shuffle(alphabet); + alphabet=alphabet.subList(0,10); + StringBuffer tmpTable=new StringBuffer(); + for(int i=0;i<10;i++){ + tmpTable.append(alphabet.get(i)); + } + table=tmpTable.toString(); + isRandom=true; + return true; + } + + public static String getMD5(String s){ + String md5Str=""; + try { + MessageDigest md5tool=MessageDigest.getInstance("md5"); + md5tool.update(s.getBytes()); + byte[]digest=md5tool.digest(); + md5Str=formatByteArrayTOString(digest); + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } + return md5Str; + } + public static String formatByteArrayTOString(byte[] digest) { + //创建sb用于保存md5值 + StringBuffer sb = new StringBuffer(); + int temp; + for (int i=0;i { + + + //private StringBuilder logText = new StringBuilder(); + + public RunFucker(){ + + } + + public StringBuilder doInBackground() throws IOException,InterruptedException { + RunFuck.randomAlphabet(); + + logText.append(RunFuck.login(imeiCode,version)); + logText.append("\n"); + + //System.out.println(logText.toString()); + + + logText.append(RunFuck.getUserInfo()); + logText.append("\n"); + + logText.append(RunFuck.getRunInfo(seconds,steps)); + logText.append("\n"); + + + progressBar.setMinimum(0); + progressBar.setMaximum(Integer.valueOf(RunFuck.RunTime)); + progressBar.setStringPainted(true); + + var curProgressData=new ProgressData(); + curProgressData.curSecond=0; + curProgressData.log=logText.toString(); + publish(curProgressData); + + for(int i=1;i progressList){ + var builder=new StringBuilder(); + for(ProgressData d:progressList){ + builder.append(d.log); + } + logTextArea.append(builder.toString()); + } + + public void done(){ + StringBuilder result= null; + completed=true; + try { + result = get(); + } catch (InterruptedException e) { + e.printStackTrace(); + } catch (ExecutionException e) { + e.printStackTrace(); + } + logTextArea.setText(result.toString()); + } + + } + +} diff --git a/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/WorkingFrame.jfd b/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/WorkingFrame.jfd new file mode 100644 index 0000000..e00aaf1 --- /dev/null +++ b/IDEA-Project/FuckHamSports/src/main/java/org/fuckham/WorkingFrame.jfd @@ -0,0 +1,53 @@ +JFDML JFormDesigner: "7.0.1.0.272" Java: "11.0.8" encoding: "UTF-8" + +new FormModel { + contentType: "form/swing" + root: new FormRoot { + add( new FormWindow( "javax.swing.JFrame", new FormLayoutManager( class org.jdesktop.layout.GroupLayout ) { + "$horizontalGroup": "par l {comp panel1::l:::x}" + "$verticalGroup": "par l {seq l {comp panel1:::p::p, space :0:0:x}}" + } ) { + name: "this" + "title": "Working..." + "defaultCloseOperation": 2 + "iconImage": new com.jformdesigner.model.SwingIcon( 0, "/ico.jpg" ) + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class org.jdesktop.layout.GroupLayout ) { + "$horizontalGroup": "par l {seq l {space :p:74:p, comp exportLogButton:::p::p, space ::147:x, comp aboutInfoButton:::p::p, space :p:76:p}, seq {par l {seq {space :p:19:p, comp scrollPane1:::p:420:p}, seq l {space :p:98:p, comp progressBar:::p:265:p}}, space ::24:x}}" + "$verticalGroup": "par l {seq l {space :p:33:p, comp progressBar:::p:21:p, space s:::p, comp scrollPane1::::359:x, space s:::p, par b {comp exportLogButton::b:p::p, comp aboutInfoButton::b:p::p}, space :::p}}" + } ) { + name: "panel1" + "background": sfield java.awt.Color darkGray + add( new FormComponent( "javax.swing.JProgressBar" ) { + name: "progressBar" + "background": sfield java.awt.Color white + "font": new java.awt.Font( "Microsoft YaHei UI", 0, 14 ) + } ) + add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { + name: "scrollPane1" + add( new FormComponent( "javax.swing.JTextArea" ) { + name: "logTextArea" + "background": sfield java.awt.Color darkGray + "foreground": new java.awt.Color( 255, 255, 255, 255 ) + } ) + } ) + add( new FormComponent( "javax.swing.JButton" ) { + name: "exportLogButton" + "text": "导出日志" + "font": &Font0 new java.awt.Font( "Microsoft YaHei UI", 0, 14 ) + "background": sfield java.awt.Color darkGray + "foreground": &Color0 new java.awt.Color( 255, 255, 255, 255 ) + } ) + add( new FormComponent( "javax.swing.JButton" ) { + name: "aboutInfoButton" + "text": "关于" + "font": #Font0 + "background": sfield java.awt.Color darkGray + "foreground": #Color0 + } ) + } ) + }, new FormLayoutConstraints( null ) { + "location": new java.awt.Point( 0, 0 ) + "size": new java.awt.Dimension( 465, 535 ) + } ) + } +} diff --git a/IDEA-Project/FuckHamSports/src/main/resources/alipay.jpg b/IDEA-Project/FuckHamSports/src/main/resources/alipay.jpg new file mode 100644 index 0000000..48bf5ef Binary files /dev/null and b/IDEA-Project/FuckHamSports/src/main/resources/alipay.jpg differ diff --git a/IDEA-Project/FuckHamSports/src/main/resources/github.png b/IDEA-Project/FuckHamSports/src/main/resources/github.png new file mode 100644 index 0000000..da6bae5 Binary files /dev/null and b/IDEA-Project/FuckHamSports/src/main/resources/github.png differ diff --git a/IDEA-Project/FuckHamSports/src/main/resources/ico.jpg b/IDEA-Project/FuckHamSports/src/main/resources/ico.jpg new file mode 100644 index 0000000..56fcc93 Binary files /dev/null and b/IDEA-Project/FuckHamSports/src/main/resources/ico.jpg differ diff --git a/IDEA-Project/FuckHamSports/src/main/resources/wechatpay.png b/IDEA-Project/FuckHamSports/src/main/resources/wechatpay.png new file mode 100644 index 0000000..9fa6cef Binary files /dev/null and b/IDEA-Project/FuckHamSports/src/main/resources/wechatpay.png differ diff --git a/IDEA-Project/FuckHamSports/src/test/java/org/fuckham/MainFrameTest.java b/IDEA-Project/FuckHamSports/src/test/java/org/fuckham/MainFrameTest.java new file mode 100644 index 0000000..0ef8186 --- /dev/null +++ b/IDEA-Project/FuckHamSports/src/test/java/org/fuckham/MainFrameTest.java @@ -0,0 +1,20 @@ +package org.fuckham; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class MainFrameTest +{ + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() + { + assertTrue( true ); + } +} diff --git a/IDEA-Project/FuckHamSports/target/classes/alipay.jpg b/IDEA-Project/FuckHamSports/target/classes/alipay.jpg new file mode 100644 index 0000000..48bf5ef Binary files /dev/null and b/IDEA-Project/FuckHamSports/target/classes/alipay.jpg differ diff --git a/IDEA-Project/FuckHamSports/target/classes/github.png b/IDEA-Project/FuckHamSports/target/classes/github.png new file mode 100644 index 0000000..da6bae5 Binary files /dev/null and b/IDEA-Project/FuckHamSports/target/classes/github.png differ diff --git a/IDEA-Project/FuckHamSports/target/classes/ico.jpg b/IDEA-Project/FuckHamSports/target/classes/ico.jpg new file mode 100644 index 0000000..56fcc93 Binary files /dev/null and b/IDEA-Project/FuckHamSports/target/classes/ico.jpg differ diff --git a/IDEA-Project/FuckHamSports/target/classes/wechatpay.png b/IDEA-Project/FuckHamSports/target/classes/wechatpay.png new file mode 100644 index 0000000..9fa6cef Binary files /dev/null and b/IDEA-Project/FuckHamSports/target/classes/wechatpay.png differ