Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 114 guests and 4 members online
EH-Net News Feeds
Latest Additions
 
Advertisement

You are here: Home arrow Forum
EH-Net
February 10, 2012, 06:22:25 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Advertise on EH-Net!! - Reasonable Rates, Highly Targeted Audience.
 
  Home Help Calendar Login Register  
  Show Posts
Pages: [1] 2 3 ... 5
1  Ethical Hacking Discussions and Related Certifications / Programming / Shift Cipher in C on: September 14, 2009, 11:51:26 AM
Hello all,

I have a fairly simple program below that is to utilize the shift cipher to encrypt an entered string.  I have it working if I used a number when entering a value for k, but the requirement for the assignment is to use a Letter to denote 1-26 for the value of k.  I can't seem to figure out what is wrong with my converChar function, if anyone has any thoughts please let me know..,I'm not a great programmer so I may have missed something small.

Code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define  MAXCHARS  255
#define  MAXS    4

int convertChar(char *a);
void encrypt();
void decrypt();

int main()
{
    char response[MAXS],plaintext[MAXCHARS];
   
    printf("Shift Cipher Program\n\nWould you like to (E)ncrypt or (D)ecrypt a message or (Q)uit.  ");
    scanf("%s",response);
   
    while (response[0] != 'q' && response[0] != 'Q') {
          switch (response[0]) {
                 case 'e':
                 case 'E':
                      encrypt();
                      break;
                 case 'd':
                 case 'D':
                      decrypt();
                      break;
                 default:
                         printf("error: invalid command\n");
                         break;
          }//end of switch
          printf("\nWould you like to (E)ncrypt or (D)ecrypt a message or enter Q to quit.  ");
          scanf("%s",response);
    }//end of while
    return 0;
}//end of main


void encrypt()
{
     int i=0,k;
     char msg[MAXCHARS],*letter;

     printf("Please enter the plain text to encrypt in all CAPS and press enter\n");
     scanf ("%s",msg);
     printf("Please enter the alpha key(k) you would like to use  ");
     scanf ("%s",letter);
     k = convertChar(letter);
     while (msg[i]!= '\0') {
           if ((msg[i]+k) > 'Z')
           {
              msg[i] = ((((msg[i]+k) - 'Z')-1) + 'A'); //wrap to the beginning
              }
           else
               msg[i] = (msg[i]+k);
               
           i++;
     }
     printf("\n%s", msg);
     }

void decrypt()
{
     int i=0,k;
     char msg[MAXCHARS],*letter;

     printf("Please enter the cipher text to decrypt in all CAPS and press enter\n");
     scanf ("%s",msg);
     printf("Please enter the alpha key(k) you would like to use  ");
 
     scanf ("%s",letter);
     k = convertChar(letter);
     
      while (msg[i]!= '\0') {
          if ((msg[i]-k) < 'A'){
           
              msg[i] = ('Z' - (('A' - (msg[i]-k))-1)); } //wrap to the end.
           else {
           
               msg[i] = (msg[i]-k); }   
          i++;
     }
     printf ("%s\n",msg);
}                       

int convertChar(char *a)
{
    static char *letters[26] = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
    int i=0;
   
    while(i<26){
if (strcmp(letters[i],a)){
            printf("%d",i);
return (i+1); }
else
i++;
}
return 0;
}


2  Ethical Hacking Discussions and Related Certifications / Other / Masters degree question on: July 14, 2009, 09:29:55 AM
Hello all,

This is more of a question towards any of the CCSPs on the board, and anyone else on the board who have the certificates from a degree. I was just wondering in your experiences what kind of recognition employers have given the CNSS certificates be it 4011 through 4016. Really I'm just trying to decide if it's worth taking the specific classes needed for them or not...the program I'm in is itself a good program and the certificates would be more of a bonus.  My main issue is most of my required courses for the degree and the security concentration are offered in the fall.  I can really push myself this fall and knock out 2 of my harder classes together and then should be ok...but I'm trying to see if the certificates are worth it.  Either way I don't plan on moving on from my current job but they might come in handy with my masters at some point though.  Let me know your thoughts everyone.

Thanks in advance.
3  Ethical Hacking Discussions and Related Certifications / CSIH - Computer Security Incident Handler / Re: Anyone taken this? on: June 13, 2009, 06:28:51 PM
but seriously... bumping an old topic, anyone taken this? Got any insight to CM's program?

Are you referring to the cert itself or degree programs at CMU?
4  Ethical Hacking Discussions and Related Certifications / Malware / Re: Security related issues on: February 07, 2009, 08:36:37 PM
Reinstall is never a good option.You can go to whatthetech.com and post your problem in the Hijackthis log and malware removal section along with a Hijackthis log of the infected computer. They are great bunch of people and will surely help you out with your malware issues.

It may not be the most desirable method but with the stage he was at with redoing his system I wouldn't have though twice except on my own curiosity of how to fix it.  Doing a secure format and reinstalling won't guarantee it can't somehow come back because his home network may be infected for all he knows...but at the beginning of any install I wouldn't think twice....just for future reference for any I found a nice solution if you boot to your favorite live linux distro and install Clam and run the scan on the partition...

http://njlinux.blogspot.com/2008/01/virus-scan-windows-using-linux-live-cd.html

