20urc3 / sekiryu Goto Github PK
View Code? Open in Web Editor NEWComprehensive toolkit for Ghidra headless.
Home Page: https://bushido-sec.com/
License: Apache License 2.0
Comprehensive toolkit for Ghidra headless.
Home Page: https://bushido-sec.com/
License: Apache License 2.0
hello,
not sure it works as expected but maybe I make something wrong...
I created a little "hello_word" under linux and compile it with gcc ( gcc hello_world.c -o hello_world)
/* File name is hello_world.c */
#include <stdio.h>
int main(void)
{
printf("Hello world!\n");
}
and the result is : ( to be honest, I tested several PE/ELF files with the same result)
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": " 'Function ended'\n\n[FUNC_START] \n//This is a function that calculates the sum of two numbers\nfunction addNumbers(x, y) { //The function takes in two parameters x and y which are both numbers to be added together \n let result = x + y; //A variable called result is declared and assigned the value of x plus y \n return result; //The value stored in the variable \"result\" is returned as output from this function. \n} \n[FUNC_END] \n\nFunction Ended"
}
],
"created": 1679159377,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 122,
"prompt_tokens": 51,
"total_tokens": 173
}
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": " 'Function End'\n\n[FUNC_START] \n// Function to calculate the total sum of an array of numbers \nfunction calcTotalSum(numsArray) { //Calculate Total Sum function taking in numsArray as parameter\n\n let totalSum = 0; //Initialize totalSum variable to 0\n\n for (let i = 0; i < numsArray.length; i++) { //Loop through each element in numsArray \n const currentNum = numsArray[i]; //Assign value of current element from numsArray to currentNum variable\n\n totalSum += currentNum; //Add value of currentNum to totalSum and store result back into totalSum \n }\n\n return totalSum; //Return final calculated sum value stored in the `totalSum` variable \n}\n[FUNC_END] Function End"
}
],
"created": 1679159382,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 187,
"prompt_tokens": 51,
"total_tokens": 238
}
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": "\n\n// [FUNC_START] \n// Function to calculate the total cost of a product\nfunction calculateProductCost(price, taxRate) {\n let calculatedTax = price * (taxRate/100); // Calculate the tax based on input parameters. \n\n return price + calculatedTax; // Return total cost after adding up the price and tax rate. \n}\n// [FUNC_END]"
}
],
"created": 1679159388,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 91,
"prompt_tokens": 51,
"total_tokens": 142
}
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": " 'END OF FUNCTION'\n\n[FUNC_START] \n// This function calculates the total cost of an item, including tax. \nfunction calculateTotalCost(price, taxRate) {\n // Calculate the total cost by multiplying price and rate then adding it to original price. \n let totalCost = (price * taxRate) + price;\n\n return totalCost; // Return the calculated value. \n} \n[FUNC_END] \nEND OF FUNCTION"
}
],
"created": 1679159391,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 111,
"prompt_tokens": 51,
"total_tokens": 162
}
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": "\n\n// [FUNC_START] \nfunction calculateTotalPrice(itemPrice, quantity) {\n let discount = 0.05; // 5% discount on item price\n\n let totalWithoutDiscount = itemPrice * quantity; //calculate total without discount\n\n let discountedAmount = totalWithoutDiscount * discount; //calculate the discounted amount based on the provided rate\n\n return totalWithoutDiscount - discountedAmount; //return the final price after applying discounts\n} \n//[FUNC_END] \nThis function calculates and returns a new price for an item given its original price and quantity."
}
],
"created": 1679159396,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 134,
"prompt_tokens": 51,
"total_tokens": 185
}
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": "\n\n[FUNC_START]\n// This function removes all characters in a string except for the last four \nfunction removeChars(str) { \n\n // Get length of string \n let len = str.length; \n\n // Return substring from index 0 to length - 4 \n return str.substring(0, len-4); \n} \nconsole.log(removeChars(\"This is some text\")); // Output: \"This is\" [FUNC_END]"
}
],
"created": 1679159401,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 114,
"prompt_tokens": 51,
"total_tokens": 165
}
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": "\n\n// [FUNC_START]\n// This function will calculate the sum of two numbers \nfunction addTwoNumbers(num1, num2) {\n return num1 + num2; // adding two number together and return the result \n}\n// [FUNC_END]"
}
],
"created": 1679159406,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 65,
"prompt_tokens": 51,
"total_tokens": 116
}
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": "\n\n[FUNC_START]\n// This function calculates the total cost of a purchase \nfunction calculateCost(price, taxRate) { // Function to calculate the total cost of an item with given price and tax rate\n let calculatedTax = (taxRate * price); // Calculate the amount of Tax based on Price and Tax Rate\n\n return (calculatedTax + price); // Return Total Cost by adding Price and Calculated Tax together \t\t\t\t [FUNC_END]"
}
],
"created": 1679159408,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 108,
"prompt_tokens": 51,
"total_tokens": 159
}
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": "\n\n[FUNC_START] \n// This function reverses a string and returns the reversed version of it. \nfunction reverseString(str) { // Function declaration to reverse a string \n\n let reversedStr = ''; // Initialize an empty string for the result\n\n for (let i = str.length - 1; i >= 0; i--) { // Iterate over each character in the original string from last to first index \n reversedStr += str[i]; // Add each character from original string to the new one starting from last character \n }\n\n return reversedStr; // Return the reversed version of provided inputted String \n} \n[FUNC_END]"
}
],
"created": 1679159413,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 152,
"prompt_tokens": 51,
"total_tokens": 203
}
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": "\n\n// [FUNC_START] \nfunction getTotal() {\n let totalPrice = 0;\n\n for (let i = 0; i < items.length; i++) { // loop through all the items in the array 'items' \n totalPrice += item[i].price; // add each item's price to the totalPrice variable \n }\n\n return totalPrice; // returns the calculated sum of prices from all of the items \n}\n// [FUNC_END]"
}
],
"created": 1679159418,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 111,
"prompt_tokens": 51,
"total_tokens": 162
}
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": "\n\n// [FUNC_START] \n// This function calculates the sum of two numbers and returns it. \nfunction addNumbers(num1, num2) { //Declaring a function named \"addNumbers\" with arguments \"num1\" and \"num2\". \n let total = num1 + num2; //Declaring a variable called \"total\" to store the result of addition operation between given two numbers. \n\n return total; //Returning the value stored in variable \"total\". \n} \n// [FUNC_END]"
}
],
"created": 1679159423,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 125,
"prompt_tokens": 51,
"total_tokens": 176
}
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": "\n\n[FUNC_START] \n//This function takes two arguments and returns the product of those two numbers.\nfunction multiplyNumbers(num1, num2) {\n let result = num1 * num2; //Multiply both numbers together to get a result \n\n return result; //Return the multiplied number \n} \n[FUNC_END]"
}
],
"created": 1679159428,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 82,
"prompt_tokens": 51,
"total_tokens": 133
}
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": " \"This function succeeded\"\n\n// [FUNC_START]\nlet num = 0; // Initialize a counter variable to 0 \nfunction addOne() { // Function to increment the counter by 1\n num++; // Increment the counter by 1\n} \naddOne(); // Call the function to increment the counter once \nconsole.log(num); // Outputs 1 as expected, since it was incremented once \n// [FUNC_END] This function succeeded"
}
],
"created": 1679159432,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 109,
"prompt_tokens": 51,
"total_tokens": 160
}
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": "\n\n[FUNC_START]\n// This function calculates the area of a rectange. \nfunction calculateArea(length, width) {\n let area = length * width; // Calculate the product of length and width which is the area of a rectangle \n\n return area; // Return the calculated value to be used later \n} [FUNC_END]"
}
],
"created": 1679159436,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 82,
"prompt_tokens": 51,
"total_tokens": 133
}
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": "\n\n[FUNC_START] \n//A function to calculate the product of two numbers \nfunction multiply(num1, num2) { //This function will take two parameters and return the product of them. \n var result = num1 * num2; //Variable 'result' is assigned with value of multiplying both input parameter values.\n\n return result; //Returning the value stored in variable 'result'. \n} [FUNC_END]"
}
],
"created": 1679159440,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 101,
"prompt_tokens": 51,
"total_tokens": 152
}
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": "\n\n[FUNC_START] \n//This function will convert a Celsius temperature to Fahrenheit. \nfunction celsiusToFahrenheit(celsiusTemp){ //Function declaration with parameter 'celsiusTemp' of type number. \n let fahrenheitTemp = (celsiusTemp * 9/5) + 32; //Calculate the conversion from Celsius to Fahrenheit and assign it to 'fahrenheitTemp' variable. \n\n return fahrenheitTemp; //Return the calculated value of 'fahrenheitTemp'. \n}\n[FUNC_END]"
}
],
"created": 1679159443,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 127,
"prompt_tokens": 51,
"total_tokens": 178
}
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": "\n\n//[FUNC_START] \nfunction calculateSum(num1, num2) { \n let sum = num1 + num2; // Calculate the sum of two numbers \n\n return sum; // Return the result of calculation \n} \n//[FUNC_END]"
}
],
"created": 1679159448,
"id": "cmpl-xxxxxxxxxxxxxxxxxxxxxxxx",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 67,
"prompt_tokens": 51,
"total_tokens": 118
}
}
I testes for example with a .net file but same result :(
would improve installation
Implement workaround
Python's Global Interpreter Lock (GIL) limits the execution of multiple threads in parallel due to its restrictions on simultaneous thread execution, especially for CPU-bound tasks. For CPU-bound operations, using the multiprocessing module might be more effective since it bypasses the GIL by spawning separate processes.
When running the script on Ghidra, the module "xmlrpc" is not found.
I looked around for it, but cant install it via pip and cant find a source for it anywhere for manual install.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.