Okay, so I have a science fair project and I decided on doing a series of programs that show the simpleness behind hacking a password. Each program increases in complexity starting with a four digit password, and ending with a 10 digit letter and number combo that is case sensitive. Right now I need to figure out a way to have my program be able to convert chars into ints, so that I can do a counter and then I also need to be able to convert the ints, back into chars.
So I need to make a program that recieves a 10 letter only password, then once the password is entered, it starts off as AAAAAAAAAA...AAAAAAAAAB...AAAAAAAAAC...etc, Until it gets the correct password, which it then stops. This is for a science fair project on cyber security not for malicious purposes ...
Code: #include<stdio.h> #include<string.h> #define a 9 #define b 9 #define c 3 int main() {
[Code] .....
In practice section there was a challenge to print up numbers in letters up to billion including negatives I didn't look at the solution and came up with this but it is getting difficult after this point....
I have my program working, as far as converting the letters to numbers, but i want be able to enter as many numbers as i want. so i figured i could put into a loop asking a question at the end. question being whether the user wants to enter another number or not. also i'm assuming the user enters exactly 7 letters each time. this is my code so far.
const int arSize = 9; char letters[arSize]; int numbers[arSize]; int count = 0; cout << "Enter a telephone number expressed in letters. (e.g. CALL loan ( it is not case sensetive))"; for (int i = 0; i < 7; i++,count++)
How do I error check if the user is inputting letters and not numbers? For example, if the user inputs "Lab.txt" I need to display an error message. If they input "Lab2part2.txt" then this is correct and what I want.
I've found a lot of information online on how to error check for numbers or a single letter (EX: 1,2,3, etc. or 'A' 'B' 'C') but nothing for actual WORDS or maybe I should refer to it as a string of characters?
Is there any way to do this? Because my program requires I ask the user to input the name of the file. But the way my code is currently set up is even when the user inputs the wrong file name it still opens the file. I want to prevent this from happening so my thought was to error check user input.
/*Program to determine company's weekly payroll*/
#include <iostream> #include <string> #include <fstream> using namespace std; void OpenTheFile() { ifstream inputFile; string filename; char letter; int number;
I have been playing around with .txt and .dat files lately. I only manage to load the files, but I don't seem to be able to load files using a variable.
Also modifying the data after it is imported is also currently problematic. I know how to go about the process without the need to import anything, but whenever I import the data I am having trouble modifying/ editing the ".txt" or ".dat" data.
the code use in above link is good but one problem i cant able to use backspace to remove mistake if user made any mistake he cant able to remove the mistaken character
I'm a novice with C programming and i have to solve an error in the following code. The code works like you enter a password called "uoc" and it shows as OK. But surprisely when you entered another password as "Cambridge" it works fine too.
I think that the problem is in the array declaration but i'm checking resources and no success!
this is really important i searched an example code about "Username and Password Validation between Server and Client" through internet a LOT and i couldn't find anything..
"How to create login id and password" because i have to submit this assignment next weeks i dont know how to using passing by value or reference corectly/
For the Ouput its say this :
1>ClCompile: 1> GILA DAH!!.cpp 1>d:computer programmin ditg 1113jiwa ku sakitjiwa ku sakitGILA DAH!!.cpp(21): error C2664: 'strlen' : cannot convert parameter 1 from 'char' to 'const char *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast 1> 1>Build FAILED.
Ive been working on a program that can mask the password and has 3 attempts. So far I can't do both at the same time. Here is my work. How can I do both?
#include<iostream> #include<string.h> #include<conio.h> using namespace std; int main() { string _pass; char input;
I wanted to make an program which is sending messages to log in and password, but instead of message it gives me "System.Windows.Forms.TextBox, Text: AND HERE MY TEXT I WANTED.
How to make a program to enter password and if password right I can change the curency. I only want to change from ringgit malaysia to us dollar.The program can convert currency many times.I only want to use stdio.h
#include <stdio.h> void main() { int pass; printf("Input your password"); scanf("%d",$pass); if (pass==4782)
[Code] ....
After this what should I put to complete this program?
I am trying to create a login that accepts a user login and password. it should accept 3 tries in which when the user enters their username the system should tell whether if the username is correct if not it should display a message saying invalid username and directs the user to register like entering their dob and name. But I cannot seem to get this part run correctly.
#include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> void main() { char userId[10]; char passwrd[10]; int p = 0;
I'm making a Project on a Travel Agency and I need to hide the password entered by the user! I am working on Xcode 5.1.1 -> Command Line Tools -> C++ on my MacBook Pro! Here is what I've tried --
string pass =""; char ch; cout << "Enter pass"; ch = getchar(); while(ch != 13){//character 13 is enter
[Code]...
But in the first case the display is -
//Assuming the password is Hello Hello ******
And in the second its giving me 3 errors -
1. Apple Mach-O Linker(Id) Error "_stdscr", referenced from:
2. Apple Mach-O Linker(Id) Error "_wgetch", referenced from:
3. Apple Mach-O Linker(Id) Error clang: error: linker command failed with exit code 1 (use -v to see invocation)