Merge pull request #205 from kpcyrd/update

Update dependencies, fix seccomp issue on x86_64 musl
This commit is contained in:
kpcyrd
2021-06-23 21:03:19 +00:00
committed by GitHub
4 changed files with 228 additions and 194 deletions

412
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,8 @@
#!/usr/bin/env python3
import subprocess
from subprocess import DEVNULL, PIPE
import shutil
from pathlib import Path
import tempfile
import json
import sys
@@ -98,6 +100,11 @@ def main(tempdir, binary):
('https://www.example.com/', 200),
}
cache = Path.home() / '.cache' / 'sn0int'
if cache.exists():
print('[*] copying geoip files')
shutil.copytree(cache, tempdir + '/.cache/sn0int', dirs_exist_ok=True)
print('[*] running geoip')
sn0int(tempdir, binary, [
'use geoip',

View File

@@ -5,6 +5,7 @@ pub fn get_username(oauth_token: &str) -> Result<String> {
let client = reqwest::Client::new();
let mut resp = client.get("https://api.github.com/user")
.header("Authorization", format!("token {}", oauth_token))
.header("User-Agent", "sn0int-registry")
.send()
.context("Failed to check access_token")?
.error_for_status()

View File

@@ -72,7 +72,7 @@ pub fn init() -> Result<()> {
ctx.allow_syscall(Syscall::membarrier)?;
ctx.set_action_for_syscall(Action::Errno(1), Syscall::openat)?;
#[cfg(not(any(target_arch = "x86_64", target_arch = "aarch64")))]
#[cfg(not(target_arch = "aarch64"))]
ctx.set_action_for_syscall(Action::Errno(1), Syscall::open)?;
ctx.load()?;