Pwn - Intro
Binary Exploitation
void vulnerableFunction(void)
{
char *pcVar1;
UserProfile *this;
AdminProfile *this_00;
ostream *poVar2;
pcVar1 = (char *)operator.new[](0x40);
this = (UserProfile *)operator.new(8);
*(undefined8 *)this = 0;
UserProfile::UserProfile(this);
this_00 = (AdminProfile *)operator.new(8);
*(undefined8 *)this_00 = 0;
AdminProfile::AdminProfile(this_00);
std::operator<<((ostream *)std::cout,"Enter your profile descri ption: ");
std::operator>>((istream *)std::cin,pcVar1);
poVar2 = std::operator<<((ostream *)std::cout,"Your profile says: ");
poVar2 = std::operator<<(poVar2,pcVar1);
std::operator<<(poVar2,"\n");
(*(code *)**(undefined8 **)this)(this,pcVar1);
if (pcVar1 != (char *)0x0) {
operator.delete[](pcVar1);
}
if (this != (UserProfile *)0x0) {
operator.delete(this,8);
}
if (this_00 != (AdminProfile *)0x0) {
operator.delete(this_00,8);
}
return;
}
Last updated