Skip to content

Instantly share code, notes, and snippets.

View yazdipour's full-sized avatar
:shipit:
Noob

Shahriar yazdipour

:shipit:
Noob
View GitHub Profile
#https://github.com/chriskiehl/pyrobot
from pyrobot import Robot, Keys
Y ,A ,S ,D ,F = 410, 125, 135, 235, 335
black = (17,17,17)
robot = Robot()
print('Ready\n');robot.sleep(3);print('Go\t')
for var in range(0,1000):
robot.sleep(.05)
if robot.get_pixel(A,Y) == black:
robot.move_and_click(A,Y,button='left')
@yazdipour
yazdipour / Change SSID&Isolation of WifiRouter
Created January 8, 2017 17:27
Change SSID or Isolation of Wifi Router
import requests
url = 'http://admin:admin@192.168.1.1/wlcfg.wl?wlSsidIdx=0&wlEnbl=1&wlHide=1&wlAPIsolation=0&wlSsid=yourSSid&wlCountry=IR'
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0'}
try: requests.get(url, headers=headers)
except Exception as e:
print("except")
@yazdipour
yazdipour / Resetting Dlink DSL-2640U
Created January 8, 2017 17:35
Resetting Dlink DSL-2640U vulnerability (bypass authentication) with Python Code
<ControlTemplate TargetType="Button">
<Grid x:Name="RootGrid"
Background="{TemplateBinding Background}"
CornerRadius="100,100,100,100">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<Storyboard>
<PointerUpThemeAnimation Storyboard.TargetName="RootGrid" />
</Storyboard>
@yazdipour
yazdipour / build.py
Last active October 19, 2018 07:48
Python script crawl and Get MS-Build download links
# Download this file and put it beside this script file:
# https://channel9.msdn.com/Events/Build/2017/rss
import re
with open('rss.txt', 'r') as myfile:
data=myfile.read().replace('\n', '')
txt='';ret = re.findall(r"url=\"(\S+?)\.mp4\"",data)
for l in ret:
if '_mid' in l:
txt+=l+'.mp4\n'
f=open('link.txt', 'w')
{
"Faces": [
{
"name": "Oh well!",
"art" : "¯\\_(ツ)_/¯"
},
{
"name": "Disapproving Look",
"art": "ಠ_ಠ"
},
# pip install imageio
# then in python :
# import imageio and
# imageio.plugins.ffmpeg.download().
import moviepy.editor as mp
clip = mp.VideoFileClip("X.mp4")
# .subclip(0,20)
clip.audio.write_audiofile("Y.mp3")
@yazdipour
yazdipour / gradients_list.json
Created July 29, 2017 17:20
Gradients List
[
{
"name": "Purple Love",
"colors": ["#cc2b5e", "#753a88"]
},
{
"name": "Sexy Blue",
"colors": ["#2193b0", "#6dd5ed"]
},
{
# import Image
# f = raw_input('Image:\n')
# im = Image.open(f)
# rgb_im = im.convert('RGB')
# r, g, b = rgb_im.getpixel((x, y))
# def distance(c1, c2):
# (r1,g1,b1) = c1
# (r2,g2,b2) = c2
@yazdipour
yazdipour / open.py
Last active September 12, 2017 02:40
Use this to open list of word in dictonary
import webbrowser
mom="http://dictionary.cambridge.org/dictionary/english/"
fs="line.txt"
f=open(fs, 'r+')
lines = tuple(f)
f.close()
for l in lines:
l=l.replace('\n','').lower()
if len(l)>1:
webbrowser.open(mom+l)