]> hackdaworld.org Git - my-code/beginners.git/commitdiff
added string2hex prog (usefull for wep key) master origin
authorhackbard <hackbard>
Sat, 22 Apr 2006 13:48:49 +0000 (13:48 +0000)
committerhackbard <hackbard>
Sat, 22 Apr 2006 13:48:49 +0000 (13:48 +0000)
string2hex.c [new file with mode: 0644]

diff --git a/string2hex.c b/string2hex.c
new file mode 100644 (file)
index 0000000..f5ef680
--- /dev/null
@@ -0,0 +1,12 @@
+#include <stdio.h>
+#include <string.h>
+int main(int argc,char **argv) {
+
+       int i;
+       int len=strlen(argv[1]);
+
+       for(i=0;i<len;i++) printf("%02x",argv[1][i]);
+       printf("\n");
+
+       return 1;
+}