Aumentar/Disminuir Brillo de Pantalla Gateway NV59C en OpenSUSE

Buenas SLQeros, el día de hoy les traigo un comando que esta bastante bueno para manipular el brillo de la lap. En mi caso una Gateway NV59C, Porque tenia un problema con los botones de brillo ya que aunque subiera o bajara el brillo no había cambio aparente.

Bueno para poner el brillo deseado en el portátil tiene que escribir el comando.


xrandr --output LVDS1 --brightness 0.85

Donde LVDS1 es el identificador de la pantalla activa y el numero decimal es el brillo a asignar a la pantalla. Pulsan Enter y listo.


Saludos y espero que les sirva!

Saber que números tienen whatsapp

Buenas noches SQLeros espero este año nuevo tengan la dicha de realizar todas sus metas y hacer lo que les guste.

El día de hoy les comparto rápidamente un script en Python para saber los números que tienen whatsapp en su localidad.

El código es el siguiente:




Python 2.x

import urllib
import urllib2
import random
import time
url = "https://sro.whatsapp.net/client/iphone/iq.php"
post_data_dictionary = {"cd":"1", "cc":"52","me":"","u":""}
for x in range(2291010000,2291010500):
    post_data_dictionary["me"] = x
    print "Consultando Numero: %s" % (x)
    #sets the user agent header
    http_headers = {"User-Agent":"Mozilla/4.0 (compatible; MSIE 5.5;Windows NT)"}

    post_data_encoded = urllib.urlencode(post_data_dictionary)
    request_object = urllib2.Request(url, post_data_encoded, http_headers)

    response = urllib2.urlopen(request_object)
    html_string = response.read()
    if(html_string.find("<dict>")>0):
        print "%s Tiene WhatsApp" % (x)
        try:
            # This will create a new file or **overwrite an existing file**.
            f = open("whatsappNumbers.txt", "w")
            try:
                f.write("%s\n" % (x)) # Write a string to a file
            finally:
                f.close()
        except IOError:
            pass
    await = random.randrange(1,5)
    print "await %s seconds..." % (await)
    time.sleep(await)


Para Python 3.x

import urllib.request, urllib.parse, urllib.error
import urllib.request, urllib.error, urllib.parse
import random
import time
url = "https://sro.whatsapp.net/client/iphone/iq.php"
post_data_dictionary = {"cd":"1", "cc":"52","me":"","u":""}
for x in range(2351000239,2351010001):
    post_data_dictionary["me"] = x
    print("Consultando Numero: %s" % (x))
    #sets the user agent header
    http_headers = {"User-Agent":"Mozilla/4.0 (compatible; MSIE 5.5;Windows NT)"}

    post_data_encoded = urllib.parse.urlencode(post_data_dictionary)
    binary_data = post_data_encoded.encode("utf-8") 
    request_object = urllib.request.Request(url, binary_data, http_headers)

    response = urllib.request.urlopen(request_object)    
    html_string = response.read()
    if(html_string.decode().find("<dict>")>0):
        print("%s Tiene WhatsApp" % (x))
        try:
            # This will create a new file or **overwrite an existing file**.
            f = open("whatsappNumbers.txt", "a")
            try:
                f.write("%s\n" % (x)) # Write a string to a file
            finally:
                f.close()
        except IOError:
            pass
    #await = random.randrange(1,5)
    #print("await %s seconds..." % (await))
    #time.sleep(await)


¡Listo! Ya es cosa de que se pongan a jugar con los números y ver combinaciones... Como tip a los 5000 números el server de WA te bloquea... :3

¡Saludos y Feliz año 2013!