After fixing all of the core vol.py py2 -> py3 syntax and import errors, I get a bunch of SyntaxError
failures for plugins.
Most common syntax problems:
print "[x86] Gathering all referenced SSDTs from KTHREADs..."
import csv | |
import sys | |
from itertools import product | |
from cvss import CVSS3 | |
# Check if a CVSS score was provided as a command-line argument | |
if len(sys.argv) != 2: | |
print(f'Usage: {sys.argv[0]} <cvss_score>') | |
sys.exit(1) |
#%% | |
""" | |
Converts https://disobey.fi/2024/program html into .ics feed | |
only fix i needed to do was change the duplicate | |
<div id='timetable-day-1'> to <div id='timetable-day-2'> | |
""" | |
from bs4 import BeautifulSoup, NavigableString | |
import lxml |
[package] | |
name = "minimum_sample_size" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
clap = { version = "4.4.14", features = ["derive"] } | |
num-integer = "0.1.45" |
# ChatGPT: i have a binary file called "output.bin". | |
# i want to read it with python as a stream of integers triplets | |
# that map as coordinates in a 3d space and then plot those data points with mathplotlib. | |
# all of this is happening in jupyter notebook. | |
# + some additional small tweaking | |
# Output: | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D |
# ChatGPT prompt: | |
# i would like to create a code that would generate all possible combinations of CVSS scores and | |
# output the configuration + calculated score in CVS format to STDOUT. | |
# could you help me generate that code in python? | |
# Output: | |
import csv | |
import sys | |
from itertools import product | |
from cvss import CVSS3 |
// Wikipedia: https://en.wikipedia.org/wiki/Elias_gamma_coding | |
use std::vec; | |
use std::env; | |
fn main() { | |
let args: Vec<String> = env::args().collect(); | |
if args.len() < 2 { | |
panic!("Please provide gamma-encoded binary string as input"); | |
} |
use counter::Counter; | |
use itertools::Itertools; | |
fn main() { | |
let pw = String::from("lW2jYRI02ZKDBb9VtQBU1f6eDRo6WEj9"); | |
let lower = (b'a' ..= b'z').map(char::from).collect::<Vec<_>>(); | |
let upper = (b'A' ..= b'Z').map(char::from).collect::<Vec<_>>(); | |
let num = (b'0' ..= b'9').map(char::from).collect::<Vec<_>>(); | |
let mut pw_space = lower.clone(); | |
pw_space.extend(upper); |
use bitvec::prelude::*; | |
#[cfg(test)] | |
mod tests { | |
#[test] | |
fn it_works() { | |
assert_eq!(2 + 2, 4); | |
} | |
} |
Those steps in that order are important. You want a fresh state for the machine and you want to do just simple port scanning first because doing nmap's service scanning or nse scripts might send payloads that actually crash services. So be careful.