cherrypicker 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,7 +2,7 @@ Cherrypicker
2
2
  =========
3
3
 
4
4
  Cherrypicker was part of my final year project for university it
5
- is a Ruby Gem that lets you download from; Rapidshare, Hotfile, Youtube and Vimeo
5
+ is a Ruby Gem that lets you download from; Rapidshare, Hotfile, Hotfile, Youtube, Vimeo & Megavideo
6
6
  You can also utilise the LinkChecker to see if your files are
7
7
  alive on Rapidshare and Hotfile
8
8
 
@@ -20,7 +20,7 @@ class Download
20
20
 
21
21
  @link = link
22
22
  @size = o[:size]
23
- @location = o[:location]
23
+ @location = o[:location] ||= ""
24
24
  @filename = o[:filename]
25
25
  @progress = 0
26
26
  @finished = false
@@ -37,56 +37,56 @@ class Megavideo
37
37
 
38
38
  def decrypt(un,k1,k2) #credit http://userscripts.org/scripts/review/42944
39
39
  k1 = k1.to_i
40
- k2 = k2.to_i
40
+ k2 = k2.to_i
41
41
 
42
- #convert the hex "un" to binary
43
- location1 = Array.new
44
- un.each_char do |char|
45
- #puts "#{char} => #{char.to_i(16).to_s(2)}"
46
- location1 << ("000" + char.to_i(16).to_s(2))[-4,4]
47
- end
42
+ #convert the hex "un" to binary
43
+ location1 = Array.new
44
+ un.each_char do |char|
45
+ #puts "#{char} => #{char.to_i(16).to_s(2)}"
46
+ location1 << ("000" + char.to_i(16).to_s(2))[-4,4]
47
+ end
48
48
 
49
- location1 = location1.join("").split("")
49
+ location1 = location1.join("").split("")
50
50
 
51
- location6 = Array.new
52
- 0.upto(383) do |n|
53
- k1 = (k1 * 11 + 77213) % 81371
54
- k2 = (k2 * 17 + 92717) % 192811
55
- location6[n] = (k1 + k2) % 128
56
- end
57
-
58
- location3 = Array.new
59
- location4 = Array.new
60
- location5 = Array.new
61
- location8 = Array.new
62
-
63
- 256.downto(0) do |n|
64
- location5 = location6[n]
65
- location4 = n % 128
66
- location8 = location1[location5]
67
- location1[location5] = location1[location4]
68
- location1[location4] = location8
51
+ location6 = Array.new
52
+ 0.upto(383) do |n|
53
+ k1 = (k1 * 11 + 77213) % 81371
54
+ k2 = (k2 * 17 + 92717) % 192811
55
+ location6[n] = (k1 + k2) % 128
69
56
  end
70
57
 
71
- 0.upto(127) do |n|
72
- location1[n] = location1[n].to_i ^ location6[n+256] & 1
73
- end
58
+ location3 = Array.new
59
+ location4 = Array.new
60
+ location5 = Array.new
61
+ location8 = Array.new
62
+
63
+ 256.downto(0) do |n|
64
+ location5 = location6[n]
65
+ location4 = n % 128
66
+ location8 = location1[location5]
67
+ location1[location5] = location1[location4]
68
+ location1[location4] = location8
69
+ end
74
70
 
75
- location12 = location1.join("")
76
- location7 = Array.new
71
+ 0.upto(127) do |n|
72
+ location1[n] = location1[n].to_i ^ location6[n+256] & 1
73
+ end
77
74
 
78
- n = 0
79
- while (n < location12.length) do
80
- location9 = location12[n,4]
81
- location7 << location9
82
- n+=4
83
- end
75
+ location12 = location1.join("")
76
+ location7 = Array.new
84
77
 
85
- result = ""
86
- location7.each do |bin|
87
- result = result + bin.to_i(2).to_s(16)
88
- end
89
- result
78
+ n = 0
79
+ while (n < location12.length) do
80
+ location9 = location12[n,4]
81
+ location7 << location9
82
+ n+=4
83
+ end
84
+
85
+ result = ""
86
+ location7.each do |bin|
87
+ result = result + bin.to_i(2).to_s(16)
88
+ end
89
+ result
90
90
  end
91
91
 
92
92
  def download
@@ -1,3 +1,3 @@
1
1
  module Cherrypicker
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: cherrypicker
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.1
5
+ version: 0.3.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Karl Entwistle
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-21 00:00:00 +01:00
13
+ date: 2011-04-22 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency