This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import math | |
def getStrings(file1): | |
"Get the string from the file" | |
with open(file1, 'r') as a: | |
b = a.readlines() | |
return (''.join(b)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
def crack(x, y): | |
"""For the length of string i, get the value of the character A=1, B=2 etc | |
Subtract this from the value of the code at the relevant position | |
Modulo 26 to remove an remainders/negatives.""" | |
result = "" | |
for i in range(len(x)): | |
result += chr((((ord(x[i].lower())) - (ord(y[i % 21].lower()))) % 26) + 97).upper() | |
return result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find -type f -execdir shred -n 25 -fuv '{}' \; | |
rm -rf *; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Written by Eliot Brown on 26th September 2012 | |
--A basic calculator that can calculate * + - / | |
--of two real numbers | |
with TEXT_IO; use TEXT_IO; | |
procedure CALCULATOR is | |
type REAL is digits 20; --20 digit numbers | |
package IO_REAL is new FLOAT_IO(REAL); use IO_REAL; | |
A, B, C: Real --Declare A, B, C are real. Note, C is the result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Function to check email validity | |
function checkEmail($email) { | |
if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) { | |
// Email invalid because wrong number of characters or @s | |
return false; | |
} | |
// Split it into sections to make shit easy | |
$email_array = explode("@", $email); | |
$local_array = explode(".", $email_array[0]); | |
for ($i = 0; $i < sizeof($local_array); $i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use feature ':5.10'; | |
while{10} { | |
$input = <>; #Creates infinite loop | |
last if $input eq "exit/n"; | |
+er; | |
open(FILE, "log.txt"); | |
print FILE $input; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
####################################################################### | |
#Basic perl script to update <lastmod> in an XML sitemap. # | |
#Works by seaching for .html files nested in <loc> and then comparing # | |
#to the file. It then inserts the date in the <lastmod> tag. # | |
# # | |
#This code is not subject to copyright and is free to use # | |
# # | |
#Eliot Brown 25/10/2011 # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Copyright (c) <2012> <Eliot Brown>. | |
All rights reserved. | |
Redistribution and use in source and binary forms are permitted | |
provided that the above copyright notice and this paragraph are | |
duplicated in all such forms and that any documentation, | |
advertising materials, and other materials related to such | |
distribution and use acknowledge that the software was developed | |
by Eliot Brown. The name of the |