Skip to content

Instantly share code, notes, and snippets.

View cyc0der's full-sized avatar
😷
I may be slow to respond.

Kourosh Raoufi cyc0der

😷
I may be slow to respond.
View GitHub Profile
@cyc0der
cyc0der / test asdas dasd asd234234 cadqwe
Last active August 23, 2024 22:17
test asdas dasd asd234234 cadqwe
asdasdasdasd
@cyc0der
cyc0der / speech-downloader.php
Created July 22, 2015 05:17
download word speech from google translate
<form method="post" action="">
word : <input type="text" name="word" value="hello" /> <br/>
folder : <input type="text" name="folder" value="word_speech" /> <br/>
<input type="submit" name="Download" value="Download" /> <br /> <br />
</form>
<?php
if(isset($_POST[Download])) {
$content = file_get_contents('http://translate.google.com/translate_tts?tl=en&q=' . urlencode($_POST['word']));
@cyc0der
cyc0der / PUT_fsockopen.php
Created November 7, 2013 20:48
This script is an example of posting multiple files using (PUT method) fsockopen. The tricky part is making sure the HTTP headers and file boundaries are acceptable to the target webserver. This script is for example purposes only and could/should be improved upon.
<?php
$host='targethost';
$port=80;
$path='/test/socket/file_upload/receive_files.php';
// the file you want to upload
$file_array[0] = "dingoboy.gif"; // the file
$file_array[1] = "dingoboy2.gif"; // the file
@cyc0der
cyc0der / password_hasher.php
Created November 7, 2013 20:47
a secure algoritm for hash passwords
<?php
function hasher($string){
$hash = hash('sha384', 'kw-8u2j8746&$%@)+sk/'.$string.'16seg)#%(nasf');
$hash .= hash('sha512', 'ogw00`97gt644q*93jas'.$string.'14:JFH*#%,,.t');
$hash .= hash('haval256,5', '464f(^%q3`580F444)h)_'.$hash.'GFYT&QWrml%f%@');
$hash .= hash('crc32b', '19(@#]$)&[)^$~d143Y%)'.$hash.'^#%%&(*%^(##3^');
$hash .= hash('crc32b', '19(@#$){p&)^$$fd143Y%'.$hash.'hghfaf(T)4%53^');
$hash .= hash('sha512', 'ogw00`97gt644q*93jas'.$string.'14:JFH*#%,,.t');
$hash .= hash('crc32b', '19(@#$G#dgh5$$fd143Y%'.$hash.'hghfaf(T)y#53^');
@cyc0der
cyc0der / antiXSS.php
Created November 7, 2013 20:46
PHP anti XSS for MySQL queries
<?php
function db_query($db_string, $file=null, $line=null)
{
// One more query....
$db_count = !isset($db_count) ? 1 : $db_count + 1;
$clean = '';
$old_pos = 0;