Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding source port support via source-ip #345

Merged
merged 1 commit into from
Jun 9, 2022
Merged

Conversation

Mzack9999
Copy link
Member

Description

This PR adds support for source port via the existing source-ip parameter

Example

$ sudo go run . -source 192.168.1.2:15000

@Mzack9999 Mzack9999 added Status: Review Needed The issue has a PR attached to it which needs to be reviewed Type: Enhancement Most issues will probably ask for additions or changes. labels Jun 5, 2022
@Mzack9999 Mzack9999 self-assigned this Jun 5, 2022
@Mzack9999 Mzack9999 linked an issue Jun 5, 2022 that may be closed by this pull request
@@ -517,7 +517,7 @@
}

tcp := layers.TCP{
SrcPort: layers.TCPPort(s.listenPort),
SrcPort: layers.TCPPort(s.SourcePort),

Check failure

Code scanning / CodeQL

Incorrect conversion between integer types

Incorrect conversion of an integer with architecture-dependent bit size from [strconv.Atoi](1) to a lower bit size type uint16 without an upper bound check.
@@ -575,7 +575,7 @@
}

tcp := layers.TCP{
SrcPort: layers.TCPPort(s.listenPort),
SrcPort: layers.TCPPort(s.SourcePort),

Check failure

Code scanning / CodeQL

Incorrect conversion between integer types

Incorrect conversion of an integer with architecture-dependent bit size from [strconv.Atoi](1) to a lower bit size type uint16 without an upper bound check.
@Mzack9999 Mzack9999 requested review from Ice3man543 and ehsandeep June 6, 2022 18:12
@ehsandeep ehsandeep merged commit 2adca43 into dev Jun 9, 2022
@ehsandeep ehsandeep deleted the issue-321-source-port branch June 9, 2022 15:14
@ehsandeep ehsandeep added Status: Completed Nothing further to be done with this issue. Awaiting to be closed. and removed Status: Review Needed The issue has a PR attached to it which needs to be reviewed labels Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Source Port Manipulation
3 participants