I may try it out on a vm to see what it picks up in my lab for kicks some time but it's a good way to get a clean scan.
5  Ethical Hacking Discussions and Related Certifications / Malware / Re: Security related issues on: January 25, 2009, 05:57:52 PM
Honestly I'd just reformat thats the only way to be sure you have removed the virus for good.  When going through the reinstall i would have the anti virus on sooner and be cautious of what you download.  Do you have any ideas where you got the virus?
6  Ethical Hacking Discussions and Related Certifications / Hardware / Re: Cisco Security on: January 22, 2009, 03:26:17 PM
Careful don, giving dynamik the go ahead to feel at home could result in too many posts. It takes a special guy to rack up that many posts in less than 2 years!!  We can't prove it but any down time over there is suspect to him overloading the server  Wink
7  Ethical Hacking Discussions and Related Certifications / General Certification / Re: Failed CEH today with a 67% on: January 20, 2009, 03:36:54 PM
Feel your pain, I sat for the CEH today and I got a 69%!  I have to agree with what you have said in regards to the exam.  But all I can do now is really jump into the material and try again!

Sorry to hear that grinch...was it not at all how you expected it?  how much did your degree end up helping you?
8  Ethical Hacking Discussions and Related Certifications / Network Pen Testing / breaking 802.1x on: January 20, 2009, 07:31:55 AM
Hello EH.net,

I am also searching google for this as well but I was looking for any recommendations for methods to break 802.1x on a cisco 800 series router(not sure on the exact model at them moment, I will check later on).  I know that there are some extremely talented people on this board and I'm fairly new to pen testing so any advice or direction would be appreciated.
9  Ethical Hacking Discussions and Related Certifications / General Certification / Re: Failed CEH today with a 67% on: January 15, 2009, 01:54:50 PM
From what I've been told the exam really wants you to be able to not only know how to use the tools but to be able to decipher what the output is saying to you...
10  Ethical Hacking Discussions and Related Certifications / Hardware / Re: Cisco Security on: January 15, 2009, 12:38:05 PM
The problem with this approach is that you must become equally proficient with multiple products. For example, using two different firewalls would prevent an exploit in one from working on the other, but at the same time, you may increase the likelihood of configuration errors. I'm not outright disagreeing with you, since that approach does have benefits as well. I'm just offering an alternate perspective because I think some people develop a false sense of security by taking the multi-vendor approach.

To get around that for example in my company's environment we have a team of individuals whom work on certain aspects of the infrastructure.  Each one has their own specialty and have a working proficiency in the rest.  So in all everyone can work with everything, but we have an expert for each technology.  So for major changes the SME would either complete or review all configuration changes to ensure there are no issues.  Nice to see you over here dynamik  Grin
11  Resources / News from the Outside World / Google branching out a little further... on: January 08, 2009, 09:40:55 AM
It looks like google is trying to get into the networking business now....maybe a GCNA in the future for certifications??

I'm kinda excited to see what they bring to the market!!

http://www.sdtimes.com/blog/post/2009/01/05/Google-To-Doom-Juniper.aspx
12  Resources / Links to cool sites. / Re: Free Computer Engineering Classes From Stanford on: January 07, 2009, 07:31:26 PM
Very cool! I'm in that same time boat. I'll get to some of them eventually.  Tongue

Between there and MIT I have enough free courseware that I will be busy for a long time.
13  Ethical Hacking Discussions and Related Certifications / Malware / Re: Network Virus Problem on: January 04, 2009, 09:40:01 PM
If i'm understanding you right why are you configuring a client with 2 different ip addresses?  If the local subnet for the client is 192.162.0.0 and the remote is 172.16.0.0, you don't need an IP in both subnets.  Just a route to get there...if you need to hit a different router then your default gateway to reach that subnet adding a static route may be what you need to do.
14  Ethical Hacking Discussions and Related Certifications / CEH - Certified Ethical Hacker / Re: Any Practice Environment for learning tool for CEH? on: January 04, 2009, 07:56:48 PM
blackazarro,

I was only pointing it out for the reasons of what can happen to someone who has used something like testking.  I was in no way trying to elude to the fact you only passed because of test king, from what I've seen I'm sure you didn't need the resource.  I just wanted to point it out to you because I had done the some thing similar. Unknowingly when studying for my Network+ some one had suggested them as a resource. So I hope you didn't take that the wrong way!
15  Ethical Hacking Discussions and Related Certifications / CEH - Certified Ethical Hacker / Re: Any Practice Environment for learning tool for CEH? on: January 04, 2009, 10:06:32 AM
Suggested reading by one of our members:

Virtual Lab with VMware

And if you're interested:

How I passed the CEH(v5) exam

Enjoy!!

Nice write up on your study path for the v5 CEH exam, it gave me a few good ideas to use for my studies.  One thing I wanted to point out though is one of your resources you used, I don't know the exact policy for EC-Council but I know with other vendors they usually revoke certifications for one of the products you used 'TestKing' if you look at this link:
http://www.CertGuard.com/Search.asp?Site=testking.com
I just wanted you to know if you didn't already.

@hassel

I don't have a lab guide or anything which one are you using? I planned on just practicing and exploring different tools and methodologies I read about in books.
Here's the book I am currently reading:

http://www.amazon.com/CEH-Prep-Guide-Comprehensive-Certified/dp/0470135921/ref=pd_bbs_sr_2?ie=UTF8&s=books&qid=1231085017&sr=8-2  

My lab set up is vmware server running on centos...with various linux vms/windows vms.
Pages: [1] 2 3 ... 5
Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.113 seconds with 19 queries.
 

gk_static-ad_feb2012.jpg
Global Knowledge Training: Build Security Skills to Protect and Defend

offsec_130x200-2_jan-feb2012.png
Offensive Security
AWE Live in the Caribbean!
March 5 - 9, 2012

SANS Deals 4 EH-Netters
$150 OFF Any SANS Course in Any Format!
Coupon Code: Refer_EHN
Including SANS Phoenix 2012, SANS 2012
Recent Forum Topics

cbtnuggets_logo_125.jpg
Try CBT Nuggets Free!

Vote For EH-Net

Add to Technorati Favorites
technorati fave

 
         
Advertisement

© 2012 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.