Skip to content

Instantly share code, notes, and snippets.

View sarweshkumar47's full-sized avatar
🎯
Focusing

Sarweshkumar C R sarweshkumar47

🎯
Focusing
View GitHub Profile
@sarweshkumar47
sarweshkumar47 / netcat.py
Created December 14, 2020 11:25 — forked from leonjza/netcat.py
Python Netcat
import socket
class Netcat:
""" Python 'netcat like' module """
def __init__(self, ip, port):
self.buff = ""
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@sarweshkumar47
sarweshkumar47 / set_cpu_core.c
Last active May 26, 2020 07:29
Assign a particular CPU core for a C application in linux environment
#define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <sched.h>
int main()
{
const int CORE_ID = 1;