Skip to content

sematext/uprobe-http-tracer

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

uprobe-http-tracer

Captures all the calls to http.Get function and grabs the full URL from the stack area. For more details head to the blog post.

Requirements

To build this tool you have to satisify the following requirements:

  • have a Linux kernel that supports uprobes
  • linux headers
  • clang
  • LLVM
  • libbcc
  • Go >1.12

Usage

  1. Build the tool
go build -o uprobe-http-tracer main.go
  1. Write a simple program
vi /tmp/main.go

package main

import "net/http"

func main() {
    urls := []string{"http://google.com", "http://reddit.com", "http://pastebin.com/tools"}
    for _, url := range urls {
       http.Get(url)
    }
}

go build /tmp/main.go
  1. See it in action
sudo ./uprobe-http-tracer --bin=/tmp/main
PID     URL
8274    http://google.com
8276    http://reddit.com
8286    http://pastebin.com/tools

Releases

No releases published

Packages

No packages published

Languages