Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~10K People Reached
Favorite Tags
Member Avatar for cableguy31

As part of a school assignment, I have to analyze a binary and determine what is does and what it takes to cause the various "branches" (if statements) to be triggered. I performed a strace on the file and the only part that stands out is a gettimeofday call: [CODE]gettimeofday({1303744469, …

Member Avatar for template<>
0
265
Member Avatar for cableguy31

I'm having a problem writing an unsigned char array to a file. When I write it to stdout using printf, it displays properly, however if I write it to a file, when I open it, I can't read the file. It looks like it may be writing the file in …

Member Avatar for Narue
0
719
Member Avatar for cableguy31

First, yes this is a school project. That said, I have a seed, now I need to create a function that will create a byte array of random bits. The input for the function should be the number of requested random bits. Here's an example: [CODE]unsigned char* getRandomBits (int number);[/CODE] …

Member Avatar for cableguy31
0
131
Member Avatar for cableguy31

Is there a way to gather network/internet traffic statistics? The end result is that I need to create a random number generator using some network stats as a random seed, so I need to pull information that is highly variable. Could be packet data (maybe sequence numbers), or traffic data …

Member Avatar for cableguy31
0
298
Member Avatar for cableguy31

Here is what I need to do. I have a very small C program that takes user input and passes argv to a function written in GNU assembly language that will then count the number of characters in the string. The function seems to work fine when I enter a …

Member Avatar for untio
0
3K
Member Avatar for cableguy31

I'm trying to write a simple program that takes arguments and concatenates them into a single string. It compiles fine, but when I run it, I get a segmentation fault. Here's the code: [CODE] #include <stdio.h> #include <stdlib.h> #include <string.h> main(int argc, char *argv[]) { int i; int strlen; char …

Member Avatar for cableguy31
0
149
Member Avatar for cableguy31

Here's what I'm trying to do. I have a php script that will run an sql query and return the data back in a table. I want to put a radio button into each row so the user can select one row to submit. Then, when they click submit, I …

Member Avatar for cossay
0
1K
Member Avatar for cableguy31

I have a webpage with a form that collects an ID number. Within the page I have validation with PHP to make sure the number entered is in the right format. What I need to do is, if validation is successful, pass that id number to a new php page …

Member Avatar for cableguy31
0
243
Member Avatar for cableguy31

I need to write code that can determine if an IP address is in a subnet based one the subnet address and mask. I don't even know where to begin with this, so any tips would be appreciated. Thanks.

Member Avatar for cableguy31
0
1K
Member Avatar for cableguy31

I'm writing a program that parses tcpdump output files. I have a tab delimited text file that contains MAC addresses and hostnames. How can I have the program search this file for a MAC address and then return the corresponding hostname? Any help would be appreciated. Thanks.

Member Avatar for cableguy31
0
213
Member Avatar for cableguy31

I'm writing a program that will parse and print packet information from a tcpdump file. One of the fields is the timestamp, which is in seconds. The program is reading the timestamp into an unsigned int type. I need to be able to convert the timestamp in seconds to a …

Member Avatar for Ancient Dragon
0
139
Member Avatar for cableguy31

I am trying to write a script that can accept multiple options. The issue that I'm having is some of the potential input will be search criteria. The syntax would be: script [list of patterns] [-t seconds] [-n count] All of the arguments are optional. So far, my thoughts were …

Member Avatar for edup_pt
0
231
Member Avatar for cableguy31

I'm using re.search to search for the pattern of anything that might look like a credit card number in a file. What I would like to do, is have the script then pull out the potential cc number and pass it to the Luhn algorithm for verification. If I'm not …

Member Avatar for cableguy31
0
80
Member Avatar for cableguy31

I'm writing a script that will search file names looking from certain file extensions. The thing is, is that I am looking for multiple extensions, and the list may change. I could write an if statement using "and", but the line just gets a bit long and can become difficult …

Member Avatar for TrustyTony
0
139
Member Avatar for cableguy31

I'm writing a script that will search files that contain certain keywords, and then output the line to a text file. The problem I'm having is that the script is opening every type of file, including executables. The script seems to work fine, as in it doesn't crash when it …

Member Avatar for cableguy31
1
605
Member Avatar for cableguy31

As I started to mention in this thread [URL="http://www.daniweb.com/forums/thread293034.html"]Checking for filetypes?[/URL]: I'm writing a script that will search files that contain certain keywords, and then output the line to a text file. The problem I'm having is that the script is opening every type of file, including executables. The script …

Member Avatar for woooee
0
128
Member Avatar for cableguy31

I'm writing a script to scan Windows shares. Running the script from Windows, it works fine. But running it from Linux and it doesn't work. I don't get any errors, it just doesn't return anything. I'm guessing this is probably an authentication issue of some kind. On Windows, it automatically …

Member Avatar for Gribouillis
0
182
Member Avatar for cableguy31

I'm trying to write a script that will go to a host and list all of its shares. So far, in my searching, it seems that I need to include a top level share name. For example: [CODE]os.listdir('\\\\1.2.3.4\')[/CODE] doesn't seem to work, but [CODE]os.listdir('\\\\1.2.3.4\\share\')[/CODE] will work. As a bit of …

Member Avatar for TrustyTony
0
382
Member Avatar for cableguy31

I'm trying to write a script that will take as input a network and subnet mask and then ping each host. I can get it to work fine for any class C address that only increments that last octet. However, I'm kind of stuck on how can I work through …

Member Avatar for TrustyTony
0
101
Member Avatar for cableguy31

I currently have a small c++ program that will ping all hosts in a subnet and then run "net view" to get a list of shares available on those systems that respond to the ping. I want to take this to the next level. I want to be able to …

0
41
Member Avatar for cableguy31

I'm writing a shell script that can take zero to 2 user arguments. I have an if statement to check to see if any arguments were entered and then I have a case to enter the arguments into the correct variables. This all works great. Now, I want to add …

Member Avatar for nvivek
0
160
Member Avatar for cableguy31

I'm working on a contact form. I have the form being checked by a PHP script once it's submitted. If the script finds an error, it will load a new page with the error message and then redirect back to the form after 10 seconds so the user can correct …

Member Avatar for almostbob
0
215
Member Avatar for cableguy31

I have a php script that sends the contents of a form via email. I have some error checking in the script to make sure that the required fields are filled out. Right now, if there's an error, it just displays an error, with what's missing on a simple html …

Member Avatar for vaultdweller123
0
109