A security-focused C++ project that simulates fraud detection by validating user credentials, verifying trusted IP addresses, checking transaction IDs, and logging suspicious or secure activities using file-based storage.
The SmartIP Fraud Detection System enhances transaction security by running multiple validation layers before approving access:
- User authentication (User ID + Password)
- Trusted IP address verification
- Transaction ID validation
- Geolocation reference
- Fraud / success logging
| Feature | Description |
|---|---|
| User Authentication | Verifies User ID and Password from users.txt |
| Trusted IP Validation | Checks IP against trusted addresses in known_ips.txt |
| Transaction Verification | Validates transaction IDs using transaction_ids.txt |
| Fraud Logging | Logs suspicious activity to fraud_log.txt |
| Success Logging | Logs approved transactions to transaction_success_log.txt |
| Geolocation Support | Reads country, region, and city from geoInfo.txt |
SmartIP-Fraud-Detection/
├── smart_ip_fraud_detection.cpp → Main C++ source code
├── users.txt → Sample user credentials
├── known_ips.txt → Trusted IP addresses
├── transaction_ids.txt → Valid transaction IDs
├── geoInfo.txt → Location information
├── transaction_success_log.txt → Successful transaction logs
├── fraud_log.txt → Fraud / suspicious activity logs
└── README.md → Project documentation
Option 1 — Dev C++:
- Open
smart_ip_fraud_detection.cppin Dev C++ - Ensure all
.txtfiles are in the same project directory - Compile and Run
Option 2 — g++ (Terminal):
g++ smart_ip_fraud_detection.cpp -o fraud_detection
./fraud_detectionEnter User ID:
Enter Password:
Enter IP Address:
Enter Transaction ID:
The system then:
- Validates credentials against
users.txt - Checks IP against
known_ips.txt - Verifies transaction ID against
transaction_ids.txt - Logs result to either
fraud_log.txtortransaction_success_log.txt
- File handling (
ifstream,ofstream) - User authentication logic
- IP validation and trust management
- String parsing and sanitization
- Rule-based fraud detection
- Logging systems design
- Real-world security workflow simulation
This project simulates concepts used in:
- Banking fraud detection systems
- Secure login monitoring
- Transaction verification pipelines
- IP trust management
- Cybersecurity prototypes
- Password hashing
- MySQL / Database integration
- Multi-factor authentication
- Real-time geolocation API integration
- Admin dashboard
- GUI-based interface
Pull requests are welcome! For suggestions, improvements, or security enhancements, feel free to open an issue.
Keshav Kumar Sharma
B.Tech CSE | Full Stack Development | Problem Solver | Open Source Contributor