Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var express = require('express');
- var rc4 = require('arc4');
- var path = require('path')
- var app = express();
- app.post('/async/ServerAction', function (req, res) {
- var cipher = rc4('arc4', '_level0');
- var config = '<config><item Id="1" Parameter="AccessRoleFlags" Value="0" Type="number" /><item Id="3" Parameter="IsPreloaderFast" Value="0" Type="bool" /><item Id="4" Parameter="InitialVolumeValue" Value="0" Type="number" /><item Id="6" Parameter="IsPreloaderEnabled" Value="1" Type="bool" /><item Id="7" Parameter="IsStartupHomeLocation" Value="0" Type="bool" /><item Id="8" Parameter="SwfVersion" Value="" Type="string" /><item Id="9" Parameter="SynchronizeAvatarRotation" Value="1" Type="bool" /><item Id="10" Parameter="StatisticsSendInterval" Value="0" Type="number" /><item Id="12" Parameter="LanguageId" Value="1" Type="number" /><item Id="13" Parameter="SnId" Value="1" Type="number" /><item Id="14" Parameter="IsInternational" Value="0" Type="bool" /><item Id="15" Parameter="AutoServerSelectionAllowed"Value="1" Type="bool" /><item Id="16" Parameter="DaysToFullSoil" Value="28" Type="number" /><item Id="17" Parameter="DaysToHalfSoil" Value="14" Type="number" /><item Id="18" Parameter="CurrentQuest" Value="469" Type="number" /><item Id="20" Parameter="TypeWeapon" Value="1" Type="number" /><item Id="21" Parameter="SkipTutorial" Value="1" Type="bool" /><item Id="23" Parameter="CurrentQuestGroup" Value="6195" Type="string" /><item Id="24" Parameter="IsNewRegistration" Value="1"Type="bool" /><item Id="25" Parameter="IsMotivatingAdsOn" Value="1" Type="bool"/><item Id="26" Parameter="VersionMode" Value="2" Type="number" /></config>';
- var serversList = '<servers><item Id="1" TRId="27914" RId="5" RTMPUrl="rtmp://127.0.0.1:1935/rpworld" Load="0" QuestLocationLoad="0" FriendsCount="1" ClubsCount="5" Weight="5.1" /></servers>';
- function S4() {
- return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
- }
- guid = (S4() + S4() + "-" + S4() + "-4" + S4().substr(0,3) + "-" + S4() + "-" + S4() + S4() + S4()).toLowerCase();
- var ticketid = "";
- var userData = '<user UserId="1" hwId="'+guid+'" ticketId="'+ticketid+'" RoleFlags="262144" />';
- var today = new Date();
- var system = '<system ServerDate="'+today.toISOString()+'" RPath="fs/3p897j5lf4e0j.swf" RVersion="49" />';
- var message = '<?xml version="1.0" encoding="utf-8"?><response><promotion><i MRId="33168" State="1" /></promotion><promotion_banner><i MRId="19009" /></promotion_banner><promotion_whats_new><i Id="885" TypeId="2" MRId="33152" /><i Id="886" TypeId="2" MRId="33150" /><i Id="887" TypeId="2" MRId="33172" /><i Id="888" TypeId="1" MRId="33171" /><i Id="889" TypeId="2" MRId="33180" /></promotion_whats_new><preloader><i MRId="33169" ShowTime="2000" /><i MRId="33170" ShowTime="2000" /></preloader><sn_status IsBinded="0" /><user_name Value="Obama2019" /><postcard /><licence_promotion><item Id="1" GroupId="0" OrderId="0" MRId="14763" /><item Id="2" GroupId="0" OrderId="1" MRId="14764" /><item Id="3" GroupId="0" OrderId="2" MRId="14765" /><item Id="4" GroupId="1" OrderId="0" MRId="14766" /><item Id="5" GroupId="1" OrderId="1" MRId="14767" /><item Id="6" GroupId="1" OrderId="2" MRId="14768" /><item Id="7" GroupId="2" OrderId="0" MRId="20597" /><item Id="8" GroupId="2" OrderId="1" MRId="20598" /><item Id="9" GroupId="2" OrderId="2" MRId="20599" /></licence_promotion><flags IsUserDetailsMissing="1" EntranceCount="31" /><tutorial><item Id="-1" State="0" /><item Id="1" State="0" /><item Id="2" State="1" /><item Id="3" State="0" /><item Id="4" State="0" /><item Id="5" State="0" /></tutorial><miniquest><i Id="157783507" MiniquestId="2100002" IsPostponed="0" StartDate="2018-12-28T20:07:46.677"><i Id="318978361" TaskId="21000021" IsFinished="0" Counter="0" /><i Id="318978362" TaskId="21000022" IsFinished="0" Counter="0" /></i></miniquest><grants ReceivingCount="0" /><requests ReceivingCount="0" /><cdata value="'+cipher.encodeString(config)+'" /><cdata value="'+cipher.encodeString(system)+'" /><cdata value="'+cipher.encodeString(userData)+'" /><cdata value="'+cipher.encodeString(serversList)+'" /></response>';
- res.send(message);
- });
- app.get("/fs/:name!:hash.swf", function(req,res){
- res.sendFile(path.join(__dirname, 'public/fs', req.params.name+".swf"));
- });
- app.get('/async/Ping', function (req, res) {
- res.send('<response isPong="true" />');
- });
- app.post('/async/Ping', function (req, res) {
- res.send('<response isPong="true" />');
- });
- app.use('/', express.static(path.join(__dirname, 'public')))
- app.post('/async/Logout', function (req, res) {
- res.send('<response Success="true" />');
- });
- app.post('/async/Login', function (req, res) {
- res.send('<response Success="true" />');
- });
- app.post('/async/Register', function (req, res) {
- res.send('<response Success="true" Stage="0" ErrorCodeUserName="0" ErrorCodePassword="0" ErrorCodeReferalName="0" />');
- });
- app.post('/async/RegisterValidate', function (req, res) {
- res.send('<response Success="true" Code="0" Data="говно" ErrorCode="0" />');
- });
- app.listen(8080, function () {
- console.log('Rpworld started on port 8080!');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement