elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Sigue las noticias más importantes de seguridad informática en el Twitter! de elhacker.NET


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [RUBY] GameTracker ServerList
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [RUBY] GameTracker ServerList  (Leído 7,151 veces)
Eleкtro
Ex-Staff
*
Desconectado Desconectado

Mensajes: 9.810



Ver Perfil
[RUBY] GameTracker ServerList
« en: 13 Noviembre 2012, 16:42 pm »

  

  GameTracker Server List
  By Elektro H@cker


La idea de Doddy me ha inspirado para crear este script el cual se puede usar por línea de comandos o de forma preconfigurada.
Referencia de la idea de Doddy:  [Perl] Counter Strike 1.6 Servers List








  • Sintaxis::

Código:
GTSL.rb help
(Muestra los valores de "games" y "locations".)

Código:
GTSL.rb (game) (location) (archivo)
(Obtiene todos los servidores del juego "game" del país "location" y los guarda en el archivo "archivo")

O cambiar los dos valores por defecto del script, "game" y "location".


  • Ejemplos de uso
:
Código:
GTSL.rb cs es
(Obtiene todos los servidores españoles del Counter-Strike 1.6 y los guarda en el archivo por defecto "cs-ES servers.txt")

Código:
GTSL.rb cs uk "servidores UK.txt"
(Obtiene todos los servidores ingleses del Counter-Strike 1.6 y los guarda en el archivo "servidores UK.txt")





  •  Game values

  alienswarm    = Alien Swarm
  aa    = America's Army 2.0
  aa3   = America's Army 3
  arma2 = ARMA 2
  arma  = ArmA Armed Assault
  bf1942        = Battlefield 1942
  bf2   = Battlefield 2
  bf2142        = Battlefield 2142
  bf3   = Battlefield 3
  bc2   = Battlefield Bad Company 2
  bfv   = Battlefield Vietnam
  brink = Brink
  cod   = Call of Duty
  cod2  = Call of Duty 2
  cod4  = Call of Duty 4
  blackops      = Call of Duty : Black Ops
  mw3   = Call of Duty : Modern Warfare 3
  uo    = Call of Duty United Offensive
  codww = Call of Duty World at War
  cs    = Counter Strike 1.6
  csgo  = Counter Strike Global Offensive
  css   = Counter Strike Source
  czero = Counter-Strike Condition Zero
  crysis        = Crysis
  crysis2       = Crysis 2
  warhead       = Crysis Wars
  rordh = Darkest Hour
  dod   = Day of Defeat
  dods  = Day of Defeat Source
  dayz  = DayZ
  doom3 = Doom 3
  etqw  = Enemy Territory Quake Wars
  fear  = F.E.A.R.
  ff    = Fortress Forever
  ffow  = Frontlines Fuel of War
  garrysmod     = Garry's Mod
  hl    = Half Life 1
  hl2dm = Half-Life 2 Deathmatch
  halo  = Halo
  homefront     = Homefront
  ins   = Insurgency
  killingfloor  = Killing Floor
  l4d   = Left 4 Dead
  left4dead2    = Left 4 Dead 2
  moh   = Medal of Honor
  mohaa = Medal of Honor Allied Assault
  bt    = Medal of Honor Breakthrough
  sh    = Medal of Honor Spearhead
  mohw  = Medal of Honor Warfighter
  minecraft     = Minecraft
  mnc   = Monday Night Combat
  mumble        = Mumble
  hlns  = Natural Selection
  qw    = Quake 1 (Quake World)
  q2    = Quake 2
  q3    = Quake 3
  q4    = Quake 4
  ravaged       = Ravaged
  ro2   = Red Orchestra 2
  ror   = Red Orchestra Ostfront 41-45
  s8prejudicepc = Section 8 Prejudice
  s8prejudice   = Section 8 Prejudice (xbox)
  sniperelite2  = Sniper Elite V2
  sof2  = Soldier of Fortune II
  swbf2 = Star Wars Battlefront 2
  swjk  = Star Wars Jedi Knight
  swat4 = SWAT 4
  tf2   = Team Fortress 2
  tfc   = Team Fortress Classic 1.6
  teamspeak     = TeamSpeak
  ts3   = TeamSpeak 3
  ut    = Unreal Tournament
  ut2k4 = Unreal Tournament 2004
  ut3   = Unreal Tournament 3
  urbanterror   = Urban Terror
  ventrilo      = Ventrilo
  et    = Wolfenstein Enemy Territory
  wolf  = Wolfenstein PC
  hl2zp = Zombie Panic! Source



  •  Location values

  AF = Afghanistan
  AX = Aland Islands
  AL = Albania
  DZ = Algeria
  AS = American Samoa
  AD = Andorra
  AO = Angola
  AI = Anguilla
  A1 = Anonymous Proxy
  AG = Antigua and Barbuda
  AR = Argentina
  AM = Armenia
  AW = Aruba
  AU = Australia
  AT = Austria
  AZ = Azerbaijan
  BS = Bahamas
  BH = Bahrain
  BD = Bangladesh
  BB = Barbados
  BY = Belarus
  BE = Belgium
  BZ = Belize
  BJ = Benin
  BM = Bermuda
  BT = Bhutan
  BO = Bolivia
  BA = Bosnia and Herzegovina
  BW = Botswana
  BV = Bouvet Island
  BR = Brazil
  IO = British Indian Ocean Territory
  BN = Brunei Darussalam
  BG = Bulgaria
  BF = Burkina Faso
  BI = Burundi
  KH = Cambodia
  CM = Cameroon
  CA = Canada
  CV = Cape Verde
  KY = Cayman Islands
  CF = Central African Republic
  TD = Chad
  CL = Chile
  CN = China
  CX = Christmas Island
  CC = Cocos (Keeling) Islands
  CO = Colombia
  KM = Comoros
  CG = Congo
  CD = Congo, The Democratic Republic of the
  CK = Cook Islands
  CR = Costa Rica
  CI = Cote D'Ivoire
  HR = Croatia
  CU = Cuba
  CY = Cyprus
  CZ = Czech Republic
  DK = Denmark
  DJ = Djibouti
  DM = Dominica
  DO = Dominican Republic
  EC = Ecuador
  EG = Egypt
  SV = El Salvador
  GQ = Equatorial Guinea
  ER = Eritrea
  EE = Estonia
  ET = Ethiopia
  FK = Falkland Islands (Malvinas)
  FO = Faroe Islands
  FJ = Fiji
  FI = Finland
  FR = France
  GF = French Guiana
  PF = French Polynesia
  TF = French Southern Territories
  GA = Gabon
  GM = Gambia
  GE = Georgia
  DE = Germany
  GH = Ghana
  GI = Gibraltar
  GR = Greece
  GL = Greenland
  GD = Grenada
  GP = Guadeloupe
  GU = Guam
  GT = Guatemala
  GG = Guernsey
  GN = Guinea
  GW = Guinea-Bissau
  GY = Guyana
  HT = Haiti
  HM = Heard Island And Mcdonald Islands
  VA = Holy See (Vatican City State)
  HN = Honduras
  HK = Hong Kong
  HU = Hungary
  IS = Iceland
  IN = India
  ID = Indonesia
  IR = Iran, Islamic Republic of
  IQ = Iraq
  IE = Ireland
  IM = Isle Of Man
  IL = Israel
  IT = Italy
  JM = Jamaica
  JP = Japan
  JE = Jersey
  JO = Jordan
  KZ = Kazakhstan
  que = Kenya
  KI = Kiribati
  KP = Korea, Democratic People's Republic of
  KR = Korea, Republic of
  KW = Kuwait
  KG = Kyrgyzstan
  LA = Lao People's Democratic Republic
  LV = Latvia
  LB = Lebanon
  LS = Lesotho
  LR = Liberia
  LY = Libya
  LI = Liechtenstein
  LT = Lithuania
  LU = Luxembourg
  MO = Macao
  MK = Macedonia
  MG = Madagascar
  MW = Malawi
  MY = Malaysia
  MV = Maldives
  ML = Mali
  MT = Malta
  MH = Marshall Islands
  MQ = Martinique
  MR = Mauritania
  MU = Mauritius
  YT = Mayotte
  MX = Mexico
  FM = Micronesia, Federated States of
  MD = Moldova, Republic of
  MC = Monaco
  MN = Mongolia
  ME = Montenegro
  MS = Montserrat
  MA = Morocco
  MZ = Mozambique
  MM = Myanmar
  NA = Namibia
  NR = Nauru
  NP = Nepal
  NL = Netherlands
  AN = Netherlands Antilles
  NC = New Caledonia
  NZ = New Zealand
  NI = Nicaragua
  NE = Niger
  NG = Nigeria
  NU = Niue
  NF = Norfolk Island
  MP = Northern Mariana Islands
  NO = Norway
  A0 = Not Found
  OM = Oman
  PK = Pakistan
  PW = Palau
  PS = Palestinian Territory, Occupied
  PA = Panama
  PG = Papua New Guinea
  PY = Paraguay
  PE = Peru
  PH = Philippines
  PN = Pitcairn
  PL = Poland
  PT = Portugal
  PR = Puerto Rico
  QA = Qatar
  RE = Reunion
  RO = Romania
  RU = Russian Federation
  RW = Rwanda
  BL = Saint Barthelemy
  SH = Saint Helena
  KN = Saint Kitts and Nevis
  LC = Saint Lucia
  MF = Saint Martin
  PM = Saint Pierre and Miquelon
  VC = Saint Vincent and the Grenadines
  WS = Samoa
  SM = San Marino
  ST = Sao Tome and Principe
  A2 = Satellite Provider
  SA = Saudi Arabia
  SN = Senegal
  RS = Serbia
  SC = Seychelles
  SL = Sierra Leone
  SG = Singapore
  SK = Slovakia
  SI = Slovenia
  SB = Solomon Islands
  SO = Somalia
  ZA = South Africa
  GS = South Georgia and the South Sandwich Islands
  ES = Spain
  LK = Sri Lanka
  SD = Sudan
  SR = Suriname
  SJ = Svalbard and Jan Mayen
  SZ = Swaziland
  SE = Sweden
  CH = Switzerland
  SY = Syrian Arab Republic
  TW = Taiwan, Province of China
  TJ = Tajikistan
  TZ = Tanzania, United Republic of
  TH = Thailand
  TL = Timor-Leste
  TG = Togo
  TK = Tokelau
  TO = Tonga
  TT = Trinidad and Tobago
  TN = Tunisia
  TR = Turkey
  TM = Turkmenistan
  TC = Turks and Caicos Islands
  TV = Tuvalu
  UG = Uganda
  UA = Ukraine
  AE = United Arab Emirates
  GB = United Kingdom
  US = United States
  UM = United States Minor Outlying Islands
  UY = Uruguay
  UZ = Uzbekistan
  VU = Vanuatu
  VE = Venezuela
  VN = Viet Nam
  VG = Virgin Islands, British
  VI = Virgin Islands, U.S.
  WF = Wallis and Futuna
  EH = Western Sahara
  YE = Yemen
  ZM = Zambia
  ZW = Zimbabwe




Executable: http://exoshare.com/download.php?uid=MHXEVOZYO bsoleto, el nuevo executable está en el comentario de abajo...


GTSL.rb Obsoleto, el nuevo código está en el comentario de abajo...


Saludos


« Última modificación: 29 Noviembre 2012, 12:32 pm por EleKtro H@cker » En línea

Eleкtro
Ex-Staff
*
Desconectado Desconectado

Mensajes: 9.810



Ver Perfil
Re: [RUBY] GameTracker ServerList
« Respuesta #1 en: 29 Noviembre 2012, 12:28 pm »

GameTracker ha cambiado el sistema de búsqueda y ha aumentado un poco la seguridad (Ahora la localización del país es "Case-Sensitive"), así que la versión anterior queda obsoleta, he hecho una nueva versión.

Y como extra, la tool ahora genera un archivo de favoritos para reemplazar el archivo dentro de la carpeta del juego y no tener que ir metiendo las ips dentro del juego:

Ejemplo:

serverbrowser_hist.vdf
Código:
"Filters"
{
"favorites"
{
"1"
{
"name" "89.44.246.123:27015"
"address" "89.44.246.123:27015"
"lastplayed" "1256267351"
"appID" "0"
}
"2"
{
"name" "89.44.246.14:27015"
"address" "89.44.246.14:27015"
"lastplayed" "1256267351"
"appID" "0"

etc.
etc..
etc...


Executable: http://exoshare.com/download.php?uid=QNKEUJXB


GTSL.rb:
Código
  1.  
  2. # GameTracker ServerList v1.2
  3. #
  4. # By Elektro H@cker
  5.  
  6.  
  7. # Description:
  8. # -----------
  9. # This tool retreives the servers list of a game from GameTracker site,
  10. # and generates a favorite gameserver steam list.
  11.  
  12.  
  13. # How to use:
  14. # ----------
  15. #
  16. # GTSL.rb help
  17. #
  18. # GTSL.rb (game) (location) (output file)
  19. #
  20. # Or change the default values...
  21. #
  22. # Default values:
  23. $game     = "cs"
  24. $location = "ES"
  25. # # # # # # # #
  26.  
  27. require 'net/http'
  28.  
  29. exit if Object.const_defined?(:Ocra)
  30.  
  31. $url = "http://www.gametracker.com/search/#{$game}/#{$location.upcase}/?searchipp=50&searchpge=1#search"
  32.  
  33. def logo()
  34. puts '
  35.  GameTracker Server List
  36.  
  37.  By Elektro H@cker
  38. '
  39. end
  40.  
  41.  
  42. def help()
  43.  
  44.  puts '
  45.  
  46.  Options:
  47.  _______
  48.  
  49.  /? (or) help (or) -h (or) -help | Shows this help.
  50.  
  51.  
  52.  Parameters:
  53.  __________        
  54.  
  55.  (game)      | The game kind.
  56.  
  57.  (locacion)  | The geo-location of servers.
  58.  
  59.  (file)      | The output file.  
  60.  
  61.  
  62.  How to use:
  63.  __________
  64.  
  65.  GTSL.rb -help
  66.  
  67.  GTSL.rb (game) (location) (output file)
  68.  
  69.  PS: Or change the two default values near the start line inside the script...
  70.  
  71.  
  72.  Examples:
  73.  ________
  74.  
  75.  GTSL CS UK
  76.  [+] Gets all the UK servers for Counter-Strike 1.6
  77.      and save it in the default generated file.
  78.  
  79.  
  80.  GTSL HL ES "servers.txt"
  81.  [+] Gets all the Spanish servers for Half-life
  82.      and save it in the custom file ("servers.txt").
  83.  '
  84.  
  85.  # game value list
  86.  puts "\n
  87.  Game values:
  88.  ___________\n"
  89.  puts Net::HTTP.get_response(URI.parse($url)).body.split('<option value="_all">All Games</option>').last.split('</select>').first.gsub('<option value="', "").gsub('</option>', "").gsub(' selected="selected"', "").gsub('" >', " = ").gsub(" ", "  ")
  90.  
  91.  # location value list
  92.  puts "\n
  93.  Location values:
  94.  _______________\n"
  95.  puts Net::HTTP.get_response(URI.parse($url)).body.split('<optgroup label="Search by country">').last.split('</optgroup>').first.gsub('<option value="', "").gsub('</option>', "").gsub(' selected', "").gsub('" >', " = ").gsub(" ", "  ")
  96.  
  97.  exit
  98.  
  99. end
  100.  
  101.  
  102. def args()
  103.  if ARGV[0] =~ /help/i or ARGV[0] =~ /-help/i or ARGV[0] =~ /-h/i or ARGV[0] == "/?" then help()    end
  104.  if not ARGV[0].nil?   then $game     = ARGV[0] end
  105.  if not ARGV[1].nil?   then $location = ARGV[1] end
  106.  if not ARGV[2].nil?   then $file     = ARGV[2] else $file = ".\\#{$game}-#{$location.upcase} servers.txt" end
  107. end
  108.  
  109.  
  110. def info()
  111.  puts "
  112.  Game    : #{$game}
  113.  Location: #{$location.upcase}
  114.  Pages   : #{$pag}
  115.  Servers : #{$pag*50} (approx.)
  116.  
  117.  "
  118. end
  119.  
  120.  
  121. def get_pages()
  122.  $pag = 0
  123.  $url = "http://www.gametracker.com/search/#{$game}/#{$location.upcase}/?searchipp=50&searchpge=1&sort=c_name&order=ASC"
  124.  Net::HTTP.get_response(URI.parse($url)).body.each_line do |line|
  125.    if (line[/;order=ASC#search">NEXT<\/a>/]) then break  end
  126.    if (line[/^\s+<a href="\/search\/.+\/.+\/?searchipp=50&amp;searchpge=[0-9]+&amp;sort=c_name&amp;order=ASC#search">[0-9]+<\/a>\s+$/])
  127.      if $pag < line.split("</a>").first.split('>').last.to_i
  128.         $pag = line.split("</a>").first.split('>').last.to_i
  129.      end
  130.    end
  131.  end
  132. end
  133.  
  134.  
  135. def show_ips()
  136.  a = 0
  137.  
  138.  print "[+] Parsing pages "
  139.  
  140.  File.open('serverbrowser_hist.vdf', 'a+') do |favorites|
  141.    favorites.puts '"Filters"'
  142.    favorites.puts '{'
  143.    favorites.puts '"favorites"'
  144.    favorites.puts '{'
  145.  end
  146.  
  147.  for i in 1..$pag do
  148.    print "#{i}/#{$pag}..."
  149.    $url = "http://www.gametracker.com/search/#{$game}/#{$location.upcase}/?searchipp=50&searchpge=#{i}#search"
  150.    Net::HTTP.get_response(URI.parse($url)).body.each_line do |line|
  151.  
  152.      # puts line.split("/")[2] if (line["server_info"])
  153.  
  154.      File.open($file, 'a+') do |f|
  155.        f.puts line.split("/")[2] if (line["server_info"])
  156.      end
  157.  
  158.      File.open('serverbrowser_hist.vdf', 'a+') do |favorites|
  159.        a = a+1 if (line["server_info"])
  160.        favorites.puts "\"#{a}\""                              if (line["server_info"])
  161.        favorites.puts "{"                                     if (line["server_info"])
  162.        favorites.puts "\"name\" \"#{line.split("/")[2]}\""    if (line["server_info"])
  163.        favorites.puts "\"address\" \"#{line.split("/")[2]}\"" if (line["server_info"])
  164.        favorites.puts "\"lastplayed\" \"1256267351\""         if (line["server_info"])
  165.        favorites.puts "\"appID\" \"0\""                       if (line["server_info"])
  166.        favorites.puts "}"                                     if (line["server_info"])
  167.      end
  168.  
  169.    end
  170.  end
  171.  
  172.  File.open('serverbrowser_hist.vdf', 'a+') do |favorites|
  173.    favorites.puts '}'
  174.    favorites.puts '"History"'
  175.    favorites.puts '{'
  176.    favorites.puts '}'
  177.    favorites.puts '}'
  178.  end
  179.  
  180. end
  181.  
  182.  
  183. logo()
  184. args()
  185. get_pages()
  186. info()
  187. show_ips()
  188.  
  189.  
  190. exit


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
ruby vs perl ??
Scripting
vacio 3 4,221 Último mensaje 26 Julio 2006, 17:32 pm
por vacio
Ruby
Programación General
¡Micronet! 2 3,110 Último mensaje 18 Octubre 2010, 22:49 pm
por ¡Micronet!
[Ruby] IRC Bot
Scripting
BigBear 0 2,284 Último mensaje 7 Octubre 2011, 01:30 am
por BigBear
[SOURCE] GameTracker Server List 1.0
.NET (C#, VB.NET, ASP)
Eleкtro 0 1,793 Último mensaje 4 Enero 2015, 12:38 pm
por Eleкtro
[Source] Gametracker API
.NET (C#, VB.NET, ASP)
**Aincrad** 5 3,795 Último mensaje 7 Diciembre 2022, 00:13 am
por Danielㅤ
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines