`
knight_black_bob
  • 浏览: 824137 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

wareshake 破解公司打卡 问题

    博客分类:
  • java
阅读更多

1.

分享一个无线网用于手机端接受

 

network.bat 

netsh wlan set hostednetwork mode=allow  

netsh wlan set hostednetwork ssid=baoyou  

netsh wlan set hostednetwork key=12345678 keyUsage=persistent  

netsh wlan start hostednetwork  

 

电脑 分享 一个 无限网络 给 手机

 

 

2.点击app 中的打卡 上班 下班

获取 提交 url  和 params

 



 

 

3.写个 定时任务 自动打卡

 

package java2015.java09;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.MalformedURLException;
import java.net.Proxy;
import java.net.Proxy.Type;
import java.net.URL;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import net.sf.json.JSONObject;

public class HttpPost
{
  public static final long PERIOD_DAY = 86400000L;
  public static final String URL = "http://x.xx.xx.xx:8095/fieldwork/attendRecord/dev/attendance";

  public static String post(byte[] params, String url)
  {
    try
    {
      if (url == null) {
        return null;
      }
      URL send_url = new URL(url);
      Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("proxy.cmcc", 8080));
      HttpURLConnection conn = null;
      if (OsUtil.isWindows())
        conn = (HttpURLConnection)send_url.openConnection(proxy);
      else {
        conn = (HttpURLConnection)send_url.openConnection();
      }
      conn.setConnectTimeout(10000);
      conn.setDoOutput(true);
      conn.setUseCaches(false);
      conn.setRequestProperty("Content-type", "application/x-www-form-urlencoded;charset=UTF-8");
      conn.setRequestMethod("POST");

      conn.connect();
      OutputStream out = conn.getOutputStream();
      out.write(params);
      out.flush();
      out.close();
      InputStream in = conn.getInputStream();
      ByteArrayOutputStream temp = new ByteArrayOutputStream();
      for (byte[] bytes = new byte[1]; in.read(bytes) != -1; temp.write(bytes));
      in.close();
      return new String(temp.toByteArray());
    }
    catch (MalformedURLException e)
    {
      e.printStackTrace();
    }
    catch (IOException e) {
      e.printStackTrace();
    }
    return null;
  }

  public static String post(JSONObject json, String url)
  {
    byte[] params = null;
    try {
      params = json.toString().getBytes("UTF-8");
    }
    catch (UnsupportedEncodingException e) {
      e.printStackTrace();
    }
    return post(params, url);
  }

  public static void main(String[] args) throws Exception
  {
    ScheduledExecutorService service = Executors.newScheduledThreadPool(2);
    service.scheduleAtFixedRate(
      new Runnable()
    {
      public void run() {
        for (int j = 100; j < 200; j++)
          try {
            System.out.println(HttpPost.post(HttpPost.GoToWork(j).toString().getBytes("utf-8"), "http://xxx.xxx.xxx.xxx:8095/fieldwork/attendRecord/dev/attendance"));
          } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
          }
      }
    }
    , GoToWorkDelay(), 86400000L, TimeUnit.MILLISECONDS);
    service.scheduleAtFixedRate(new Runnable()
    {
      public void run() {
        for (int j = 100; j < 200; j++)
          try {
            HttpPost.post(HttpPost.GoOffWork(j).toString().getBytes("utf-8"), "http://xxxxxxxxxx/fieldwork/attendRecord/dev/attendance");
          } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
          }
      }
    }
    , GoOffWorkDelay(), 86400000L, TimeUnit.MILLISECONDS);
  }

  public static String GoToWork(int empId)
  {
    return getRequestJson(empId, 0);
  }

  public static String GoOffWork(int empId) {
    return getRequestJson(empId, 1);
  }

  public static String getRequestJson(int empId, int working) {
    return "{\"latY\":39.903276385462654,\"shiftDetailId\":\"0\",\"attendPhoto\":\"\",\"type\":\"" + working + "\",\"lngX\":116.35748400254391,\"userId\":\"" + empId + "\",\"addressName\":\"\"}";
  }

  public static long GoToWorkDelay() throws Exception
  {
    return getDeLay("09:00:00");
  }

  public static long GoOffWorkDelay() throws Exception {
    return getDeLay("18:00:00");
  }

  public static long getDeLay(String dataFormatString) throws Exception {
    DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    DateFormat fmt2 = new SimpleDateFormat("yyyy-MM-dd");
    long tommorrow = new Date().getTime() + 86400000L;
    String nextDate = fmt2.format(new Date(tommorrow));
    nextDate = nextDate + " " + dataFormatString;
    Date nextD = fmt.parse(nextDate);
    long delay = nextD.getTime() - new Date().getTime();
    if (OsUtil.isWindows()) {
      delay -= 86400000L;
    }
    return delay;
  }
}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

捐助开发者

在兴趣的驱动下,写一个免费的东西,有欣喜,也还有汗水,希望你喜欢我的作品,同时也能支持一下。 当然,有钱捧个钱场(右上角的爱心标志,支持支付宝和PayPal捐助),没钱捧个人场,谢谢各位。



 
 
 谢谢您的赞助,我会做的更好!

 

 

  • 大小: 91.9 KB
分享到:
评论

相关推荐

    得力打卡机破解Excel工作表保护密码.pdf

    得力打卡机破解Excel工作表保护密码.pdf

    公司内部OA上下班打卡助手

    帮助你在公司内部OA上面打卡,包含:上午上班,上午下班,下午上班,下午上班。 本人比较赖,不想每天手工登录四次OA,所以写了个python+shell程序。

    习惯打卡小程序源码.zip

    习惯打卡小程序源码习惯打卡小程序源码习惯打卡小程序源码习惯打卡小程序源码习惯打卡小程序源码习惯打卡小程序源码习惯打卡小程序源码习惯打卡小程序源码习惯打卡小程序源码习惯打卡小程序源码习惯打卡小程序源码...

    小程序源码 打卡签到 (代码源)

    小程序源码 打卡签到 (代码源)小程序源码 打卡签到 (代码源)小程序源码 打卡签到 (代码源)小程序源码 打卡签到 (代码源)小程序源码 打卡签到 (代码源)小程序源码 打卡签到 (代码源)小程序源码 打卡签到 (代码源)小...

    公司打卡门禁系统让人进出轻松无暇

    门禁系统公司打卡门禁系统让人进出轻松无暇门禁系统公司打卡门禁系统让人进出轻松无暇门禁系统公司打卡门禁系统让人进出轻松无暇门禁系统公司打卡门禁系统让人进出轻松无暇门禁系统公司打卡门禁系统让人进出轻松无暇...

    一款微信小程序打卡应用源码.zip

    一款微信小程序打卡应用源码,创建地图打卡,基于地图范围打卡、学习打卡,微信小程序敏感词校验,微信小程序项目源码,微信小程序案例源码。 一款微信小程序打卡应用源码,创建地图打卡,基于地图范围打卡、学习...

    德邦定时打卡软件

    并可以选择是否关机功能,会在打卡后自动关机。。。。。有exe程序和源码,仅供学习和娱乐,切勿当做打卡逃避的手段.。。。。。。。。。另有亿赛通解密软件,加密的文档可以一拖一拉就解密了,有需要的可以留言

    java编写的公司员工打卡程序

    用java编写的员工打卡系统,模拟一下,适合初学者

    WIFI打卡考勤软件(钉钉等).zip

    WIFI打卡原理是APP检测当前正在连接的WIFI的名称和MAC地址,如果匹配说明已经到了公司,同时配合刷脸,确认是本人。 本软件配合WIFI工具可实现任意设置热点名称和MAC地址,可以实现随时地打卡。目前已有网友实测钉钉...

    一个辅助打卡的模拟软件

    上班族上下班考勤打卡一般可通过“企业微信”定位到公司位置进行打卡, 但由于一些特殊原因,定位不准确,或者不能及时定位打卡。“助卡王”可解决此类考勤的问题,可帮助上班族随时随地定位考勤,只需在考勤位置...

    可模拟钉钉打卡的WiFi参数,实现远程打卡

    可模拟钉钉打卡的WiFi参数,实现远程打卡,WIFI打卡原理是APP检测当前正在连接的WIFI的名称和MAC地址进行匹配,如果匹配成功,就可以打卡,这套软件包含wifi模拟,位置模拟、钉钉反检测等功能。

    指纹打卡机打卡软件

    好用的公司打卡软件(指纹)打卡 一般常用的打卡机都可以使用

    通过反向代理实现远程打卡

    通过反向代理实现远程打卡,公司通常都有考勤机制,每天两次打卡,但是很容忘记,或者临时有事为了不扣工资还要回到公司打卡。 由于公司电脑一般没有公网IP,并且由于安全策略也无法启动对外服务的端口,本代码利用...

    安卓 钉钉定位打卡,安卓 钉钉定位打卡,安卓 钉钉定位打卡

    安卓 钉钉定位打卡

    基于Wafer2 +微信小程序做的考勤打卡项目源码,包含服务端和客户端两部分

    基于Wafer2 +微信小程序做的考勤打卡项目源码,包含服务端和客户端两部分 基于Wafer2 +微信小程序做的考勤打卡项目源码,包含服务端和客户端两部分 基于Wafer2 +微信小程序做的考勤打卡项目源码,包含服务端和...

    打卡小程序源码.zip

    打卡小程序源码

    得力打卡机破解Excel工作表保护密码-得力表格密码-4页.pdf

    得力打卡机破解Excel工作表保护密码-得力表格密码-4页.pdf

    微信小程序 易打卡 表单设计 (源码)

    微信小程序 易打卡 表单设计 (源码)微信小程序 易打卡 表单设计 (源码)微信小程序 易打卡 表单设计 (源码)微信小程序 易打卡 表单设计 (源码)微信小程序 易打卡 表单设计 (源码)微信小程序 易打卡 表单设计 (源码)...

    易打卡微信小程序 易打卡微信小程序

    易打卡微信小程序 易打卡微信小程序 易打卡微信小程序 易打卡微信小程序 易打卡微信小程序 易打卡微信小程序 易打卡微信小程序 易打卡微信小程序 易打卡微信小程序 易打卡微信小程序 易打卡微信小程序 易打卡微信小...

Global site tag (gtag.js) - Google Analytics