Need Urgent Attention regarding my Perl Program
I am sending a packets from client machine to server machine.
I have 4 dynamic fields i.e. source IP address ,Source Port , Destination IP address and Destination Port All four fields are calling from file. It means every times generating new IP packets which have different IP addresses and Ports. Question is that, For example If I want to send the 100,000 packets per second for the duration of 10 seconds.So my total send packets is 1 Million. But they are sending not more than 26 thousands. I am using one variable DIM...for suppose I change this field like that $dim=1; instead of $dim= scalar(@lines); then it is perfectly work and send 1 Million Packets(but everytime same packets which is not my requirement). Itz means my program can generate 1 Million packets. I want to generate the different packets .Please help me where I am lacking??? |
Quote:
Second, you have given us no details AT ALL to work with. You haven't posted your code, told us anything about what version/distro of Linux you're using, what kind of hardware it's on, etc. If this is 'urgent', then provide details and we can try to help. |
Also,. why are you using Perl as a traffic generator? Will python or scapy work for you?
|
@szboardstretcher Yes it work for me...but I already spend alot of time on Perl code....therefore it is easier for me...if you need code I will send you the code
|
Quote:
|
If you have quite a bit of code to share, you can post it on a pastebin site, or throw it into a github account.
http://fpaste.org/ https://github.com/ |
@TB0ne and szboardstretcher .....This code is working fine,only problem is that I cannot generate different packets more than 26000 if I am sending 1 Million packets for the duration of 10 seconds.
I am using one variable DIM...for suppose I change this field like that $dim=1; instead of $dim= scalar(@lines); then it is perfectly work and send 1 Million Packets(but everytime same packets which is not my requirement). Itz means my program can generate 1 Million packets. I want to generate the different packets .Please help me where I am lacking??? |
Erk. That's a very long way from modern Perl.
Firstly: "use warnings" is a good thing to turn on when a script isn't doing what you expect. Secondly: How are you expecting $n and $secs to get set? I see nothing that'll do it, which makes them my first suspect for the script not doing what you want. Thirdly: You're using modules that aren't on CPAN. If those are your own modules, (a) why are you reinventing the wheel? but more importantly (b) how do you expect us to debug the script? |
All times are GMT -5. The time now is 07:15 PM. |