Skip to content

Instantly share code, notes, and snippets.

View rferreira's full-sized avatar

Rafael Ferreira rferreira

  • Indy
View GitHub Profile
$curl -u 46f034dd034741bdac75415f2ffa7b2d:1234abc -F file=@document.doc https://api.scanii.com/v2.1/files/
{
"id" : "a13ec43c5d15cd5bfe335ca956efa003",
"checksum" : "cf8bd9dfddff007f75adf4c2be48005cea317c62",
"bytes" : 69,
"findings" : [ "av.sample-virus" ],
"creation_date" : "2015-05-16T22:40:50.083Z",
"content_type" : "application/msword",
}
// creating the client
ScaniiClient client = new ScaniiClient(ScaniiTarget.v2_0, KEY, SECRET);
// scans a file
result = client.process(Paths.get("/tmp/foo.doc"));
System.out.println(result.getFindings());
# strace docker -d -H tcp://0.0.0.0:2375
execve("/usr/bin/docker", ["docker", "-d", "-H", "tcp://0.0.0.0:2375"], [/* 17 vars */]) = 0
uname({sys="Linux", node="ip-10-138-85-107", ...}) = 0
brk(0) = 0x1d14000
brk(0x1d151c0) = 0x1d151c0
arch_prctl(ARCH_SET_FS, 0x1d14880) = 0
set_tid_address(0x1d14b50) = 3746
set_robust_list(0x1d14b60, 24) = 0
futex(0x7ffff72ec380, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 1d14880) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x8f8d40, [], SA_RESTORER|SA_SIGINFO, 0x8f9400}, NULL, 8) = 0
$browser.manage().timeouts().pageLoadTimeout(120000);
$browser.get("http://www.blinkboxmusic.com");
{
"log" : {
"version" : "1.2",
"creator" : {
"name" : "New Relic Synthetic Monitoring - HarProxy",
"version" : "1.0",
"comment" : "[2014-08-28T15:53:36.022] HAR created on 'rferreira-mba'"
},
"browser" : {
"name" : "phantomjs",
[Thu May 8 21:54:35 MST 2014]: starting job: f08ff466-741b-441a-8796-dfdd8630154c
[Thu May 8 21:54:35 MST 2014]: env
SHELL=/bin/bash
CLICOLOR=1
HISTSIZE=
TMPDIR=/var/folders/lg/4j7c7kt957j_17n9ljxv95800000gn/T/
Apple_PubSub_Socket_Render=/tmp/launch-Q4upEo/Render
...
[Thu May 8 21:54:35 MST 2014]: NPM modules available:
/private/var/folders/lg/4j7c7kt957j_17n9ljxv95800000gn/T/job-f08ff466-7800899602495666367
if jackfruit.config is None:
if path is None:
# making sure the main config is loaded:
if not CONFIG_ENV_VAR in os.environ:
print('##############################################################')
print('config discovery failed, looked for "%s"' % CONFIG_ENV_VAR)
print('##############################################################')
sys.exit(2)
path = os.environ[CONFIG_ENV_VAR]
10 INFO: wrote /Users/rafael/dev/jackfruit/jackfruit.spec
28 WARNING: You are running 64-bit Python: created binaries will only work on Mac OS X 10.6+.
If you need 10.4-10.5 compatibility, run Python as a 32-bit binary with this command:
VERSIONER_PYTHON_PREFER_32_BIT=yes arch -i386 /Users/rafael/dev/venvs/pyinstaller/bin/python2.7
4029 DEBUG: Testing for UPX ...
4034 INFO: UPX is not available.
4034 DEBUG: Computing PYZ dependencies
4034 DEBUG: Analyzing pyi_importers
(.venv)rafael@master:~/jackfruit$ pyinstaller -F --hidden-import=HTMLParser --hidden-import=htmlentitydefs --hidden-import=markupbase --name=jackfruit jackfruit/boot.py
8 INFO: wrote /home/rafael/jackfruit/jackfruit.spec
25 INFO: UPX is not available.
39 INFO: Processing hook hook-os
99 INFO: Processing hook hook-time
120 INFO: Processing hook hook-_sre
133 INFO: Processing hook hook-cStringIO
140 INFO: Processing hook hook-codecs
147 INFO: Processing hook hook-encodings
426 INFO: Processing hook hook-cPickle
:~/jackfruit$ python
Python 2.7.3 (default, Sep 26 2013, 20:03:06)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jackfruit.settings
loaded config path from environment variable: etc/testing.config.js
[02/01/2014 17:32:54][1799][papaya.profile] INFO: call to function papaya.files.read took 0 ms
[02/01/2014 17:32:54][1799][papaya.metrics] INFO: connecting to redis @localhost:6379/0
[02/01/2014 17:32:54][1799][papaya.metrics] INFO: clearing metric buckets
[02/01/2014 17:32:54][1799][papaya.profile] INFO: call to function papaya.metrics.clear took 0 ms