PHP Base64_Encode – Intentionally screwing up pictures

A screwed up base64 image.  Replaced all of the 'da' with 'ha'
A screwed up base64 image. Replaced all of the 'da' with 'ha'

So, I was a little bored so I made some PHP code.

This is what it does:

  • Takes query string values
  • Pulls an image from the web
  • base64_encodes it.
  • Distorts the image.
  • Replaces some of the base64 string data with other string data.
  • Outputs the image in an img tag.

Hope this helps someone, let me know if it does IN THE COMMENTS

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
	if ((isset($_GET['i']))&&(isset($_GET['f']))&&(isset($_GET['r'])))
	{
		$find = $_GET['f'];
		$replace = $_GET['r'];
		$type = "gif";
		print_r($_GET);
 
		if (isset($_GET['t']))
		{
			$type = $_GET['t'];
		}
		$imgfile = $_GET['i'];
		$contents = implode (file($imgfile));
		$start = base64_encode($contents);
 
 
		$start = str_ireplace($find, $replace, $start);
 
	echo '<img src="data:image/'.$type.';base64,' . $start . '" />';
	}
	else
	{
	?>
		Try: <a href='base64.php?i=http://ec.europa.eu/culture/media/programme/images/logos/02/02.gif17.gif&f=lo&r=ha&t=gif'>http://ec.europa.eu/culture/media/programme/images/logos/02/02.gif17.gif&f=lo&re=ha&t=gif</a>
	<?php
	}
 
?>

IPMap Python Ip Address Locator Command Line Script

ipmap python ip location geocode

This program uses this site IpMap to get peoples location based off of their IP address.

It’s written in python. Enjoy.

Download SourceGPLv3 Code. Give back.
Usage:
python ipmap.py 74.125.45.100 all
python ipmap.py 74.125.45.100
python ipmap.py (This will get you the help screen)

Args:
all = Prints all details
nomap = Gets All, no map
loc = Gets: Country, Region, City
Continue reading “IPMap Python Ip Address Locator Command Line Script”

DiS – Darkness is Spreading

dis - darkness is spreading

I coded this puzzle game that I now have hosted on Sourceforge here:
http://dis-game.sourceforge.net

It’s written in PHP and it is based off the game Flood-it. It takes the general principle and changes it some.

The levels are easily made and can be added pretty easily too.

I’d like to make a level editor, but that is defiantly for a later release.

Here is the plan:
-Make it look better
-Add Score
-Add Level Editor

Python Torrent Search and Download (TPB)

This python command line utility will search the pirate bay for a specific search string and pull out the torrent files and download them to your current directory.

by: Daniel Folkes

This is Licensed under GPLv3. Give Back.

tpb.jpg

    Download Source

  1. print “””Pirate Bay Torrent Downloader – Command Line Interface
  2. Program Written by: Daniel Folkes
  3. website: http://danfolkes.com
  4. email: danfolkes @t gmail dot c0m
    Continue reading “Python Torrent Search and Download (TPB)”

Colbert Report – Persian Gulf – Secret Code

colbert-lockwood

Beginning Credits:
346x
On J. J. Abrams Coffee Cup:
433u
On a Audience Member.
283H – thx john.

Those might be Longitude and Latitude, so, and you get somewhere north of Baghdad:
http://maps.google.com/maps?ie=UTF8&ll=34.6,43.3&spn=10.735985,23.291016&z=7

If you flip the numbers, you get the Black Sea, above Turkey.
http://maps.google.com/maps?ie=UTF8&ll=43.3,34.6&spn=10.735985,23.291016&z=7

I guess we will see if I am correct.