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.
In this situations dont obfuscate with the vector pointer vec initialization at the begining, in this case the logic is quite clear.
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"
As we see, save implememtation is quite straightforward.
More info
- Hacking Tools Github
- Tools Used For Hacking
- Hack Tools For Games
- Hackrf Tools
- Hacker Tools Hardware
- Termux Hacking Tools 2019
- Pentest Tools Alternative
- Pentest Tools Framework
- Pentest Tools Bluekeep
- Hack Tools Mac
- Bluetooth Hacking Tools Kali
- Hack Website Online Tool
- What Is Hacking Tools
- Pentest Tools Download
- Pentest Tools For Android
- Install Pentest Tools Ubuntu
- Pentest Tools
- Hacker Search Tools
- Hack Rom Tools
- Pentest Tools Port Scanner
- Pentest Tools Website
- Nsa Hacker Tools
- Pentest Tools
- What Are Hacking Tools
- Beginner Hacker Tools
- Hacker Tools Free Download
- Hacker Tools
- Pentest Tools Nmap
- Computer Hacker
- Pentest Tools For Windows
- Hacker Hardware Tools
- Pentest Tools Open Source
- Pentest Tools Url Fuzzer
- Hack Tool Apk No Root
- Pentest Tools Github
- Hack Tool Apk No Root
- New Hack Tools
- Hacking Tools Online
- New Hacker Tools
- Pentest Tools Apk
- Hack Tools Online
- Hack Tools Pc
- Pentest Tools Website
- World No 1 Hacker Software
- Hacker Tools For Ios
- Hack Tools Mac
- Hacking Tools For Windows
- Pentest Tools Framework
- Kik Hack Tools
- Pentest Tools List
- Underground Hacker Sites
- Hacking Tools For Beginners
- Hack Tools For Ubuntu
- Pentest Tools Bluekeep
- Hacker Search Tools
- Hackers Toolbox
- Pentest Tools Tcp Port Scanner
- Hack Tools Mac
- Hacker Tools 2019
- Hacking Tools Github
- Hack Tools Github
- World No 1 Hacker Software
- Hacker Tools Mac
- Pentest Tools For Android
- Hacking Tools Github
- Hack Tools For Mac
- Hack Tools Pc
- Hack Tools For Games
- How To Install Pentest Tools In Ubuntu
- Beginner Hacker Tools
- Pentest Tools Windows
- Hackrf Tools
- Tools 4 Hack
- Pentest Tools Subdomain
- Pentest Tools Online
- Hack Tools For Pc
- Hacker Security Tools
- What Are Hacking Tools
- Pentest Tools Find Subdomains
- Hacking Tools Pc
- Hack Tools Pc
- Hacker Tools
- Pentest Tools Port Scanner
- Pentest Tools For Mac
- Nsa Hacker Tools
- Pentest Tools Nmap
- Underground Hacker Sites
- Github Hacking Tools
- Hacking Tools Pc
- Pentest Tools Download
- Nsa Hack Tools Download
- Hack Tools Online
- Android Hack Tools Github
- Hacking Tools For Windows
- Hacker Tools Mac
- Top Pentest Tools
- How To Make Hacking Tools
- Game Hacking
- Best Hacking Tools 2020
- Black Hat Hacker Tools
- Hacker Tools
- Pentest Tools Tcp Port Scanner
- How To Install Pentest Tools In Ubuntu
- Pentest Tools Port Scanner
- Hack Tools For Pc
- Computer Hacker
- Easy Hack Tools
- Install Pentest Tools Ubuntu
- Pentest Tools Port Scanner
- Hacking Tools For Mac
- Hacker Tools List
- Hacking Tools Name
- Hacking Tools For Games
- Hacking Tools Hardware
- Hack Tools Mac
- Pentest Reporting Tools
- Hackers Toolbox
- Hacking Tools For Kali Linux
- Pentest Tools Find Subdomains
- Pentest Tools Linux
- How To Install Pentest Tools In Ubuntu
- Hacker Hardware Tools
- Hacking Apps
- Hacks And Tools
- Hack Tools For Windows
- Pentest Tools Website
- Hacker Tools
- Hacking Tools For Mac
- Pentest Tools Port Scanner
- Hacking Tools For Mac
- Hacking App
- Pentest Tools Bluekeep
- Hack Tools For Ubuntu
- Hacker Tools 2020
- Pentest Tools Url Fuzzer
- Pentest Tools Kali Linux
- Hacker Search Tools
- Hack Tools
- Usb Pentest Tools
- Hacking Tools Online
- Underground Hacker Sites
- Hack Tools
No comments:
Post a Comment