Skip to content

Instantly share code, notes, and snippets.

import oauth2 as oauth
import urlparse
import time
#Kimlik dogrulama yapacagimiz linkedin adresi
authorize_url = 'https://api.linkedin.com/uas/oauth/authorize'
#Burada LinkedIn'den aldigimiz keylerimizi yaziyoruz. Bu key'leri yukaridaki linkden nasil aldigimizi yazdim.
consumer = oauth.Consumer(key="**********", secret="***********")
authToken="*********-*****-****-*******-*************"
@egcodes
egcodes / googlecmd.py
Last active December 20, 2015 01:39
Command line tool for google search
# -*- coding: utf-8 -*-
import urllib2
import sys, re, os
from google import search
#Get keywords from args
if len(sys.argv) < 3:
print "Usage:\n python googlecmd.py <keywords> <keywords> ..."
exit()
@egcodes
egcodes / orun.py
Last active March 16, 2016 12:57
run any command with ssh
import sys, getopt
import paramiko
class sshHandler:
def __init__(self, ip, userName, password):
self.ip = ip
self.userName = userName
self.password = password
self.connectHostWithSsh()
@egcodes
egcodes / MT_Banner.c
Last active May 5, 2017 17:56
print format text
#include <stdio.h>
#include <ctype.h>
int main(int argc, char *argv[]) {
char ch_code[] = {
0, 0, 0, 0, 0, 0,12,18,33,63,
33,33,62,32,62,33,33,62,30,33,
32,32,33,30,62,33,33,33,33,62,
63,32,62,32,32,63,63,32,62,32,
/*************************************/
// Program Name : Tic Tac Toe
// Version : 1.0.5
// Start : 17.06.2010
// Update : 20.01.2011
// Author : egcodes (www.egcodes.blogspot.com)
/*************************************/
#include <stdio.h>
#include <stdlib.h>
@egcodes
egcodes / getTrHackedSites.py
Last active December 29, 2015 14:09
get hacked tr(turkish) pages from zone-h.org
from BeautifulSoup import BeautifulSoup
import urllib2
from datetime import datetime
import time,os
pageNo = 1
while pageNo < 10:
print "PageNo: %d"%pageNo
page = urllib2.urlopen("http://www.zone-h.org/archive/page=%d"%pageNo, timeout=10).read()
soup = BeautifulSoup(page)
@egcodes
egcodes / autoSetBacklight.py
Created July 29, 2014 19:44
Automatic backlight control for ubuntu
import os, time
import pyscreenshot as ImageGrab
while True:
screen = ImageGrab.grab()
dark = 0
bright = 0
for i in screen.getdata():
if i[0] > 150 and i[1] > 150 and i[2] > 150:
@egcodes
egcodes / gist:dfcf310c4719a8c08b52
Created September 25, 2014 18:35
allIndexDownload.py
import urllib2
for a in range(1, 256):
for b in range(1, 256):
for c in range(1, 256):
for d in range(1, 256):
ip = "%d.%d.%d.%d"%(a,b,c,d)
buf = ""
print ip
@egcodes
egcodes / ReadFileUsingBit.py
Created October 6, 2014 10:38
Read file using bit
import array
class ReadFileUsingBit:
def __init__(self):
fileName = "file.txt"
buffer = ""
for b in self.readBitByBit(open(fileName, 'r')):
buffer += str(b)
package egcodes;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
* @author egcodes
*/