Coder Social home page Coder Social logo

hormold / pubg Goto Github PK

View Code? Open in Web Editor NEW
124.0 8.0 36.0 335 KB

Playerunknown’s Battlegrounds Websocket API example. Feel free to ask questions in Discord: Hormold#0683

License: GNU General Public License v3.0

CSS 1.13% HTML 50.38% JavaScript 48.49%
playerunknown battlegrounds api websocket pubg

pubg's Introduction

pubg

Playerunknown’s Battlegrounds Websocket API example

WARNING: READ GNU General Public License v3 (GPL-3)

Deps: npm install ws underscore express body-parser

How to get ticket (aka access token aka password?):

  1. Run wireshark, filter by: tcp.port == 81 && http

  2. Run game and wait for loading menu (lobby)

  3. Looking for something like "/userproxy?provider=steam&.." in wireshark and open it (by left click)

  4. Copy Value from middle frame, it's must be more 450 symbols (468 for me)

You can found full lenght ticket in "Request URI Query Parameter",press right mouse -> copy -> value and remove "ticket="

Ticket will dead after few minutes in offline (sure, maybe ip change need to regenerate token). OR it maybe works while you in game.

You need start game again and get ticket again.

You can be connected with out any problems for few hours and do fast restarts if u need this.

Not possible to play while connected from this script (not sure about real play, but you will be kicked from lobby by double connection)

More methods here: https://gist.github.com/Hormold/92fbb9733eb9c9f0fef9adf0e0750bc7

If you will found how to generate token from engine - it'll be cool!

Look at the menu(lobby) source code here: http://front.battlegroundsgame.com/app/2017.04.06-4/app.js

Get more info about game protocol using Wireshark and filter: (websocket)

pubg's People

Contributors

hormold avatar hormoldservice 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  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  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  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

pubg's Issues

Error connecting

Error connecting: { Error: connect ETIMEDOUT 52.4.115.27:81
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1158:14)
  errno: 'ETIMEDOUT',
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '52.4.115.27',
  port: 81 }
Error connecting:
C:\pubgDATA\node_modules\ws\lib\WebSocket.js:358
      else throw new Error('not opened');
           ^

What am I doing wrong?

GetUserRecord not working anymore

Hello,

Since the last update with official ranking yesterday (2018-10-03), there is no return by the game, however the endpoint "GetBroUserStatesByNickname" works perfectly

I saw in the main.js file on the lobby of the game that it needs 4 param (e,t,n,i) and i don't know what are the last param
I've got the AccountID, the server (EU, NA, etc) and the mode (Solo, Duo, squad, etc) so i miss one param, does anyone have more information about that ?

Thanks !

Wrong user stats

Hello, since the last update, i don't know why, the user stats of a player are wrong, not same as the stats showed in game. And the rankpoint value is 0

SeasonId: 'season.bro.official.pc-2018-03.steam.squad-fpp', Season: 'pc-2018-03', Match: 'squad-fpp', Records: { RankPoint: '0', BestRankPoint: '0', RankPointTitle: '', BestRankPointTitle: '', RoundsPlayed: '62', TimeSurvived: '35672.77', LongestTimeSurvived: '1462.721', DailyWins: '2', WeeklyWins: '4', Wins: '4', Top10s: '21', RankSum: '975', AvgRank: '15.72581', Losses: '59', WinRatio: '0.06451613', Top10Ratio: '0.3387097', WinTop10Ratio: '0.1904762', Days: '4', DailyKills: '18', WeeklyKills: '34', RoundMostKills: '5', Kills: '36', MaxKillStreaks: '2', Assists: '13', KillDeathRatio: '0.6101695', HeadshotKills: '6', HeadshotKillRatio: '0.1666667', VehicleDestroys: '0', RoadKills: '0', WalkDistance: '60447.7', RideDistance: '3126.022', SwimDistance: '299.2884', MoveDistance: '63573.73', AvgWalkDistance: '974.963', AvgRideDistance: '50.41972', AvgSwimDistance: '4.827231', AvgMoveDistance: '1030.21', LongestKill: '112.7924', Suicides: '1', TeamKills: '1', MostSurvivalTime: '1462.721', AvgSurvivalTime: '575.3673', Heals: '55', Boosts: '65', DamageDealt: '5660.86', WeaponAcquired: '184', DBNOs: '29', Revives: '5' } } } Is this an exemple, i hid the pubgaccount id and nickname for his privacy

