Youflood

From Encyclopedia Dramatica
Jump to: navigation, search


YouFlood[edit]

This tool was created in order to have an actual, decent program which ups page views on a YouTube video. It does this using perl, with curl doing the http grunt-work.

Youtube Dox[edit]

As of August 12, 2009, Youtube increases number of hits for a video by one everytime the flash object is loaded. The hard bit is finding a single token hash which identifies your computer (I think). A new one is assigned every time you reload the page. The problem with finding it is that the embedded object is created with javascript, and all the javascript on youtube is obfuscated to a ridiculous degree. Seriously, don't fucking look at the base-something-something.js file, it's a fucking wall of text. But that's neither here nor there, since the token (the variable $yummy in the script) is found on the actual page. Just view the source, then ctrl-f "swfArgs", it's in there as the value 't'. Anyway, with this token we can pretend we're the flash object, letting the server know that the page is getting visited.

Youtube (Google) has multiple servers all over in what's called a "cloud". If you do a dns lookup for www.youtube.com you'll get back something like five different servers. This was a problem in the original version of Youflood, since the two curl calls would often go to two different servers, when the needed to go to the same one. This is why the program currently uses host to find the ip and then chooses randomly. If anyone knows of a better way to do DNS lookup that could possibly go through tor (SOCKS), feel free to add it. It would be great if the modification didn't need to use any obscure perl modules as well.

Youtube appears to have some kind of video-page-view locking mechanism if it detects a flood from a single ip address. Youflood can use tor, which works about 3 time slower (depending on the node), but the ip gets changed every ten minutes or something like that, so it ought to circumvent this to some degree. Just use the -t option. Even without tor, there is a random wait in between each request, which will hopefully throw off the locking mechanism.

Source (Last updated August 12, 2009)[edit]

The script has a random wait in between each request, mostly to prevent flags getting raised at jewtube headquarters. Here is the source:

#!/usr/bin/perl

my $tor = '';
my @dns;

