Giter Site home page Giter Site logo

rattlesnake's Introduction

Nice to meet you, I'm Dahquan

a full stack developer

... that's all I really have to say right now though, talk soon.

rattlesnake's People

Contributors

dahquan avatar dahquan1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rattlesnake's Issues

Recode feedme.js in socket.io or websocket

Hi. as xhttp is a little unefficient, could you do a websocket connection from feedme.js and a tampermonkey script (I could do that) because websocket is very fast and allows 2 clients spawning in bots :)

How to get the IP

Hi. I'm developing my script with this lib. I already tried with bso.ip but I got no luck. any way to get the server?

VPS Support

I tried to run the script on my VPS (windows) and got the following error:

XMLHttpRequest cannot load http://xxx:1337/inject/goto?x=35137.54922322851&&y=14828.182821132874. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://slither.io' is therefore not allowed access. The response had HTTP status code 404.

I changed the code what you have to paste in the console to:

var xhttp=new XMLHttpRequest;xhttp.onreadystatechange=function(){4==xhttp.readyState&&200==xhttp.status&&eval(xhttp.responseText)},xhttp.open("GET","http://xxx:1337/inject",!0),xhttp.send();

Thanks for your help!

Trying to create bot counter on dev console

Hello @dahquan im trying to console log bots alive with INJECT code heres what im trying
`const INJECT = "(function() {\r\n" +
" var intv = 0;\r\n" +
" var playClick = play_btn.elem.onclick;\r\n" +
" var lastState = want_close_socket;\r\n" +
" var oldConnect = connect;\r\n" +
" function get(path) {\r\n" +
" var xhttp = new XMLHttpRequest();\r\n" +
" xhttp.open("GET", "http://127.0.0.1:1337/\" + path, true);\r\n" +
" xhttp.send();\r\n" +
" }\r\n" +
" function start() {\r\n" +
" intv = setInterval(function() {\r\n" +
" if (snake) {\r\n" +
" if (typeof fetch !== 'undefined') {\r\n" +
" get('goto?x=' + snake.xx + '&&y=' + snake.yy);\r\n" +
" }\r\n" +
" }\r\n" +
" }, 1000);\r\n" +
" window.onkeydown = function(e) {\r\n" +
" if (e.keyCode === 88) {\r\n" +
" get('speed/on');\r\n" +
" }\r\n" +
" };\r\n" +
" window.onkeyup = function(e) {\r\n" +
" if (e.keyCode === 88) {\r\n" +
" get('speed/off');\r\n" +
" }\r\n" +
" };\r\n" +
" }\r\n" +
" function stop() {\r\n" +
" clearInterval(intv);\r\n" +
" }\r\n" +
" play_btn.elem.onclick = function() {\r\n" +
" start();\r\n" +
" playClick();\r\n" +
" };\r\n" +
" window.connect = function() {\r\n" +
" oldConnect();\r\n" +
" get('server/' + bso.ip + ':' + bso.po + '?skin=' + localStorage.snakercv);\r\n" +
" forceServer(bso.ip, bso.po);\r\n" +
" window.connect = oldConnect;\r\n" +
" }\r\n" +
" console.log('You can start the bots now by logging in');\r\n" +
" console.log('* Changing servers is not supported');\r\n" +
" console.log('[Bots Alive: ' + Alives + ']\t\t' + msg);\r\n" + //<<<-- Here trying to console log
"})();\r\n";

// TODO: Handle unknown problems in bot
process.on('uncaughtException', function(err) { console.log(err) })

// Bots alive
let alive = 0

function print(msg) {
//console.log('[Bots Alive: ' + alive + ']\t\t' + msg)
var Alives = alive <<<--- Says Uncaught ReferenceError: Alives is not defined
}`

I get

Add Socks Proxy Support

Add Socks Proxy support in bot.js

at the top, require the Socks module:
let Socks = require('socks');

also, add the if mode === socks

 //...
} else if (mode === 'socks') {
    //console.log('Mode socks, proxy', proxyServer);
    let temp = proxyServer.split(':');
    let socksIp = temp[0]
    let socksPort = temp[1];
    requestOptions.agent = new Socks.Agent({
        proxy: {
             ipaddress: socksIp,
            port: socksPort,
            type: 5
        }
    });
}

