Skip to content

Instantly share code, notes, and snippets.

View pombredanne's full-sized avatar

Philippe Ombredanne pombredanne

View GitHub Profile
import requests
import sys
import json
def waybackurls(host, with_subs):
if with_subs:
url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host
else:
url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host
import json
file = 'evaluated-model-things.json'
# list all license references here that frequently cause false positives
scanRefLicencesList = [
'LicenseRef-scancode-unknown-license-reference',
'LicenseRef-scancode-free-unknown',
'LicenseRef-scancode-proprietary-license',
'LicenseRef-scancode-generic-export-compliance',
'LicenseRef-scancode-generic-cla',
@pombredanne
pombredanne / fastio.py
Created February 5, 2022 14:17 — forked from satra/fastio.py
Multithreaded Python os.walk
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@pombredanne
pombredanne / dir_wlaker_multiprocess.py
Created February 5, 2022 14:14 — forked from samuelsh/dir_wlaker_multiprocess.py
parallel directory walker, based on python multiprocessing. It twice faster then dir_waker_threads but is not OO
import argparse
import multiprocessing
from multiprocessing import Pool, Queue
from multiprocessing import Manager
import os
unsearched = Manager().Queue()
dirpath_queue = Queue()
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
#author: rex
#blog: http://iregex.org
#filename trie.py
#created: 2010-08-01 20:24
#source uri: http://iregex.org/blog/trie-in-python.html
# escape bug fix by fcicq @ 2012.8.19
@pombredanne
pombredanne / popular_containers.py
Created November 2, 2021 09:30 — forked from jgamblin/popular_containers.py
Find The Most Pulled Containers From Docker Hub
@pombredanne
pombredanne / NVD.py
Created November 2, 2021 09:30 — forked from jgamblin/NVD.py
NVD CVEs to Indivual JSON files
import requests
import json
import gzip
import os
import codecs
import time
from datetime import timedelta
start = time.time()
count = 0
@pombredanne
pombredanne / push.py
Created September 25, 2021 09:03 — forked from sbs2001/push.py
VulnerableCode push command
# Copyright (c) nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/vulnerablecode/
# The VulnerableCode software is licensed under the Apache License version 2.0.
# Data generated with VulnerableCode require an acknowledgment.
#
# You may not use this software except in compliance with the License.
# You may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
@pombredanne
pombredanne / pbzx.c
Created September 18, 2021 13:37 — forked from bruienne/pbzx.c
PBZX handling of Yosemite-style Payload archives
//
// main.c
// pbzx
//
// Created by PHPdev32 on 6/20/14.
// Licensed under GPLv3, full text at http://www.gnu.org/licenses/gpl-3.0.txt
//
#include <stdint.h>
#include <stdio.h>