If someone knows how to fix that, thank you

Player matches

Hello,

so there's a method to get recent plays/matches but I can't make it work. However I see some pubg stats sites to be able to provide such info. did the method change or smth? also, is it possible to get player's data from the past seasons?

Hi Nikita, has the interface changed again?

I remember that it changed from entry.playbattlegrounds.com:81 to prod-live-entry.playbattlegrounds.com.

Has it changed again? I got an open error now when I start to run the entrance code.

Error connecting:

Wish you kind reply!

Invalid Auth

Hello, for this morning i can't connect the app to PUBG, since the last update 3.8.22.4

The server returns this error : Error connecting: AR:INVALID_AUTH_DATA_ERROR

The link to connect takes clientGameVersion and fullClientGameVersion

Thanks for helping me

Need Upgrade of actual version

Hello since yesterday i can't log in it says "AR:NEED_UPGRADE" with whatever version

I saw the endpoint has changed and the parameter "fullClientVersion" no longer exists

But now, the version is 4.3.6.6 (today 06/29/2018) and the client can't connect with
4.3.6
4.3.6.6
4.3.6.6.0
4.3.6.8

On the http endpoint of PUBG we see the version : "verreq": "4.3.6",

wss://prod-live-entry.playbattlegrounds.com/userproxy?provider=steam&ticket=140000003303D474250F624A6EBD4F1D010010012D08355B180000000100000002000000D91DDF5200000000ED81330536000000B200000032000000040000006EBD4F1D0100100120D20800D91DDF52D91DDF520000000087A92B5B0759475B01008440020000000000BBAD85EC1C3CAEDCD7A30600FE7BBBEA00B479B129142FA52139895567E45E07890A9296CF2F2E27DAAFA041C364C05D3D7E3893F7DC7D745205B30DB50143E8982A7CC399F2884ACB466FD5422ECD067D4914995CA76A78192FC655AD75400A8DD4BAD69F3DBD11FB904A61D7F4EC45557D3AF676440EEEE79768F50BA74467&playerNetId=76561198452030830&cc=FR&clientGameVersion=4.3.6.8&timezoneOffset=2 Error connecting: AR:NEED_UPGRADE

Could someone help me ? Thanks !

PUBG Update now [wss://prod-live-cfentry.playbattlegrounds.com]

    _ended: false,
    res: [IncomingMessage],
    aborted: true,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: [HTTPParser],
    maxHeadersCount: null,
    [Symbol(isCorked)]: false,
    [Symbol(outHeadersKey)]: [Object] } },

type: 'error',
message: 'Unexpected server response: 403',
error:

Recoil on PUBG

Good morning,
has someone a recoil script for PUBG?
Best regards

GetMatchByID

Is There anyway to get Matches by id?
is There anyway to get Matches list?
anyone have the packet that recive that?

endpoints

Does anyone know the new endpoints or perhaps there are more changes than that.

HcRemoteException

/getBoard works and returns leaderboard
/getAccountIdByNickname works as well.

post to /getStats with an account ID fails with this error

{ "success": false, "error": 1, "data": "HcRemoteException" }

NOTE: found this happened when I didn't send the "mode" parameter. Perhaps because the account I requested had not played any games in this game mode. Setting it to 'squad'/'squad-fpp' works

UserAllRecord

It looks like this request isn't working anymore, what's up from the PUBG servers ?

Hello Hormold, It seems the interface entry.playbattlegrounds.com:81 stop serving

9 hours ago, the pubg stats query via entry.playbattlegrounds.com:81 failed
We telnet the server with 81 port, however timeout all the time.
You are an expert on this, I am looking for your confirmation about this situation. is it surely we can not query pubg stats by this way and this interface now?

It seems that the GetBroUserStatesByNickname disabled.

Please help with ticket

In wireshark there are no logs like "userproxy" and no logs in tcp.port 81. Why is this happening?

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.