Shadow19

DPE 2 Documentation

Feb 16th, 2017
597
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.61 KB | None | 0 0
  1. ==IMPORTANT (Update July 20th 2017)==
  2. PLEASE WATCH THIS VIDEO IF YOU'RE SETTING UP
  3. https://youtu.be/1JshIC6_6w4
  4.  
  5. DO NOT USE THE STEPS BELOW IF YOU'RE USING HTTPS XAT, OTHERWISE GO AHEAD.
  6. =====================================
  7.  
  8. =[Decoy Packet Editor 2 Documentation]=
  9.  
  10. [Install]
  11. Please watch the video here: https://www.youtube.com/watch?v=ogzL8TICrj4
  12. Alternatively, if you've used cyborg, you do the same setup for the auto-configuration script options.
  13.  
  14. Steps:
  15. 1. Windows Key + R
  16. 2. Type in "inetcpl.cpl"
  17. 3. Goto "Connections" tab.
  18. 4. Tick "Use automatic configuration script"
  19. 5. Type in for the "Address": http://shadow19.xyz/proxy
  20. 6. Hit OK!
  21. [==]
  22.  
  23. [Uninstall]
  24. Steps:
  25. 1. Windows Key + R
  26. 2. Type in "inetcpl.cpl"
  27. 3. Goto "Connections" tab.
  28. 4. Delete what is typed in for "Address"
  29. 5. Untick "Use automatic configuration script"
  30. 6. Hit OK!
  31. [==]
  32.  
  33. [Problems]
  34. I'm not doing any more work on the DPE project anymore since I've quit xat, if you find bugs, you're on your own.
  35.  
  36. If you get problems like not getting "DPE II has initiated" when loading a chat
  37. try clearing your browser cache, or loading "http://xat.com/web_gear/chat/ip2.php" in your browser
  38. and hitting reload.
  39.  
  40. NOTE:
  41. Will NOT work in Firefox 51+
  42. Will NOT work in Microsoft Edge
  43. [==]
  44.  
  45. [Filter Variables]
  46.  
  47. decoy = {Hash}
  48. decoy["uid"] = Current user id for current room {String}
  49. decoy["room"] = Current room id for current room {String}
  50. decoy["roomname"] = Current room name for current room {String}
  51. decoy["done"] = got done packet for current room {Boolean}
  52. decoy["<"] = Input socket for current room {Socket}
  53. decoy[">"] = Output socket for current room {Socket}
  54. direction = Where the packet originated from ('<' from xat server, '>' from xat client) {String}
  55. data = The current packet being processed by filter {String}
  56. Note: Setting data to false or nil will let you block the packet from sending.
  57.  
  58. [==]
  59.  
  60. [Global Variables]
  61.  
  62. Thread.main = {THREAD HASH}
  63. Thread.main["s"] = Chat sockets {Array}
  64. Thread.main["sa"] = Chat TCPSockets that were TCPServers {Array}
  65. Thread.main["cl"] = Log of all packets (Last 300 packets) {Array}
  66. Thread.main["fi"] = List of all loaded filters {Array}
  67.  
  68. [Thread.main["fi"] Notes]
  69. Each element is a hash containing keys:
  70. fn = Filename {String}, t = Modified Timestamp {Integer}, f = contents of file {String}
  71. [=~]
  72.  
  73. Thread.main["ac"] = List of currently loaded chats {Hash}
  74.  
  75. [Thread.main["ac"] Notes]
  76. Each key is a xat user id that points to another key that is a room id.
  77. The room id key then points to a hash containing the keys:
  78. < = Input Socket {Socket}, > = Output Socket {Socket}
  79. Format: Thread.main["ac"][ID][ROOM]
  80. [=~]
  81.  
  82. Thread.main["au"] = List of currently active users {Hash}
  83.  
  84. [Thread.main["au"] Notes]
  85. Each key is a xat room id that points to an array of xat user ids.
  86. Format: Thread.main["au"][ROOM]
  87. [=~]
  88.  
  89. Thread.main["j2"] = A variable used for setting J2 attributes before login {Hash}
  90.  
  91. [Thread.main["j2"] Notes]
  92. Each key is a xat room id that points to a Hash.
  93. The hash in each room id is used to set the attributes of the j2
  94. Format: Thread.main["j2"][ROOM] = {"attribute"=>"value"}
  95. Would set attributes in j2 (You will not see it however.)
  96. [=~]
  97.  
  98. Thread.main["sl"] = List of socket links {Hash}
  99.  
  100. [Thread.main["sl"] Notes]
  101. Each key is a socket that links to an array containing the items:
  102. [
  103. SOCKET, = socket (Input or Output, opposite of the socket provided when accessing) {Socket}
  104. DIRECTION, = determining if socket is from input or output ("<" or ">") {String}
  105. ROOM_ID, = room id of socket {String}
  106. USER_ID, = user id of socket {String}
  107. ROOM_NAME, = room name of socket {String}
  108. DONE_BOOLEAN = done packet boolean for socket {Boolean}
  109. ]
  110. [=~]
  111.  
  112. Thread.main["cc"] = Room ID at currently active chat {String}
  113. Thread.main["udb"] = User information listed by user id {Hash}
  114.  
  115. [Thread.main["udb"] Notes]
  116. Thread.main["udb"]["checksums"] = Checksums of user info {Array}
  117. The rest of Thread.main["udb"] will consist of keys that are user ids that link to a hash of user info.
  118. Format: Thread.main["udb"][USER_ID]
  119. [=~]
  120.  
  121. Thread.main["cli_log"] = List of booleans for turning client log off and on ([INPUT_BOOLEAN, OUTPUT_BOOLEAN]) {Array}
  122. Thread.main["wl_log"] = Boolean for turning weblink log off and on {Boolean}
  123.  
  124. [==]
  125.  
  126. [API Functions]
  127.  
  128. getAttr = for getting any attribute from a xat packet {String}
  129. Format: String.getAttr("attribute")
  130.  
  131. setAttr = for setting any attribute on a xat packet {String}
  132. Format: String.setAttr("attribute","value")
  133.  
  134. getAttrs = for getting all attributes from a xat packet into a list {Hash}
  135. Format: String.getAttrs
  136.  
  137. tag? = for determining if a xat packet has a certain tag name {Boolean}
  138. Format: String.tag?("tag")
  139.  
  140. tag = for getting the tag name from a xat packet {String}
  141. Format: String.tag
  142.  
  143. getId = for getting the id of a user using user name {String}
  144. Format: getId(Username)
  145.  
  146. getUsername = for getting the user name of a user using user id {String}
  147. Format: getUsername(Userid)
  148.  
  149. getRoomId = for getting the room id using a room name {String}
  150. Format: getRoomId(Roomname)
  151.  
  152. getRoomName = for getting the room name using a room id {String}
  153. Format: getRoomName(Roomid)
  154.  
  155. xaviLink = W.I.P
  156. deepCopy = creates a hard copy of a variable {Any}
  157. csum = creates a crc32 checksum from a String {String}
  158. windows? = determines if os is windows {Boolean}
  159. mac? = determines if os is mac os {Boolean}
  160. linux? = determines if os is linux {Boolean}
  161. unix? = determines if os is unix {Boolean}
  162. xeat = grabs data from a url, and caches it under the dpe_cache folder {String}
  163. policy = grabs the current policy file for DPE 2 {String}
  164.  
  165. packet = builds a xat packet out of a Hash {String}
  166. Format: packet({"tagname"=>{"attribute"=>"value"}})
  167.  
  168. response = returns a HTTP header for given data {String}
  169. Format: response(DATA, EXPIRE_IN_SECONDS, DATA_MIMETYPE)
  170.  
  171. xp = gets room port for given room id {Integer}
  172.  
  173. [==]
  174.  
  175. [DPE 2 Filter Info]
  176. Filters take the form of a file with the .rb extension.
  177.  
  178. Filters should be placed in the filters folder, you may edit/create any on the fly
  179. and DPE 2 will automatically load / update them in, no restart necessary.
  180. [==]
  181.  
  182. [DPE 2 Filter Commands Variables / Info]
  183. Commands begin with '//'
  184. Typing '//' or '//?' will result in displaying help information.
  185. Use the included commands with DPE 2 for reference on how to make commands.
  186.  
  187. Commands are dynamic, so you may edit them on the fly, and the program will use
  188. the latest edit you did of one, and you may also create new commands if you wish, no restart required.
  189.  
  190. args = list of arguments made from spaced data for a command {Array}
  191. argu = all arguments together to be used as an argument for a command {String}
  192. cmd = the name of the command used by the user {String}
  193. [==]
  194.  
  195. [Ruby Gem References]
  196.  
  197. socket: https://docs.ruby-lang.org/en/2.3.0/Socket.html
  198. eat: http://www.rubydoc.info/gems/eat/0.1.8
  199. json: https://docs.ruby-lang.org/en/2.3.0/JSON.html
  200. cgi: https://docs.ruby-lang.org/en/2.3.0/CGI.html
  201. zlib: https://docs.ruby-lang.org/en/2.3.0/Zlib.html
  202. base64: https://docs.ruby-lang.org/en/2.3.0/Base64.html
  203.  
  204. [==]
Advertisement
Add Comment
Please, Sign In to add comment