Hack Ex api


SUBMITTED BY: mlkgr

DATE: Nov. 19, 2015, 3:33 p.m.

UPDATED: Nov. 19, 2015, 4 p.m.

FORMAT: Ruby

SIZE: 24.0 kB

HITS: 886

  1. module HackEx
  2. module Network
  3. require 'net/http'
  4. require 'openssl'
  5. private
  6. def Get urip, params = {}
  7. auth_token = params.delete(:auth_token)
  8. Signature(params)
  9. uri = URI.join(HackEx::Request::URI_BASE, urip)
  10. uri.query = URI.encode_www_form(params)
  11. request = Net::HTTP::Get.new uri.request_uri
  12. request['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
  13. request['User-Agent'] = HackEx::Request::USER_AGENT
  14. request['X-API-KEY'] = auth_token unless auth_token.nil?
  15. request
  16. end
  17. def Post urip, params = {}
  18. auth_token = params.delete(:auth_token)
  19. Signature(params)
  20. uri = URI.join(HackEx::Request::URI_BASE, urip)
  21. request = Net::HTTP::Post.new uri.path
  22. request['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
  23. request['User-Agent'] = HackEx::Request::USER_AGENT
  24. request['X-API-KEY'] = auth_token unless auth_token.nil?
  25. request.body = URI.encode_www_form(params)
  26. request
  27. end
  28. public
  29. def Do http, request
  30. response = http.request request
  31. if response.is_a? Net::HTTPOK
  32. json = JSON.parse(response.body)
  33. raise HackExError, "Not success: #{json}" unless json['success']
  34. json
  35. else
  36. raise HackExError, "Not OK: #{response.inspect}, #{response.body}"
  37. end
  38. end
  39. def NetworkDo &proc
  40. uri_base = URI(HackEx::Request::URI_BASE)
  41. Net::HTTP.start(uri_base.host, uri_base.port, :use_ssl => true, :verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http|
  42. proc.call(http)
  43. end
  44. end
  45. end
  46. end
  47. module HackEx
  48. class HackExError < StandardError
  49. end
  50. end
  51. module HackEx
  52. class Helper
  53. class << self
  54. SOFTWARE_ID_TO_NAME = {
  55. 1 => 'Firewall',
  56. 2 => 'Bypasser',
  57. 3 => 'Password Cracker',
  58. 4 => 'Password Encryptor',
  59. 5 => 'Antivirus',
  60. 6 => 'Spam',
  61. 7 => 'Spyware',
  62. 8 => 'Notepad'
  63. }
  64. SOFTWARE_NAME_TO_ID = SOFTWARE_ID_TO_NAME.invert
  65. def SoftwareIdToName id
  66. raise HackExError, "SoftwareIdToName - incorrect id #{id}" unless SOFTWARE_ID_TO_NAME.has_key?(id.to_i)
  67. SOFTWARE_ID_TO_NAME[id.to_i]
  68. end
  69. def SoftwareNameToId name
  70. raise HackExError, "SoftwareNameToId - incorrect name #{name}" unless SOFTWARE_NAME_TO_ID.has_key?(name)
  71. SOFTWARE_NAME_TO_ID[name]
  72. end
  73. def SoftwareId param
  74. return SOFTWARE_NAME_TO_ID[param] if SOFTWARE_NAME_TO_ID.has_key?(param)
  75. return param.to_i
  76. end
  77. PROCESS_TYPE_ID_TO_NAME = {
  78. 1 => 'bypass',
  79. 2 => 'crack',
  80. 3 => 'download',
  81. 4 => 'upload'
  82. }
  83. PROCESS_TYPE_NAME_TO_ID = PROCESS_TYPE_ID_TO_NAME.invert
  84. def ProcessTypeIdToName id
  85. raise HackExError, "ProcessTypeIdToName - incorrect id #{id}" unless PROCESS_TYPE_ID_TO_NAME.has_key?(id.to_i)
  86. PROCESS_TYPE_ID_TO_NAME[id.to_i]
  87. end
  88. def ProcessTypeNameToId name
  89. raise HackExError, "ProcessTypeNameToId - incorrect name #{name}" unless PROCESS_TYPE_NAME_TO_ID.has_key?(name)
  90. PROCESS_TYPE_NAME_TO_ID[name]
  91. end
  92. def ProcessTypeId param
  93. return PROCESS_TYPE_NAME_TO_ID[param] if PROCESS_TYPE_NAME_TO_ID.has_key?(param)
  94. return param.to_i
  95. end
  96. PROCESS_STATUS_ID_TO_NAME = {
  97. 1 => 'progress',
  98. 2 => 'ready',
  99. 3 => 'failed'
  100. }
  101. PROCESS_STATUS_NAME_TO_ID = PROCESS_STATUS_ID_TO_NAME.invert
  102. def ProcessStatusId param
  103. return PROCESS_STATUS_NAME_TO_ID[param] if PROCESS_STATUS_NAME_TO_ID.has_key?(param)
  104. return param.to_i
  105. end
  106. def FilterHashArray array, filter = {}, include = true, &proc
  107. out = []
  108. array.each do |item|
  109. #puts "item #{item.inspect}"
  110. ok = true
  111. filter.each_pair do |k, v|
  112. #puts "#{k} = #{v.inspect}"
  113. if !item.has_key?(k) ||
  114. v.is_a?(Array) && !v.map(&:to_s).include?(item[k].to_s) ||
  115. !v.is_a?(Array) && v.to_s != item[k].to_s
  116. ok = false
  117. #puts "False"
  118. break
  119. end
  120. end
  121. if ok && include || !ok && !include
  122. #puts "Ok"
  123. out << item
  124. proc.call(item) unless proc.nil?
  125. end
  126. end
  127. out
  128. end
  129. end
  130. end
  131. end
  132. module HackEx
  133. class << self
  134. public
  135. def NetworkDo &proc
  136. HackEx::Request::NetworkDo &proc
  137. end
  138. def LoginDo email, password, &proc
  139. NetworkDo do |http|
  140. user = HackEx::Action.Login http, email, password
  141. token = user['auth_token']
  142. proc.call(http, token, user)
  143. end
  144. end
  145. def VictimProcesses user_processes, victim_user_id, process_type_id = 0
  146. out = []
  147. user_processes = [] if user_processes.nil?
  148. user_processes.each do |p|
  149. next if (process_type_id.to_i != 0 && process_type_id.to_i != p['process_type_id'].to_i)
  150. out << p if p['victim_user_id'].to_i == victim_user_id.to_i
  151. end
  152. out
  153. end
  154. def SpamUpload http, auth_token, user_id, level
  155. scan = Request.Do(http, HackEx::Request.UserAddProcess(auth_token, user_id, 'scan', '1264694', '100'))
  156. begin
  157. Request.Do(http, Request.UserAddProcess(auth_token, user_id, 'upload', '1264818', level.to_i.to_s))
  158. rescue
  159. puts "Rescued: #{$!}"
  160. end
  161. Request.Do(http, HackEx::Request.ProcessDelete(auth_token, scan['user_processes'][0]['id']))
  162. puts "Uploading spam #{level} to user #{user_id}"#, scan process #{scan['user_processes'][0]['id']}"
  163. end
  164. def VictimProcessClean http, auth_token, user_id
  165. HackEx::Request.Do(http, HackEx::Request.UserProcesses(auth_token))['user_processes'].each do |p|
  166. if p['victim_user_id'].to_i == user_id.to_i
  167. puts "Delete process #{p['id']}"
  168. HackEx::Request.Do(http, HackEx::Request.ProcessDelete(auth_token, p['id']))
  169. end
  170. end
  171. end
  172. def VictimProcessWait http, auth_token, user_id, process_id = nil
  173. finish = false
  174. chars = 'abcdefghijklmnopqrstuvwxyz'
  175. total_msg = 0
  176. while !finish do
  177. finish = true
  178. long_wait = false
  179. if process_id.nil?
  180. processes = HackEx::Request.Do(http, HackEx::Request.UserProcesses(auth_token))['user_processes']
  181. else
  182. processes = [ HackEx::Request.Do(http, HackEx::Request.ProcessInfo(auth_token, process_id))['process'] ]
  183. end
  184. processes.each do |p|
  185. if p['victim_user_id'].to_i == user_id.to_i
  186. c = chars[total_msg % chars.length]
  187. if (p['process_type_id'].to_i == 3 || p['process_type_id'].to_i == 4) && p['status'].to_i == 2
  188. puts "Delete ready process #{p['id']} #{c}"
  189. total_msg += 1
  190. HackEx::Request.Do(http, HackEx::Request.ProcessDelete(auth_token, p['id']))
  191. elsif p['status'].to_i == 3
  192. puts "Retry process #{p['id']} #{c}"
  193. total_msg += 1
  194. HackEx::Request.Do(http, HackEx::Request.ProcessRetry(auth_token, p['id']))
  195. finish = false
  196. elsif p['status'].to_i == 1
  197. puts "Waiting process #{p['id']}, overclocks #{p['overclocks_needed']} #{c}"
  198. long_wait = true if p['overclocks_needed'].to_i > 1
  199. total_msg += 1
  200. finish = false
  201. end
  202. end
  203. end
  204. sleep (long_wait ? 20 : 5) unless finish
  205. print '.' unless finish
  206. end
  207. end
  208. def ProcessClean email, password
  209. LoginDo(email, password) do |http, auth_token|
  210. json = Request.Do(http, Request.UserProcesses(auth_token))
  211. json['user_processes'].each do |p|
  212. if p['status'].to_i == 2 && (p['process_type_id'].to_i == 4 || p['process_type_id'].to_i == 3)
  213. puts p.inspect
  214. Request.Do(http, Request.ProcessDelete(auth_token, p['id']))
  215. end
  216. end
  217. end
  218. end
  219. def ParseSoftware software
  220. out = {}
  221. software = [] if software.nil?
  222. software.each do |s|
  223. #puts s
  224. out[s['name']] = s['software_level']
  225. end
  226. out
  227. end
  228. def CleanUser user
  229. out = user.dup
  230. ['reputation', 'pts_to_next_level', 'pts_level_progress', 'overclocks', 'wallpaper', 'created_at'].each do |v|
  231. out.delete(v)
  232. end
  233. out
  234. end
  235. def CleanBank bank
  236. out = bank.dup
  237. ['id'].each do |v|
  238. out.delete(v)
  239. end
  240. out
  241. end
  242. end
  243. end
  244. module HackEx
  245. class Action
  246. class << self
  247. public
  248. def Login http, email, password
  249. json = HackEx::Request.Do(http, HackEx::Request.Login(email, password))
  250. json['user']
  251. end
  252. def AddContact http, user_id1, auth_token1, user_id2, auth_token2
  253. # prevent failure
  254. json = HackEx::Request.Do(http, [HackEx::Request.AddContact(auth_token1, user_id2)])
  255. json = HackEx::Request.Do(http, [HackEx::Request.AcceptContact(auth_token2, user_id1)])
  256. end
  257. def UserBank http, auth_token
  258. json = HackEx::Request.Do(http, HackEx::Request.UserBank(auth_token))
  259. json['user_bank'] || {}
  260. rescue
  261. # ok
  262. {}
  263. end
  264. def UserProcesses http, auth_token
  265. json = HackEx::Request.Do(http, HackEx::Request.UserProcesses(auth_token))
  266. json['user_processes'] || []
  267. rescue
  268. # ok
  269. []
  270. end
  271. def UserSoftware http, auth_token
  272. json = HackEx::Request.Do(http, HackEx::Request.UserSoftware(auth_token))
  273. json['user_software'] || []
  274. rescue
  275. # ok
  276. []
  277. end
  278. def UserSpam http, auth_token
  279. json = HackEx::Request.Do(http, HackEx::Request.UserSpam(auth_token))
  280. json['spam'] || []
  281. rescue
  282. # ok
  283. []
  284. end
  285. def VictimSpam http, auth_token,id
  286. json = HackEx::Request.Do(http, HackEx::Request.VictimSpam(auth_token,id))
  287. json['spam'] || []
  288. rescue
  289. # ok
  290. []
  291. end
  292. def ProcessClean http, auth_token, params = {}
  293. process_types = params.fetch(:process_types, [Helper.ProcessTypeId('download'), Helper.ProcessTypeId('upload')])
  294. process_types = [process_types] unless process_types.is_a?(Array)
  295. process_statuses = params.fetch(:process_statuses, Helper.ProcessStatusId('ready'))
  296. process_statuses = [] unless process_statuses.is_a?(Array)
  297. user_processes = params.fetch(:user_processes, nil)
  298. user_processes ||= HackEx::Action.UserProcesses(http, auth_token)
  299. to_clean = []
  300. ready_list = Helper.FilterHashArray user_processes, {'status' => process_statuses, 'process_type_id' => process_types}
  301. out_list = user_processes - ready_list
  302. ready_list.each do |p|
  303. to_clean << p['id']
  304. end
  305. unless to_clean.empty?
  306. HackEx::Request.Do(http, HackEx::Request.ProcessesDelete(auth_token, to_clean))
  307. end
  308. out_list
  309. end
  310. def PrepareToSpam http, auth_token, params = {}
  311. PurchaseMissingSoftware http, auth_token, 'Spam', params
  312. end
  313. def PrepareToCrack http, auth_token, params = {}
  314. PurchaseMissingSoftware http, auth_token, 'Password Cracker', params
  315. end
  316. def PrepareToCrackAndSpam http, auth_token, params = {}
  317. PurchaseMissingSoftware http, auth_token, ['Spam', 'Password Cracker'], params
  318. end
  319. def StartProcess http, auth_token, victim_user_id, mode, params = {}
  320. sw_victim = true
  321. case mode
  322. when 'bypass'
  323. action = 'bypass'
  324. sw_name = 'Firewall'
  325. add_param = params.fetch(:fw_add, 0)
  326. when 'crack'
  327. action = 'crack'
  328. sw_name = 'Password Encryptor'
  329. add_param = params.fetch(:enc_add, 0)
  330. when 'spam'
  331. action = 'upload'
  332. sw_name = 'Spam'
  333. add_param = 0
  334. sw_victim = false
  335. when 'spyware'
  336. action = 'upload'
  337. sw_name = 'Spyware'
  338. add_param = 0
  339. sw_victim = false
  340. else
  341. raise HackExError, "Incorrect mode #{mode}"
  342. end
  343. user_processes = params.fetch(:user_processes, nil)
  344. user_processes ||= HackEx::Action.UserProcesses(http, auth_token)
  345. software_id = params.fetch(:software_id, nil)
  346. software_level = params.fetch(:software_level, nil)
  347. if software_id.nil? || software_level.nil?
  348. if sw_victim
  349. victim_user = params.fetch(:victim_user, nil)
  350. victim_user ||= HackEx::Request.Do(http, HackEx::Request.VictimInfo(auth_token, victim_user_id))
  351. victim_sws = victim_user['user_software']
  352. else
  353. user_software = params.fetch(:user_software, nil)
  354. user_software ||= HackEx::Action.UserSoftware(http, auth_token)
  355. victim_sws = user_software
  356. #puts victim_sws.inspect
  357. end
  358. victim_sw = Helper.FilterHashArray victim_sws, {'software_type_id' => Helper.SoftwareId(sw_name)}
  359. #puts victim_sw.inspect if action == 'upload'
  360. unless victim_sw.empty?
  361. software_id = victim_sw.first['software_id']
  362. software_level = victim_sw.first['software_level']
  363. else
  364. puts "No #{sw_name} on #{sw_victim ? 'victim' : 'us'} is found"
  365. software_level = 1
  366. end
  367. end
  368. # need levels
  369. software_need_level = software_level.to_i + add_param.to_i
  370. software_need_level = params[:level].to_i if params.has_key?(:level)
  371. software_need_level = 1 if software_need_level.to_i < 1
  372. puts "Process #{mode} user #{victim_user_id}, sw level #{software_need_level} (current #{software_level.to_i})"
  373. scan_processes = Helper.FilterHashArray user_processes, {'process_type_id' => Helper.ProcessTypeId(action), 'victim_user_id' => victim_user_id}
  374. unless scan_processes.empty?
  375. # check is it ok or not
  376. if scan_processes.size > 1
  377. # todo: handle better more than 1 process at the same time
  378. # now - as incorrect situation, just remove everything
  379. to_clean = []
  380. scan_processes.each do |p|
  381. to_clean << p['id']
  382. end
  383. puts "More than 1 existing #{mode} processes, delete everything"
  384. HackEx::Request.Do(http, HackEx::Request.ProcessesDelete(auth_token, to_clean))
  385. scan_processes = []
  386. else
  387. scan_process = scan_processes.first
  388. scan_process_sw_level = scan_process['software_level']
  389. scan_process_sw_id = scan_process['software_id']
  390. if scan_process_sw_level.to_i < software_need_level.to_i || scan_process_sw_id.to_s != software_id.to_s
  391. puts "Existing process sw level #{scan_process_sw_level.to_i} < #{software_need_level.to_i} or sw id #{scan_process_sw_id.to_s} != #{software_id.to_s}"
  392. HackEx::Request.Do(http, HackEx::Request.ProcessDelete(auth_token, scan_process['id']))
  393. scan_processes = []
  394. elsif scan_process['status'].to_s == Helper.ProcessStatusId('failed').to_s
  395. puts "Retry process #{scan_process['id']}"
  396. HackEx::Request.Do(http, HackEx::Request.ProcessRetry(auth_token, scan_process['id']))
  397. elsif scan_process['status'].to_s == Helper.ProcessStatusId('ready').to_s
  398. puts "Ready process #{scan_process['id']} found"
  399. elsif scan_process['status'].to_s == Helper.ProcessStatusId('progress').to_s
  400. puts "In progress process #{scan_process['id']} found"
  401. end
  402. end
  403. end
  404. if scan_processes.empty?
  405. puts "Add #{mode} process user #{victim_user_id} sw id #{software_id} level #{software_need_level}"
  406. json = HackEx::Request.Do(http, HackEx::Request.UserAddProcess(auth_token, victim_user_id, action, software_id, software_need_level))['user_processes'][0]
  407. puts "Process #{json['id']} is added"
  408. json
  409. else
  410. scan_processes.first
  411. end
  412. end
  413. private :StartProcess
  414. def StartBypass http, auth_token, victim_user_id, params = {}
  415. StartProcess http, auth_token, victim_user_id, 'bypass', params
  416. end
  417. def StartCrack http, auth_token, victim_user_id, params = {}
  418. StartProcess http, auth_token, victim_user_id, 'crack', params
  419. end
  420. def StartSpam http, auth_token, victim_user_id, params = {}
  421. StartProcess http, auth_token, victim_user_id, 'spam', params
  422. end
  423. end
  424. end
  425. end
  426. module HackEx
  427. module Request
  428. URI_BASE = 'https://api.hackex.net/v5/'
  429. USER_AGENT = 'Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; Nexus 5) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'
  430. class << self
  431. include Network
  432. private
  433. def Signature params
  434. out_params = {}
  435. ts = (Time.now.utc.to_f * 1000).to_i.to_s
  436. params['sig2'] = ts
  437. keys = params.keys.sort_by { |w|
  438. w#.downcase
  439. }
  440. keys.reverse!
  441. s = '1101101101'
  442. keys.each do |k|
  443. s += k.to_s + params[k].to_s
  444. out_params[k] = params[k]
  445. end
  446. keys.each do |k|
  447. params.delete(k)
  448. end
  449. keys.each do |k|
  450. params[k] = out_params[k]
  451. end
  452. sa = 'WqZnwjpaVZNvWDpJhqHCHhWtNfu86CkmtCAVErbQO'
  453. hash = Digest::SHA1.hexdigest(s + sa)
  454. params['sig'] = hash
  455. #puts "#{s + sa}: #{hash}"
  456. "#{hash}&sig2=#{ts}"
  457. end
  458. public
  459. def CreateUser username, email, password, facebook_id = nil
  460. params = { 'username' => username, 'email' => email, 'os_type_id' => '1' }
  461. params['password'] = password unless password.nil?
  462. params['facebook_id'] = facebook_id unless facebook_id.nil?
  463. Post 'user', params
  464. end
  465. def Login email, password
  466. Post 'auth', 'email' => email, 'password' => password
  467. end
  468. def RandomUsers auth_token, count = 5
  469. Get 'users_random', 'count' => count, :auth_token => auth_token
  470. end
  471. def VictimInfo auth_token, user_id
  472. Get 'user_victim', 'victim_user_id' => user_id, :auth_token => auth_token
  473. end
  474. def getVictimContacts auth_token, user_id
  475. Get 'victim_contacts', 'victim_user_id' => user_id, :auth_token => auth_token
  476. end
  477. def VictimBank auth_token, user_id
  478. Get 'victim_user_bank', 'victim_user_id' => user_id, :auth_token => auth_token
  479. end
  480. def StoreInfo auth_token
  481. Get 'store', :auth_token => auth_token
  482. end
  483. def UpdateVictimLog auth_token, user_id, text
  484. Post 'victim_user_log', 'victim_user_id' => user_id, 'text' => text, :auth_token => auth_token
  485. end
  486. def UpdateUserLog auth_token, text
  487. Post 'user_log', 'text' => text, :auth_token => auth_token
  488. end
  489. def UpdateUserNotepad auth_token, text
  490. Post 'user_notepad', 'text' => text, :auth_token => auth_token
  491. end
  492. def TransferBankFundsToSavings auth_token, amount
  493. Post 'bank_transfer_savings', 'amount' => amount, :auth_token => auth_token
  494. end
  495. def TransferBankFundsFromVictim auth_token, user_id, amount
  496. Post 'bank_transfer_from_victim', 'victim_user_id' => user_id, 'amount' => amount, :auth_token => auth_token
  497. end
  498. def TransferBankFundsToContact auth_token, user_id, amount
  499. Post 'bank_transfer_to_contact', 'contact_user_id' => user_id, 'amount' => amount, :auth_token => auth_token
  500. end
  501. def AddContact auth_token, user_id
  502. Post 'contact_add', 'contact_user_id' => user_id, :auth_token => auth_token
  503. end
  504. def AcceptContact auth_token, user_id
  505. Post 'contact_accept', 'contact_user_id' => user_id, :auth_token => auth_token
  506. end
  507. def RemoveContact auth_token, user_id
  508. Post 'contact_remove', 'contact_user_id' => user_id, :auth_token => auth_token
  509. end
  510. def StorePurchase auth_token, type, type_id
  511. params = {}
  512. case type
  513. when 'software'
  514. params['software_type_id'] = type_id
  515. when 'device'
  516. params['device_type_id'] = type_id
  517. when 'network'
  518. params['network_type_id'] = type_id
  519. else
  520. raise "Unknown type #{type}"
  521. end
  522. params[:auth_token] = auth_token
  523. Post 'store_purchase', params
  524. end
  525. def UserByIp auth_token, ip
  526. Get 'user', 'user_ip' => ip, 'process_type_id' => 1, :auth_token => auth_token
  527. end
  528. def UserInfo auth_token
  529. Get 'user', 'extras' => 'true', :auth_token => auth_token
  530. end
  531. def UserBank auth_token
  532. Get 'user_bank', :auth_token => auth_token
  533. end
  534. def UserViruses auth_token
  535. Get 'user_viruses', :auth_token => auth_token
  536. end
  537. def UserSoftware auth_token
  538. Get 'user_software', :auth_token => auth_token
  539. end
  540. def UserProcesses auth_token
  541. Get 'user_processes', :auth_token => auth_token
  542. end
  543. def UserSpam auth_token
  544. Get 'user_spam', :auth_token => auth_token
  545. end
  546. def UserSpyware auth_token
  547. Get 'user_spyware', :auth_token => auth_token
  548. end
  549. def UserRemoveUploadedVirus auth_token, virus_id, software_type_id
  550. Post 'user_virus_uploaded_remove', 'virus_id' => virus_id, 'software_type_id' => software_type_id, :auth_token => auth_token
  551. end
  552. def UserAddProcess auth_token, user_id, process_type, software_id, software_level = nil
  553. params = { 'victim_user_id' => user_id, 'software_id' => software_id }
  554. case process_type
  555. when 'scan', 'bypass'
  556. params['process_type_id'] = '1'
  557. when 'crack'
  558. params['process_type_id'] = '2'
  559. when 'download'
  560. params['process_type_id'] = '3'
  561. when 'upload'
  562. params['process_type_id'] = '4'
  563. else
  564. raise "Unknown type: #{process_type}"
  565. end
  566. params['software_level'] = software_level unless software_level.nil?
  567. params[:auth_token] = auth_token
  568. Post 'process', params
  569. end
  570. def ProcessInfo auth_token, process_id
  571. Get 'process', 'process_id' => process_id, :auth_token => auth_token
  572. end
  573. def ProcessRetry auth_token, process_id
  574. Post 'process_retry', 'process_id' => process_id, :auth_token => auth_token
  575. end
  576. def ProcessOverclock auth_token, process_id
  577. Post 'process_overclock', 'process_id' => process_id, :auth_token => auth_token
  578. end
  579. def ProcessDelete auth_token, process_id
  580. Post 'process_delete', 'process_id' => process_id, :auth_token => auth_token
  581. end
  582. def ProcessesDelete auth_token, process_ids
  583. Post 'processes_delete', 'process_ids' => process_ids.join('|'), :auth_token => auth_token
  584. end
  585. def Leaderboard auth_token, offset = 0
  586. Get 'leaderboards', 'offset' => offset, :auth_token => auth_token
  587. end
  588. end
  589. end
  590. end
  591. require 'digest/sha1'
  592. require 'json'

comments powered by Disqus