Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
xieshujian committed May 20, 2018
1 parent 5255716 commit 4898b97
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/main/java/cn/justin/cypt/CryptHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public class CryptHelper {

public static void main(String[] args) throws FileNotFoundException, IOException {
// 密钥的种子,可以是任何形式,本质是字节数组
String strKey = "username";
String clearPwd = "password";
String strKey = args[0];
String clearPwd = args[1];
// 密钥数据
byte[] rawKey = getRawKey(strKey.getBytes());
// 密码的明文
Expand Down
16 changes: 9 additions & 7 deletions src/main/java/cn/justin/jimu/Jimu.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public class Jimu {
static ChromeDriverService service = null;
static ChromeDriver driver = null;

public static void main(String[] args) throws FileNotFoundException, IOException {

public static void main(String[] args) throws FileNotFoundException, IOException, InterruptedException {
String loginURL = "https://www.jimu.com/User/Login";
p.load(new FileReader("config.txt"));
initDriver();
Expand All @@ -31,6 +32,7 @@ public static void main(String[] args) throws FileNotFoundException, IOException
driver.get(loginURL);
driver.findElementById("username").sendKeys(username);
driver.findElementById("password").sendKeys(password);
Thread.sleep(1000 * 10);
driver.findElementById("act_login").submit();
String method=p.getProperty("method");
String amount=p.getProperty("amount");
Expand All @@ -56,13 +58,13 @@ public static void creditAssign() throws FileNotFoundException, IOException {
while (true) {
driver.get(creditAssignURL);

tds = driver.findElementsByPartialLinkText("ծȨתÈÃÏîÄ¿");
tds = driver.findElementsByPartialLinkText("10.5");

if (!tds.isEmpty()) {

Collections.shuffle(tds);
for (WebElement td : tds) {
if ("10.5".equals(td.getText().split("\n")[4])) {
//System.out.println(td.getText());
try {
driver.get(td.getAttribute("href"));
driver.findElementById("act_project_all_in").click();
Expand All @@ -73,16 +75,16 @@ public static void creditAssign() throws FileNotFoundException, IOException {
driver.findElementById("act_invest_confirm").click();

} catch (Exception e) {
e.printStackTrace();
System.out.println(e.getMessage());
}
}

}
Toolkit.getDefaultToolkit().beep();
}

System.out.println(count++);
// 5 min
Thread.sleep(1000 * 5 * 1);
Thread.sleep(1000 * 5);
}

} catch (Exception e) {
Expand Down

0 comments on commit 4898b97

Please sign in to comment.