#Creates a list of ip addresses which can be used. Does it pretty sexily too, I think
#This is also the part which leaks like a motherfucker. It does not and can not go through tor
#This part also assumes that you have the host program.
foreach (`host www.youtube.com`) {
	push(@dns,$1) if /([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/;
}

#Usage
if (!@ARGV) {
	print "\n USAGE: youflood [-t] <URL>\n\n<URL>: Full, clean url of the youtube video (including http://)\n\tShould look like this: http://www.youtube.com/watch?v=cofkDkdAiUy\n-t: Use tor (localhost:9050)\n\n";
	exit;
}

elsif (@ARGV == 2) {
	$tor = '--socks4a localhost:9050 ';
}

my $url = $ARGV[-1]; #Get URL from parameters
(my $video_id) = $url =~ /http:\/\/www\.youtube\.com\/watch\?v=(.+)$/; #Extract video's id


for (my $i = 1; 1; $i++) { #Begin infinite loop

	print "===== $i\n";

	my $rand_dns = int(rand(@dns)); #We don't want to be using the same server each time, now do we?
	
	my $yummy = getYummy($rand_dns); #Get the yummy token variable.
	print "t='$yummy'\n";

	sendYummy($rand_dns);
	
	#Generate random integer for pause
	my $rand = int(rand(8));
	print "pausing $rand seconds\n";
	sleep($rand);
}

#This sub-procedure gets the hash-token-whateverthefuckitis
sub getYummy {
	print "Retrieving t (whatever that is)...";
	my $page = `curl $tor-A 'Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)' -H "Host: www.youtube.com" http://$dns[$_[0]]/watch?v=$video_id 2>/dev/null`; #Gets youtube page 
	$page =~ s/\n|\t//g; #Removes all newlines and tabs, I don't know that this is necessary. It doesn't hurt though

	(my $swfArgs) = $page =~ /var swfArgs = (.+?);/; #Extracts swfArgs from javascript on the page
	(my $yummy) = $swfArgs =~ /"t": "(.+?)"/; #Gets 't' value (the yummy variable) from the swfArgs

	#If something goes wrong, this will try again until it goes right
	if (!$yummy) {
		print "failed, got this instead:\n$page\nxxxxx getYummy:Trying again\n";
		$yummy = getYummy($_[0]);
	}

	return $yummy;
}

#This sub-procedure sends the actual request.
sub sendYummy {
	print "Sending video request...";
	my $response = `curl $tor-A 'Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)' -H "Host: www.youtube.com" http://$dns[$_[0]]/get_video?video_id=$video_id\\&t=$yummy\\&el=detailpage\\&ps=\\&fmt=34\\&noflv=1 2>/dev/null`; #The important part. This is what actually increases the page count.
	
	#Should recieve a blank response. Otherwise, assume something went wrong
	if ($response) {
		print "failed, got this:\n$page\nxxxxx sendYummy:Trying again\n";
		$response = sendYummy($_[0]);
	}
	print "Request sent, ";
}

Comment[edit]

Make sure you have the curl and host package installed, for example on ubuntu you should type in console

sudo apt-get install curl

These are both standard packages, so there shouldn't be any problems getting them in modern distros like Ubuntu or Fedora

Limitations[edit]

The newest version has support for tor, using the -t option. It assumes your tor is listening on localhost:9050, which is the default. Change it if necessary. The important point which needs to be made is that the tor function is not to keep you anonymous. It is simply there to trick the locking mechanism by continually changing the ip. The portion of the program using host does not go through tor, and I do not believe it can be made to go through tor. This shouldn't be a problem legally or in any other sense really (there is no law regarding upping youtube page views), but it is something to be noted.

JewTube Logo.png

Youflood is part of a series on YouTube.

[CollapseExpand]

A-BC-DE-FG-HI-JK-LM-NO-PQ-RS-TU-VW-XY-Z#

Visit the YouTube Portal

A Message From Chad and SteveA hunter shoots a bearAaronEverettLandAbsenceOfTheAbsentAddison MikkelsonAdeleADoseOfBuckleyAeverine NievesAfr0blu3Afro NinjaAgoraphobic-BlueAJcomixAkai DaliaAkaichouAkewsticRockRAleksandr PistoletovAlex Mae MuhollandAlexander4488Alexander4488/Approved ED PageAlexander4488/Director CommentaryAlexandercarneiroAlex MacRaeAlix HenriolAlphawerewolffAlyallieAmazingplatypus69Amber ButtrumAmerica's Third PartyAngelofthyNightAngry GrandpaAngry Homo KidAngry JoeAngry Video Game NerdAngryLittleGiriAniMatAnonymousNastyAnonymousThoughtAnthony 'A-Log' LoGattoAnthonytoneyAnti-Flagger Association of YouTubeAntiDisneyMovementAntoine DodsonApplemilk1988AquagirlwhitefoxArceusfan2013Ardi RizalArgent009Armake21Armoured SkepticAsalieriAshlea ClaytonASMRAstablaziaAtJap13Atheist Scum UnitedAtheneAttackofthehankAudreynolandAush0kAustin FullmerAutoplayAxelswife1Aydin PaladinAyumihamiltonB WalmerBaaaBags of MoneyBananaphoneBANGSBarefoot NatureBarmer479Bart the GeneralBattimBattle For Dream IslandBee MovieBeebee890BenthelooneyBerdBetabyteiphoneBigBadFurgyTheFoxBikerfoxBill122460Billoon45BLACKB0NDBLACKbusterCriticBlasphemy ChallengeBleedingFireWolfBloodraptorBludshot the HedgehogBlueshineWolfBlunty3000Bob RehahnBodrochowskiBodyXPoliticBoh3m3BoxxyBrandon SmithBravesgirl5BreakBrett KeaneBrian MuellerBrittany VentiBrokeTheInterwebBroncofn90BrookersBurger the Angry CatBURKBus Uncle

CaddicarusCakefartsCallumCartelCansin13CapnOAwesomeCaptainAtheistCaramelldansenCarl FiadinoCartoonjunkieCash MasterCassiusPlejarenAlienChad "Atheist Killa" ElliottChad HurleyChadwardennChancepsychChangeDaChannelCharlestrippyCharlie Bit Me - Again!Cheeseburger JoshCheetawolfChekovsgunCheryl ShumanChismahChloe DykstraChosonNinjaChrissy ChambersChris CrockerChris-chan/VideosChristianHillbillyChuggaaconroyCid SilverwingCid and Conners Excellent AdventureCircaRigelCirnoClay ClaymoreClayranger89CloudyEggsCodenamesailorearthCodenamesailorearth/2nd Wikia SagaCodenamesailorearth/2nd Wikia Saga/BlacklistCodenamesailorearth/ED SagaCodenamesailorearth/The BeginningCokeman2423Colleen ThomasCondom SnortingCooking With Jack ShowContraPointsCopperCabCorey MargeraCoughlan666Crazy GideonCrazyvideosandrantsCriss AngelCRoadwarriorCropperbCrossmackCrunkcoreCrystal ShinkleCubbyCulexorCulexor/YouTubeCuntFuckBitchCupcake DogCutechongCutiePieMarziaCwilliams1976CyanterroristDaddyOFiveDaHaloChickDamaronDamien EstreichDan144xDandCVideosDangermanDanielspengiesDarknessthecurseDarksidered992DarkspeedsDarksydePhilDarkzero63DashieGamesDavid After DentistDavid HockeyDavidsfarmDaxFlameDbootsthedivaDcigsDear SisterDeleting Your YouTube VideosDemcadDenalynnnDerek JeevesDerpaviangottDev-catscratchDigibronyDigitalSurgeonDiGiTiLsOuLDiaper BoyDie AntwoordDips Tobacco RedneckDJ KEEMSTARDLAbaoaquDog264Donnie DaviesDouble RainbowDoubleSAnimationsDownfallDr. OctogonapusDr. TranDr4g0nK1dDraconas RayneDrewtoothpasteDrinkingwithbobDrossRotzankDrp1zzaDylan KimberlinDynaCatlovesme

Sailormoonred1Sam PepperSammyClassicSonicFanSandro L JeanSanjaya/JSargon of AkkadSaturnDOSSaturnine FilmsSave AaliyahScarredFurrySchool Bus FightScott DeiCasScottHermanFitnessSegacampSerialKillaCSesshReincarnatedSeto-Kaiba.comSetsuna ToushirouShane DawsonShane LeeSharolaidShaycarlSherry ShrinerShockOfGodShocked and Appalled CatShoe0nHeadShon TerryShoobySimply OkamiSimply SaraSindragonSirius OrionisSittin On Tha ToiletSkueeSKWEEZYSleepykinqSmell Yo DickSmogon UniversitySmorekitty97SmpfilmsSnackyCakes2008SnowVhiteSokiTwopawSonadowclubSonic X BloopersSony VegasSONYFANBOYSoulbrothanumbuh3SpaghettiosSparkalloonSparkling WigglesSpax3SpeakoniaSSSniperWolfStarlaglamSteAndKelStealth CatSteve ChenStu makes chocolate pudding at 4 in the morningSuperMarioLoganSuper Planet DolanSusan BoyleSwitchiedaggerSxephilSynchtubeTabbyTablecowTaekesiTails DollTakedownmanTakeShotActionTamias the ChipmunkTammyToeTana MongeauTay ZondayTay Zonday/CRLyricsTechaTedjesuschristgodTeenage Tourettes CampTehbigtoasterTerror PlaylistTh3RoyismThat Guy With The GlassesThatKidDouglasThatkidparkerThdrksideThe Annoying OrangeThe Barney BunchThe CaseyThe DickridersThe Domino's YouTube IncidentThe Failkips Strikes BackThe Fine BrosThe Florida Tweenie RapistsThe Harlan ShowThe Kewl KidsThe Incredible Flying Broomstick GuyThe MoleThe Mulberry EightThe NutshackThe Online GamerThe Rebel MediaThe Slow Mo GuysThe Spoony ExperimentThe Spoony Experiment/Spoony and FriendsThe TrashmanThe Troll HunterThe Unknown AutobotThe Young TurksTheAmazingAtheistTheArchfiendTheAtheistGamerThedramatubeTheHill88ThemaskedanalystTheMrXshowTheMysteriousMrEnterThenintendo3ds2TheQuestionMarkManThe rEactorTherealagerbonTheRedSkullTheresa ShellerTheSockDetectiveTheSuperRobotSoujaOGTheTruthHurtsNetworkThewinekoneThink B4 You SpeakThree Wolf MoonThunderf00tTime MagazineTimmygalTimmysmommy01TinaecmusicTina S.TL;DWTMossBossToby J RathjenTolstoyKafkaEvskyTom SersonTommy JordanTommy SotomayorTommypezmasterTonettaTonetta777Tony48219TonystockertToonKriticY2KTori BelliachiTotalbiscuitTourette's GuyTrevor RiegerTrey Eric SeslerTriciakittyTrickshottingTriggerfoxTrollsNewsTrollsOfTerrorTrololoTroyriserTruthfulChristianTsimFuckisTunakTurtle PunchTwilightSucksTwizidwickedletteTwiztidAshTwo Girls One FingerTyler GarmanyTyler Redick TheVeganStudent

Matrix.gif

Youflood is part of a series on Programming.

[2 L337 4 MEEnter the Matrix]