EDIT: Oh and make sure to actually make the mode socks
replace the
var mode = 'http';
with
var mode = 'socks';

EASY WAY: Replace /dist/bot.js with this:
http://pastebin.com/ZTV66bWw

Awesome! :)

Can you please add in the description how to install?
Much appreciated ! Thank you
Edit: yes for newbs like me

Stop making stupid issues

First of All
THIS IS NOT A BOT. This is a lib.
second. there is a README.md for something look there before than making a STUPID issue like #40.
third and last. There's 14 watchers(including me) that don't want stupid issues like #40 or #35.

Thanks in advice.

Bots

Just wanted to ask you if you can make the bots more similar to raga.pw bots, so when they get closer to you they try to go for the part close to your head without trying to kill you !
Other than that, amazing work ! Everything worked out amazingly as expected. Thank you so much for sharing the project for free ! :)

Raw MoveTo/FacePosition code

Is it possible that you could show nme the raw MoveTo/FacePosition code, not with all of your other packet.put code?

As in the:
arr = new Uint8Array(3);
arr[0] = opcode;
arr[1] = radians;
ws.send(arr);

Like that?

change bot skin possible?

there is a command to set up a skin in the console tab : setSkin(snake, 25) someone knows how to set up this command for bots?

bots don't launch problem server

XMLHttpRequest cannot load http://tsukigro-tsukigro.c9users.io:8080/inject. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://slither.io' is therefore not allowed access.
Bots don't start here some screenshots :
http://i.imgur.com/PjrAwqC.png cannot get page
http://i.imgur.com/yIUxbuK.png code inject
http://i.imgur.com/oXQpsu8.jpg error in slither
http://i.imgur.com/7RoEx48.png c9 workspace

someone knows how to fix that please?

Error

Do you know where this error is coming from ?
capture

Not Working

this is what i get when i run it

[root@vps79645 rattlesnake]# node examples/feedme.js

/root/rattlesnake/examples/feedme.js:16
const Bot = require('../dist')
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:935:3

Proxies

Do I have to write what type of proxies im using before putting them ?
And can I use public ones ?
Https/http or socks4/5 ?

c9.io

can anyone help me make bots run in c9.io ??

Bot count function!

I already have an idea how to do this but i cant figure out how:

  bot.on('spawn', function() {
    console.log(bot.name + 'spawned')

 bot.on('dead', function() {
    console.log(bot.name + ' died')

Amount of working bots = Spawned bots - Dead Bots

But where can i get the amount of spawned bots/dead bots?

random name and random skin

add this at feedme.js at top


var slithernames = {};

slithernames.nameList = [
"nikos","AnonymousBots","xxx2"
];

slithernames.getRandomName = function() {
return slithernames.nameList[Math.floor((Math.random() * slithernames.nameList.length))];
};
function rskin(){
return Math.floor((Math.random() * 39)+1)};


and change line 50 and 52 to
name: slithernames.getRandomName()
skin: rskin()

Create UUIDS for feeder

Please create UUIDs for feeder so i can access my vps bots without everytime changing my ip since my ISP changes my ip address every 6 hours. Just like ogar-feeder-bot

Feedme

So if i do node feedme.js then doesnt work

Error packet

Do you know why i have always this error ?

Error: Cannot find module './lib/Packet'

Client + Server : ) Like Oger Feeder Bot

Today remade little script. No longer uses the GET, all data as position, or the command "speed" are sent by the socket. + Weak gui for a beginning. How I will have more time to refine and give server + client. At the moment, the server receives information such as the name of bots (can be changed during the game), the position, the command "speed". Everything looks like "Ogar feeder bot".

I also added a change in the connection between the local server and VPS.

http://imgur.com/tYlDTtu

[Off Topic] Created web page

Hi! I created a webpage that almost always is online that scrapes every hour a new 2000 proxy list.

83.53.79.242/getproxy.PHP?raw&amount=max

NPM?

Is it possible that you could upload this to npm?
It would make shit 100% easier for me,
thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.