Let's implement a simple code that loads a file into a vector and then save the vector with following functions:
- err
- load
- save
- main
Lets identify the typical way in C++ to print to stdout with the operator "<<"
The basic_ostream is initialized writing the word "error" to the cout, and then the operator<< again to add the endl.
The Main function simply calls "vec = load(filename)" but the compiler modified it and passed the vector pointer as a parĂ¡meter. Then it bulds and prints "loaded " << size << " users".
And finally saves the vector to /tmp/pwd and print "saved".
Most of the mess is basically the operator "<<" to concat and print values.
Also note that the vectors and strings are automatically deallocated when exit the function.
And here is the code:
Let's take a look to the load function, which iterates the ifs.getline() and push to the vector.
First of all there is a mess on the function definition, __return_storage_ptr is the vector.
the ifstream object ifs is initialized as a basic_ifstream and then operator! checks if it wasn't possible to open the file and in that case calls err()
We see the memset and a loop, getline read a cstr like line from the file, and then is converted to a string before pushing it to the vector. lVar1 is the stack canary value.
The function save is a bit more tricky, but it's no more than a vector iteration and ofs writing.
Looping a simple "for (auto s : *vec)" in the decompiler is quite dense, but we can see clearly two write, the second write DAT_0010400b is a "\n"
More articles
- Hacker Tools For Ios
- How To Hack
- Wifi Hacker Tools For Windows
- Pentest Recon Tools
- Hacker Tools Apk Download
- Game Hacking
- Hacking Tools Pc
- Hacking Tools Kit
- Pentest Box Tools Download
- Tools For Hacker
- New Hack Tools
- Best Hacking Tools 2020
- Hacking Tools For Windows
- Hacking Tools For Kali Linux
- Hacker Tools
- Hacking Tools Windows 10
- Computer Hacker
- Hacking Tools Free Download
- Pentest Tools Subdomain
- Easy Hack Tools
- What Are Hacking Tools
- Pentest Automation Tools
- Github Hacking Tools
- Hacking Tools Pc
- Hacking Tools And Software
- Hacking Tools For Games
- Pentest Tools For Android
- Hacking Tools Mac
- How To Hack
- Pentest Tools Url Fuzzer
- Hacking Tools Kit
- Hacking Tools For Kali Linux
- Black Hat Hacker Tools
- Hacker Tools For Pc
- Wifi Hacker Tools For Windows
- What Is Hacking Tools
- Top Pentest Tools
- Pentest Tools Linux
- Pentest Tools Bluekeep
- Hacking Tools Github
- Pentest Tools Url Fuzzer
- Tools Used For Hacking
- Easy Hack Tools
- Hack Tools For Windows
- Hacker Tools Linux
- Hacking Tools Mac
- Hacking Tools Kit
- Hack Tools Mac
- Black Hat Hacker Tools
- Black Hat Hacker Tools
- Pentest Tools Find Subdomains
- Pentest Tools Android
- Tools 4 Hack
- Easy Hack Tools
- Hacker Tools For Pc
- Hacking Tools Software
- Hacker Tools For Ios
- Pentest Tools Download
- Hacking Tools Pc
- Pentest Tools Port Scanner
- Hack Tools
- Hacking Tools For Beginners
- Nsa Hack Tools Download
- Hak5 Tools
- Hacker
- Computer Hacker
- Pentest Tools Port Scanner
- Hack Tools For Ubuntu
- Hacker Tools For Windows
- Hak5 Tools
- Hacking Apps
- Pentest Tools Alternative
- Pentest Tools
- Game Hacking
- Underground Hacker Sites
- Hacking Tools
- Pentest Tools Nmap
- Pentest Tools Github
- New Hacker Tools
- Hacking Tools For Mac
- Hacking Tools For Games
- Hack Tools For Windows
- Game Hacking
- New Hacker Tools
- Tools Used For Hacking
- Hacking Tools For Games
- What Is Hacking Tools
- Hack Tools Pc
- Wifi Hacker Tools For Windows
- Beginner Hacker Tools
- Pentest Tools Nmap
- Hack Tools
- Hacking Tools Mac
- Android Hack Tools Github
- Hacker Tools Apk Download
- New Hack Tools
- Pentest Box Tools Download
- Bluetooth Hacking Tools Kali
- Hacker Tools List
- Pentest Tools Kali Linux
- Pentest Tools Free
- Nsa Hack Tools Download
- Tools 4 Hack
- Computer Hacker
- Usb Pentest Tools
- Hacking Tools For Pc
- Hack Tool Apk
- Hacking Tools For Windows Free Download
- Best Pentesting Tools 2018
- Pentest Tools For Android
- How To Hack
- Hacking Tools Hardware
- Hack Tools For Mac
- Hack Tools
- Hacking Tools 2020
- Hacking Tools For Games
- World No 1 Hacker Software
- Hack Tools Online
- Hacking Tools Windows
- Pentest Tools Framework
- Hacking Tools Github
- Pentest Tools For Mac
- Game Hacking
- Kik Hack Tools
- Hacker Tools Linux
- New Hack Tools
- Wifi Hacker Tools For Windows
- Pentest Tools Subdomain
- Hacker Tools Linux
- How To Hack
- Hacking Tools Github
- Pentest Tools For Android
- Hacking Tools For Games
- Pentest Tools For Ubuntu
- Pentest Tools Online
- Hacking Tools For Windows Free Download
- Pentest Automation Tools
- Hacking Tools For Windows 7
- Hacking Tools Windows 10
- Hacker Tools Apk
- New Hacker Tools
- Pentest Box Tools Download
- What Is Hacking Tools
- Growth Hacker Tools
- Pentest Automation Tools
- Hacker Tools List
- Hacking Tools And Software
- Pentest Tools Review
- Hack Tools For Games
- Hacker Tools Free
- Pentest Tools Website Vulnerability
- Pentest Tools Android
- Pentest Tools Port Scanner
- Best Hacking Tools 2019
- Pentest Tools Framework
- Pentest Tools Website Vulnerability
- Best Pentesting Tools 2018
- Hacking Tools Kit
- How To Make Hacking Tools
- Hacking Tools Kit
- Hacker Tools For Windows
- Pentest Reporting Tools
- Hacker Tools For Ios
- Hacking Tools For Windows 7
- Hacker Tools For Ios
- Pentest Tools Url Fuzzer
- How To Hack
- Hacking Tools Github
- Hacking Tools Windows 10
- Hacking Tools Github
- Hacker Tools Github
- Hacker Tools Apk
- Hacking Tools For Mac
- Nsa Hacker Tools
- Hacker Search Tools
- Pentest Tools Bluekeep
- Hacker Tools 2020
- Hack Tool Apk
No comments:
Post a Comment