LetMeBot
Get full acces now! Register for free!

Got questions? Or you can't make an account?

Email to this email adress: support@letmebot.com

Join the forum, it's quick and easy

LetMeBot
Get full acces now! Register for free!

Got questions? Or you can't make an account?

Email to this email adress: support@letmebot.com
LetMeBot
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Anti-Ban for bots HUMAN MOUSE MOVEMENT

3 posters

LetMeBot :: Coding :: Java

Go down

Anti-Ban for bots HUMAN MOUSE MOVEMENT Empty Anti-Ban for bots HUMAN MOUSE MOVEMENT

Post by Bnoit February 6th 2011, 1:13 pm

Use this instead of the mouse jumps this is an antiban Smile

Code:

 public void humanMouse(Point targetPosition, int Speed, int wiggleFrequency) {
        Random rnd = new Random();
        Point A, B, C, D;
        A = MouseInfo.getPointerInfo().getLocation();
        B = targetPosition;
        C = GetPointCurve(A, B);
        int wiggleTimer = wiggleFrequency;
        int humanWiggle = 2;
        double lineLength = LineLength(A, B);
        int Displacement = (int) lineLength;
        double Inc = Displacement / ((double) Speed / 100);
        for (double t = 0; t < 1; t += (1.0 / Inc)) {
            // mouse movement according to a spline:
            // movement = A.x *(1-t)^2 + 2 * C.t * (t - 1)*t + t^2 * B.x
            //
            D = new Point;
            D.x = (int) (A.x * (1 - t) * (1 - t) + 2 * C.x * t * (1 - t) + t * t * B.x);
            D.y = (int) (A.y * (1 - t) * (1 - t) + 2 * C.y * t * (1 - t) + t * t * B.y);
            if (wiggleTimer == 0) {
                if (rnd.nextInt(1) == 0) {
                    D.x += -humanWiggle + rnd.nextInt(2 * humanWiggle);
                    D.y += -humanWiggle + rnd.nextInt(2 * humanWiggle);
                    wiggleTimer = wiggleFrequency;
                }
            } else {
                wiggleTimer -= 1;
            }
            moveMouse(D);
            try {
                Thread.sleep(1);
            } catch (InterruptedException e) {
            }
        }
        moveMouse(new Point((int) B.x, (int) B.y));
    }

    private static void moveMouse(Point p) {
        try {
            Robot bot = new Robot();
            bot.mouseMove(p.x, p.y);
        }catch (AWTException e) {
        }
    }
Bnoit
Bnoit
Administrizzy & Bot Programmer
Administrizzy & Bot Programmer

Posts : 85
Join date : 2010-10-04
Age : 34
Location : Belgium

https://hackforlife.forumotion.com

Back to top Go down

Anti-Ban for bots HUMAN MOUSE MOVEMENT Empty Re: Anti-Ban for bots HUMAN MOUSE MOVEMENT

Post by rutger48 February 8th 2011, 2:50 pm

What scripting language is this?
rutger48
rutger48
Global Moderator

Posts : 5
Join date : 2011-01-30

Back to top Go down

Anti-Ban for bots HUMAN MOUSE MOVEMENT Empty Re: Anti-Ban for bots HUMAN MOUSE MOVEMENT

Post by Bnoit February 8th 2011, 5:38 pm

rutger48 wrote:What scripting language is this?

Well since its posted in the JAVA forums, I think its JAVA Smile xP
Bnoit
Bnoit
Administrizzy & Bot Programmer
Administrizzy & Bot Programmer

Posts : 85
Join date : 2010-10-04
Age : 34
Location : Belgium

https://hackforlife.forumotion.com

Back to top Go down

Anti-Ban for bots HUMAN MOUSE MOVEMENT Empty Re: Anti-Ban for bots HUMAN MOUSE MOVEMENT

Post by Gungho February 8th 2011, 6:31 pm

Wow, this is great. Going to add this to a few bots.
Gungho
Gungho
Administrizzy
Administrizzy

Posts : 5
Join date : 2011-01-22
Age : 32
Location : Tennessee

Back to top Go down

Anti-Ban for bots HUMAN MOUSE MOVEMENT Empty Re: Anti-Ban for bots HUMAN MOUSE MOVEMENT

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


LetMeBot :: Coding :: Java

 
Permissions in this forum:
You cannot reply to topics in this forum