Advertisement
Guest User

Untitled

a guest
Jan 8th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.14 KB | None | 0 0
  1. var express = require('express');
  2. var rc4 = require('arc4');
  3. var path = require('path')
  4. var app = express();
  5.  
  6. app.post('/async/ServerAction', function (req, res) {
  7. var cipher = rc4('arc4', '_level0');
  8. 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>';
  9.  
  10. 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>';
  11. function S4() {
  12. return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
  13. }
  14. guid = (S4() + S4() + "-" + S4() + "-4" + S4().substr(0,3) + "-" + S4() + "-" + S4() + S4() + S4()).toLowerCase();
  15.  
  16. var userData = '<user UserId="1" hwId="'+guid+'" ticketId="свой введи плз" RoleFlags="262144" />';
  17. var today = new Date();
  18. var system = '<system ServerDate="'+today.toISOString()+'" RPath="fs/3p897j5lf4e0j.swf" RVersion="49" />';
  19. 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>';
  20. res.send(message);
  21. });
  22.  
  23. app.get("/fs/:name!:hash.swf", function(req,res){
  24. res.sendFile(path.join(__dirname, 'public/fs', req.params.name+".swf"));
  25. });
  26.  
  27. app.get('/async/Ping', function (req, res) {
  28. res.send('<response isPong="true" />');
  29. });
  30.  
  31. app.post('/async/Ping', function (req, res) {
  32. res.send('<response isPong="true" />');
  33. });
  34.  
  35. app.use('/', express.static(path.join(__dirname, 'public')))
  36.  
  37. app.post('/async/Logout', function (req, res) {
  38. res.send('<response Success="true" />');
  39. });
  40.  
  41. app.post('/async/Login', function (req, res) {
  42. res.send('<response Success="true" />');
  43. });
  44.  
  45. app.post('/async/Register', function (req, res) {
  46. res.send('<response Success="true" Stage="0" ErrorCodeUserName="0" ErrorCodePassword="0" ErrorCodeReferalName="0" />');
  47. });
  48.  
  49. app.post('/async/RegisterValidate', function (req, res) {
  50. res.send('<response Success="true" Code="0" Data="говно" ErrorCode="0" />');
  51. });
  52.  
  53. app.get('/cards', function (req, res) {
  54. res.send('Здесь нет донатов))))');
  55. });
  56.  
  57. app.listen(8080, function () {
  58. console.log('Rpworld started on port 8080!');
  59. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement