pwn 0.5.708 → 0.5.709
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/documentation/Installation.md +1 -0
- data/etc/default_skills/pwn/ai/agent/extrospection/osint/bridges/SKILL.md +30 -8
- data/etc/default_skills/pwn/ai/agent/extrospection/osint/social/SKILL.md +30 -8
- data/etc/default_skills/pwn/ai/agent/extrospection/osint/social/references/urls.md +1 -1
- data/etc/default_skills/pwn/ai/agent/extrospection/references/urls.md +0 -1
- data/etc/default_skills/pwn/memory_index/SKILL.md +0 -4
- data/etc/default_skills/pwn/plugins/aflplusplus/SKILL.md +48 -0
- data/etc/default_skills/pwn/plugins/android/SKILL.md +1 -0
- data/etc/default_skills/pwn/plugins/artifact_registry/SKILL.md +49 -0
- data/etc/default_skills/pwn/plugins/binary_parser/SKILL.md +54 -0
- data/etc/default_skills/pwn/plugins/credential_attack/SKILL.md +51 -0
- data/etc/default_skills/pwn/plugins/doctor/SKILL.md +57 -0
- data/etc/default_skills/pwn/plugins/exploit_dev/SKILL.md +61 -0
- data/etc/default_skills/pwn/plugins/frida/SKILL.md +49 -0
- data/etc/default_skills/pwn/plugins/gdb/SKILL.md +52 -0
- data/etc/default_skills/pwn/plugins/jobs/SKILL.md +51 -0
- data/etc/default_skills/pwn/plugins/nuclei/SKILL.md +48 -0
- data/etc/default_skills/pwn/plugins/process_tube/SKILL.md +52 -0
- data/etc/default_skills/pwn/plugins/radare2/SKILL.md +59 -0
- data/etc/default_skills/pwn/plugins/recon/SKILL.md +55 -0
- data/etc/default_skills/pwn/plugins/recon/references/urls.md +5 -0
- data/etc/default_skills/pwn/plugins/sqlmap/SKILL.md +48 -0
- data/etc/default_skills/pwn/plugins/transparent_browser/SKILL.md +0 -4
- data/etc/default_skills/pwn/plugins/volatility/SKILL.md +48 -0
- data/lib/pwn/ai/agent/assembly.rb +4 -1
- data/lib/pwn/ai/agent/btc.rb +4 -1
- data/lib/pwn/ai/agent/burp_suite.rb +5 -2
- data/lib/pwn/ai/agent/curriculum.rb +89 -30
- data/lib/pwn/ai/agent/dispatch.rb +27 -16
- data/lib/pwn/ai/agent/extrospection/osint/bridges.rb +9 -18
- data/lib/pwn/ai/agent/extrospection/osint/social.rb +9 -18
- data/lib/pwn/ai/agent/extrospection.rb +185 -60
- data/lib/pwn/ai/agent/gqrx.rb +4 -1
- data/lib/pwn/ai/agent/hacker_one.rb +5 -2
- data/lib/pwn/ai/agent/learning.rb +142 -25
- data/lib/pwn/ai/agent/loop.rb +53 -46
- data/lib/pwn/ai/agent/metrics.rb +133 -23
- data/lib/pwn/ai/agent/mistakes.rb +126 -17
- data/lib/pwn/ai/agent/open_goal.rb +25 -9
- data/lib/pwn/ai/agent/policy.rb +158 -18
- data/lib/pwn/ai/agent/prompt_builder.rb +21 -11
- data/lib/pwn/ai/agent/prompt_cache.rb +44 -13
- data/lib/pwn/ai/agent/reflect.rb +9 -5
- data/lib/pwn/ai/agent/registry.rb +65 -12
- data/lib/pwn/ai/agent/result.rb +19 -10
- data/lib/pwn/ai/agent/reward.rb +150 -32
- data/lib/pwn/ai/agent/sast.rb +4 -1
- data/lib/pwn/ai/agent/swarm.rb +72 -36
- data/lib/pwn/ai/agent/task_summarizer.rb +165 -36
- data/lib/pwn/ai/agent/tool_guard.rb +105 -6
- data/lib/pwn/ai/agent/transparent_browser.rb +4 -1
- data/lib/pwn/ai/agent/turn_finalizer.rb +41 -21
- data/lib/pwn/ai/agent/vuln_gen.rb +6 -3
- data/lib/pwn/ai/agent.rb +4 -0
- data/lib/pwn/ai/anthropic.rb +41 -7
- data/lib/pwn/ai/gemini.rb +21 -11
- data/lib/pwn/ai/grok.rb +44 -6
- data/lib/pwn/ai/http_retry.rb +40 -12
- data/lib/pwn/ai/ollama.rb +19 -10
- data/lib/pwn/ai/open_ai.rb +81 -30
- data/lib/pwn/ai/open_web_ui.rb +20 -14
- data/lib/pwn/ai/red_team/agent_protocol_abuse.rb +7 -1
- data/lib/pwn/ai/red_team/data_and_model_poisoning.rb +7 -1
- data/lib/pwn/ai/red_team/excessive_agency.rb +7 -1
- data/lib/pwn/ai/red_team/hidden_context_exposure.rb +7 -1
- data/lib/pwn/ai/red_team/insecure_output_handling.rb +7 -1
- data/lib/pwn/ai/red_team/jailbreak.rb +7 -1
- data/lib/pwn/ai/red_team/memory_poisoning.rb +7 -1
- data/lib/pwn/ai/red_team/multimodal_injection.rb +7 -1
- data/lib/pwn/ai/red_team/overreliance.rb +7 -1
- data/lib/pwn/ai/red_team/payload_splitting.rb +7 -1
- data/lib/pwn/ai/red_team/prompt_injection.rb +7 -1
- data/lib/pwn/ai/red_team/rag_poisoning.rb +7 -1
- data/lib/pwn/ai/red_team/sensitive_information_disclosure.rb +7 -1
- data/lib/pwn/ai/red_team/supply_chain.rb +7 -1
- data/lib/pwn/ai/red_team/system_prompt_extraction.rb +7 -1
- data/lib/pwn/ai/red_team/test_case_engine.rb +12 -9
- data/lib/pwn/ai/red_team/token_smuggling.rb +7 -1
- data/lib/pwn/ai/red_team/unbounded_consumption.rb +7 -1
- data/lib/pwn/ai/red_team/vector_and_embedding_weaknesses.rb +7 -1
- data/lib/pwn/ai/red_team.rb +4 -0
- data/lib/pwn/ai.rb +4 -0
- data/lib/pwn/aws/acm.rb +5 -2
- data/lib/pwn/aws/api_gateway.rb +10 -7
- data/lib/pwn/aws/app_stream.rb +5 -2
- data/lib/pwn/aws/application_auto_scaling.rb +5 -2
- data/lib/pwn/aws/application_discovery_service.rb +5 -2
- data/lib/pwn/aws/auto_scaling.rb +5 -2
- data/lib/pwn/aws/batch.rb +5 -2
- data/lib/pwn/aws/budgets.rb +5 -2
- data/lib/pwn/aws/cloud_formation.rb +5 -2
- data/lib/pwn/aws/cloud_front.rb +7 -4
- data/lib/pwn/aws/cloud_hsm.rb +5 -2
- data/lib/pwn/aws/cloud_search.rb +5 -2
- data/lib/pwn/aws/cloud_search_domain.rb +5 -2
- data/lib/pwn/aws/cloud_trail.rb +5 -2
- data/lib/pwn/aws/cloud_watch.rb +5 -2
- data/lib/pwn/aws/cloud_watch_events.rb +5 -2
- data/lib/pwn/aws/cloud_watch_logs.rb +5 -2
- data/lib/pwn/aws/code_build.rb +5 -2
- data/lib/pwn/aws/code_commit.rb +5 -2
- data/lib/pwn/aws/code_deploy.rb +5 -2
- data/lib/pwn/aws/code_pipeline.rb +5 -2
- data/lib/pwn/aws/cognito_identity.rb +5 -2
- data/lib/pwn/aws/cognito_identity_provider.rb +5 -2
- data/lib/pwn/aws/cognito_sync.rb +5 -2
- data/lib/pwn/aws/config_service.rb +5 -2
- data/lib/pwn/aws/data_pipleline.rb +5 -2
- data/lib/pwn/aws/database_migration_service.rb +5 -2
- data/lib/pwn/aws/device_farm.rb +5 -2
- data/lib/pwn/aws/direct_connect.rb +5 -2
- data/lib/pwn/aws/directory_service.rb +5 -2
- data/lib/pwn/aws/dynamo_db.rb +5 -2
- data/lib/pwn/aws/dynamo_db_streams.rb +5 -2
- data/lib/pwn/aws/ec2.rb +5 -2
- data/lib/pwn/aws/ecr.rb +5 -2
- data/lib/pwn/aws/ecs.rb +5 -2
- data/lib/pwn/aws/efs.rb +5 -2
- data/lib/pwn/aws/elasti_cache.rb +5 -2
- data/lib/pwn/aws/elastic_beanstalk.rb +8 -5
- data/lib/pwn/aws/elastic_load_balancing.rb +5 -2
- data/lib/pwn/aws/elastic_load_balancing_v2.rb +6 -3
- data/lib/pwn/aws/elastic_transcoder.rb +5 -2
- data/lib/pwn/aws/elasticsearch_service.rb +5 -2
- data/lib/pwn/aws/emr.rb +5 -2
- data/lib/pwn/aws/firehose.rb +5 -2
- data/lib/pwn/aws/game_lift.rb +5 -2
- data/lib/pwn/aws/glacier.rb +6 -3
- data/lib/pwn/aws/health.rb +5 -2
- data/lib/pwn/aws/iam.rb +10 -4
- data/lib/pwn/aws/import_export.rb +5 -2
- data/lib/pwn/aws/inspector.rb +5 -2
- data/lib/pwn/aws/iot.rb +5 -2
- data/lib/pwn/aws/iot_data_plane.rb +5 -2
- data/lib/pwn/aws/kinesis.rb +5 -2
- data/lib/pwn/aws/kinesis_analytics.rb +5 -2
- data/lib/pwn/aws/kms.rb +5 -2
- data/lib/pwn/aws/lambda.rb +5 -2
- data/lib/pwn/aws/lambda_preview.rb +5 -2
- data/lib/pwn/aws/lex.rb +5 -2
- data/lib/pwn/aws/lightsail.rb +5 -2
- data/lib/pwn/aws/machine_learning.rb +5 -2
- data/lib/pwn/aws/marketplace_commerce_analytics.rb +5 -2
- data/lib/pwn/aws/marketplace_metering.rb +5 -2
- data/lib/pwn/aws/ops_works.rb +5 -2
- data/lib/pwn/aws/ops_works_cm.rb +5 -2
- data/lib/pwn/aws/pinpoint.rb +5 -2
- data/lib/pwn/aws/polly.rb +5 -2
- data/lib/pwn/aws/rds.rb +5 -2
- data/lib/pwn/aws/redshift.rb +5 -2
- data/lib/pwn/aws/rekognition.rb +5 -2
- data/lib/pwn/aws/route53.rb +5 -2
- data/lib/pwn/aws/route53_domains.rb +5 -2
- data/lib/pwn/aws/s3.rb +5 -2
- data/lib/pwn/aws/service_catalog.rb +5 -2
- data/lib/pwn/aws/ses.rb +5 -2
- data/lib/pwn/aws/shield.rb +5 -2
- data/lib/pwn/aws/simple_db.rb +5 -2
- data/lib/pwn/aws/sms.rb +5 -2
- data/lib/pwn/aws/snowball.rb +5 -2
- data/lib/pwn/aws/sns.rb +5 -2
- data/lib/pwn/aws/sqs.rb +5 -2
- data/lib/pwn/aws/ssm.rb +5 -2
- data/lib/pwn/aws/states.rb +5 -2
- data/lib/pwn/aws/storage_gateway.rb +5 -2
- data/lib/pwn/aws/sts.rb +4 -1
- data/lib/pwn/aws/support.rb +5 -2
- data/lib/pwn/aws/swf.rb +5 -2
- data/lib/pwn/aws/waf.rb +5 -2
- data/lib/pwn/aws/waf_regional.rb +5 -2
- data/lib/pwn/aws/workspaces.rb +5 -2
- data/lib/pwn/aws/x_ray.rb +5 -2
- data/lib/pwn/aws.rb +4 -0
- data/lib/pwn/banner/anon.rb +3 -0
- data/lib/pwn/banner/bubble.rb +3 -0
- data/lib/pwn/banner/cheshire.rb +3 -0
- data/lib/pwn/banner/code_cave.rb +3 -0
- data/lib/pwn/banner/dont_panic.rb +3 -0
- data/lib/pwn/banner/f_society.rb +3 -0
- data/lib/pwn/banner/fork_bomb.rb +3 -0
- data/lib/pwn/banner/jmp_esp.rb +3 -0
- data/lib/pwn/banner/matrix.rb +5 -1
- data/lib/pwn/banner/ninja.rb +3 -0
- data/lib/pwn/banner/off_the_air.rb +3 -0
- data/lib/pwn/banner/pirate.rb +3 -0
- data/lib/pwn/banner/radare2.rb +3 -0
- data/lib/pwn/banner/radare2_ai.rb +3 -0
- data/lib/pwn/banner/white_rabbit.rb +3 -0
- data/lib/pwn/banner.rb +6 -2
- data/lib/pwn/blockchain/btc.rb +8 -3
- data/lib/pwn/blockchain/eth.rb +10 -3
- data/lib/pwn/blockchain.rb +4 -0
- data/lib/pwn/bounty/lifecycle_authz_replay.rb +46 -27
- data/lib/pwn/bounty.rb +4 -0
- data/lib/pwn/config.rb +79 -13
- data/lib/pwn/cron.rb +297 -20
- data/lib/pwn/driver.rb +2 -18
- data/lib/pwn/ffi/adalm_pluto.rb +65 -11
- data/lib/pwn/ffi/fftw.rb +31 -6
- data/lib/pwn/ffi/hack_rf.rb +59 -8
- data/lib/pwn/ffi/liquid.rb +63 -10
- data/lib/pwn/ffi/rtl_sdr.rb +35 -5
- data/lib/pwn/ffi/soapy_sdr.rb +60 -10
- data/lib/pwn/ffi/stdio.rb +5 -8
- data/lib/pwn/ffi/volk.rb +36 -7
- data/lib/pwn/ffi.rb +12 -0
- data/lib/pwn/memory.rb +136 -16
- data/lib/pwn/memory_index.rb +34 -19
- data/lib/pwn/migrate.rb +34 -24
- data/lib/pwn/module_skills.rb +39 -8
- data/lib/pwn/plugins/aflplusplus.rb +52 -0
- data/lib/pwn/plugins/android.rb +65 -245
- data/lib/pwn/plugins/artifact_registry.rb +71 -0
- data/lib/pwn/plugins/assembly.rb +9 -4
- data/lib/pwn/plugins/authentication_helper.rb +8 -5
- data/lib/pwn/plugins/baresip.rb +59 -12
- data/lib/pwn/plugins/basic_auth.rb +9 -3
- data/lib/pwn/plugins/beef.rb +28 -18
- data/lib/pwn/plugins/binary_parser.rb +133 -0
- data/lib/pwn/plugins/black_duck_binary_analysis.rb +63 -39
- data/lib/pwn/plugins/burp_suite.rb +98 -68
- data/lib/pwn/plugins/bus_pirate.rb +15 -8
- data/lib/pwn/plugins/char.rb +33 -3
- data/lib/pwn/plugins/credential_attack.rb +99 -0
- data/lib/pwn/plugins/credit_card.rb +6 -1
- data/lib/pwn/plugins/dao_ldap.rb +19 -13
- data/lib/pwn/plugins/dao_mongo.rb +11 -5
- data/lib/pwn/plugins/dao_postgres.rb +28 -19
- data/lib/pwn/plugins/dao_sqlite3.rb +15 -6
- data/lib/pwn/plugins/defect_dojo.rb +38 -22
- data/lib/pwn/plugins/detect_os.rb +5 -0
- data/lib/pwn/plugins/doctor.rb +149 -0
- data/lib/pwn/plugins/ein.rb +3 -0
- data/lib/pwn/plugins/exploit_dev.rb +264 -0
- data/lib/pwn/plugins/file_fu.rb +11 -8
- data/lib/pwn/plugins/frida.rb +61 -0
- data/lib/pwn/plugins/fuzz.rb +9 -6
- data/lib/pwn/plugins/gdb.rb +95 -0
- data/lib/pwn/plugins/git.rb +19 -14
- data/lib/pwn/plugins/github.rb +38 -15
- data/lib/pwn/plugins/google_workspace.rb +188 -45
- data/lib/pwn/plugins/hacker_one.rb +159 -35
- data/lib/pwn/plugins/hunter.rb +6 -3
- data/lib/pwn/plugins/ip_info.rb +9 -4
- data/lib/pwn/plugins/irc.rb +28 -15
- data/lib/pwn/plugins/jenkins.rb +65 -57
- data/lib/pwn/plugins/jira_data_center.rb +30 -22
- data/lib/pwn/plugins/jobs.rb +109 -0
- data/lib/pwn/plugins/json_pathify.rb +9 -5
- data/lib/pwn/plugins/log.rb +113 -13
- data/lib/pwn/plugins/mail_agent.rb +87 -79
- data/lib/pwn/plugins/metasploit.rb +11 -6
- data/lib/pwn/plugins/monkey_patch.rb +3 -0
- data/lib/pwn/plugins/msr206.rb +42 -28
- data/lib/pwn/plugins/nessus_cloud.rb +44 -4
- data/lib/pwn/plugins/nexpose_vuln_scan.rb +40 -24
- data/lib/pwn/plugins/nmap_it.rb +14 -34
- data/lib/pwn/plugins/nuclei.rb +57 -0
- data/lib/pwn/plugins/oauth2.rb +11 -5
- data/lib/pwn/plugins/ocr.rb +3 -0
- data/lib/pwn/plugins/open_api.rb +5 -2
- data/lib/pwn/plugins/openvas.rb +33 -25
- data/lib/pwn/plugins/packet.rb +152 -31
- data/lib/pwn/plugins/pdf_parse.rb +5 -2
- data/lib/pwn/plugins/pony.rb +86 -1
- data/lib/pwn/plugins/process_tube.rb +120 -0
- data/lib/pwn/plugins/ps.rb +7 -1
- data/lib/pwn/plugins/pwn_logger.rb +6 -2
- data/lib/pwn/plugins/rabbit_mq.rb +12 -7
- data/lib/pwn/plugins/radare2.rb +253 -0
- data/lib/pwn/plugins/recon.rb +161 -0
- data/lib/pwn/plugins/repl.rb +122 -1
- data/lib/pwn/plugins/scannable_codes.rb +5 -1
- data/lib/pwn/plugins/serial.rb +24 -14
- data/lib/pwn/plugins/shodan.rb +54 -35
- data/lib/pwn/plugins/slack_client.rb +11 -6
- data/lib/pwn/plugins/sock.rb +16 -8
- data/lib/pwn/plugins/spider.rb +5 -2
- data/lib/pwn/plugins/sqlmap.rb +49 -0
- data/lib/pwn/plugins/ssn.rb +3 -0
- data/lib/pwn/plugins/thread_pool.rb +6 -9
- data/lib/pwn/plugins/tor.rb +9 -4
- data/lib/pwn/plugins/transparent_browser.rb +62 -107
- data/lib/pwn/plugins/tty_spinner.rb +16 -2
- data/lib/pwn/plugins/twitter_api.rb +6 -2
- data/lib/pwn/plugins/uri_scheme.rb +4 -1
- data/lib/pwn/plugins/vault.rb +12 -3
- data/lib/pwn/plugins/vin.rb +24 -12
- data/lib/pwn/plugins/voice.rb +7 -2
- data/lib/pwn/plugins/volatility.rb +48 -0
- data/lib/pwn/plugins/vsphere.rb +9 -5
- data/lib/pwn/plugins/xxd.rb +12 -43
- data/lib/pwn/plugins/zaproxy.rb +30 -16
- data/lib/pwn/plugins.rb +19 -0
- data/lib/pwn/reports/ai_red_team.rb +6 -2
- data/lib/pwn/reports/csv.rb +8 -1
- data/lib/pwn/reports/fuzz.rb +5 -2
- data/lib/pwn/reports/html.rb +8 -1
- data/lib/pwn/reports/html_footer.rb +4 -3
- data/lib/pwn/reports/html_header.rb +6 -2
- data/lib/pwn/reports/json.rb +8 -1
- data/lib/pwn/reports/markdown.rb +8 -1
- data/lib/pwn/reports/pdf.rb +8 -1
- data/lib/pwn/reports/phone.rb +5 -2
- data/lib/pwn/reports/sast.rb +6 -2
- data/lib/pwn/reports/uri_buster.rb +5 -2
- data/lib/pwn/reports/xml.rb +8 -1
- data/lib/pwn/reports.rb +19 -0
- data/lib/pwn/sast/amqp_connect_as_guest.rb +9 -3
- data/lib/pwn/sast/apache_file_system_util_api.rb +9 -3
- data/lib/pwn/sast/aws.rb +9 -3
- data/lib/pwn/sast/banned_function_calls_c.rb +9 -3
- data/lib/pwn/sast/base64.rb +9 -3
- data/lib/pwn/sast/beef_hook.rb +9 -3
- data/lib/pwn/sast/cmd_execution_go_lang.rb +9 -3
- data/lib/pwn/sast/cmd_execution_java.rb +9 -3
- data/lib/pwn/sast/cmd_execution_python.rb +9 -3
- data/lib/pwn/sast/cmd_execution_ruby.rb +9 -3
- data/lib/pwn/sast/cmd_execution_scala.rb +9 -3
- data/lib/pwn/sast/csrf.rb +9 -3
- data/lib/pwn/sast/deserial_java.rb +9 -3
- data/lib/pwn/sast/emoticon.rb +9 -3
- data/lib/pwn/sast/eval.rb +9 -3
- data/lib/pwn/sast/factory.rb +9 -3
- data/lib/pwn/sast/http_authorization_header.rb +9 -3
- data/lib/pwn/sast/inner_html.rb +9 -3
- data/lib/pwn/sast/keystore.rb +9 -3
- data/lib/pwn/sast/local_storage.rb +9 -3
- data/lib/pwn/sast/location_hash.rb +9 -3
- data/lib/pwn/sast/log4j.rb +9 -3
- data/lib/pwn/sast/logger.rb +9 -3
- data/lib/pwn/sast/md5.rb +9 -3
- data/lib/pwn/sast/outer_html.rb +9 -3
- data/lib/pwn/sast/padding_oracle.rb +9 -3
- data/lib/pwn/sast/password.rb +9 -3
- data/lib/pwn/sast/php_input_mechanisms.rb +9 -3
- data/lib/pwn/sast/php_type_juggling.rb +9 -3
- data/lib/pwn/sast/pom_version.rb +9 -3
- data/lib/pwn/sast/port.rb +9 -3
- data/lib/pwn/sast/post_message.rb +9 -3
- data/lib/pwn/sast/private_key.rb +9 -3
- data/lib/pwn/sast/redirect.rb +9 -3
- data/lib/pwn/sast/redos.rb +9 -3
- data/lib/pwn/sast/shell.rb +9 -3
- data/lib/pwn/sast/signature.rb +9 -3
- data/lib/pwn/sast/sql.rb +9 -3
- data/lib/pwn/sast/ssl.rb +9 -3
- data/lib/pwn/sast/sudo.rb +9 -3
- data/lib/pwn/sast/task_tag.rb +9 -3
- data/lib/pwn/sast/test_case_engine.rb +11 -7
- data/lib/pwn/sast/throw_errors.rb +9 -3
- data/lib/pwn/sast/token.rb +9 -3
- data/lib/pwn/sast/type_script_type_juggling.rb +9 -3
- data/lib/pwn/sast/use_after_free.rb +9 -3
- data/lib/pwn/sast/version.rb +9 -3
- data/lib/pwn/sast/window_location_hash.rb +9 -3
- data/lib/pwn/sast.rb +4 -0
- data/lib/pwn/sdr/decoder/adsb.rb +36 -5
- data/lib/pwn/sdr/decoder/apt.rb +9 -6
- data/lib/pwn/sdr/decoder/base.rb +74 -22
- data/lib/pwn/sdr/decoder/bluetooth.rb +17 -5
- data/lib/pwn/sdr/decoder/dect.rb +12 -3
- data/lib/pwn/sdr/decoder/dsp.rb +229 -39
- data/lib/pwn/sdr/decoder/flex.rb +59 -11
- data/lib/pwn/sdr/decoder/gps.rb +12 -3
- data/lib/pwn/sdr/decoder/gsm.rb +24 -4
- data/lib/pwn/sdr/decoder/iridium.rb +12 -3
- data/lib/pwn/sdr/decoder/lora.rb +13 -4
- data/lib/pwn/sdr/decoder/lte.rb +27 -3
- data/lib/pwn/sdr/decoder/morse.rb +12 -3
- data/lib/pwn/sdr/decoder/p25.rb +12 -3
- data/lib/pwn/sdr/decoder/pager.rb +8 -5
- data/lib/pwn/sdr/decoder/pocsag.rb +29 -9
- data/lib/pwn/sdr/decoder/rds.rb +14 -8
- data/lib/pwn/sdr/decoder/rfid.rb +12 -3
- data/lib/pwn/sdr/decoder/rtl433.rb +12 -3
- data/lib/pwn/sdr/decoder/rtty.rb +8 -5
- data/lib/pwn/sdr/decoder/wifi.rb +12 -3
- data/lib/pwn/sdr/decoder/zigbee.rb +12 -3
- data/lib/pwn/sdr/decoder.rb +9 -0
- data/lib/pwn/sdr/flipper_zero.rb +17 -10
- data/lib/pwn/sdr/frequency_allocation.rb +4 -1
- data/lib/pwn/sdr/gqrx.rb +178 -119
- data/lib/pwn/sdr/rfidler.rb +4 -1
- data/lib/pwn/sdr/son_micro_rfid.rb +37 -24
- data/lib/pwn/sdr.rb +14 -0
- data/lib/pwn/sessions.rb +86 -16
- data/lib/pwn/setup.rb +94 -37
- data/lib/pwn/version.rb +1 -1
- data/lib/pwn/www/app_cobalt_io.rb +11 -5
- data/lib/pwn/www/bing.rb +10 -5
- data/lib/pwn/www/bug_crowd.rb +11 -5
- data/lib/pwn/www/checkip.rb +8 -4
- data/lib/pwn/www/coinbase_pro.rb +11 -5
- data/lib/pwn/www/duckduckgo.rb +12 -6
- data/lib/pwn/www/facebook.rb +11 -5
- data/lib/pwn/www/github.rb +11 -5
- data/lib/pwn/www/google.rb +11 -5
- data/lib/pwn/www/hacker_one.rb +20 -9
- data/lib/pwn/www/linkedin.rb +11 -5
- data/lib/pwn/www/pandora.rb +11 -5
- data/lib/pwn/www/pastebin.rb +9 -4
- data/lib/pwn/www/paypal.rb +19 -11
- data/lib/pwn/www/synack.rb +11 -5
- data/lib/pwn/www/torch.rb +13 -8
- data/lib/pwn/www/trading_view.rb +11 -5
- data/lib/pwn/www/twitter.rb +11 -5
- data/lib/pwn/www/uber.rb +11 -5
- data/lib/pwn/www/upwork.rb +11 -5
- data/lib/pwn/www/wayback_machine.rb +12 -6
- data/lib/pwn/www/youtube.rb +10 -5
- data/lib/pwn/www.rb +4 -0
- data/spec/conventions_spec.rb +118 -2
- data/spec/lib/pwn/ai/agent/reward_spec.rb +9 -0
- data/spec/lib/pwn/plugins/aflplusplus_spec.rb +13 -0
- data/spec/lib/pwn/plugins/artifact_registry_spec.rb +13 -0
- data/spec/lib/pwn/plugins/binary_parser_spec.rb +21 -0
- data/spec/lib/pwn/plugins/credential_attack_spec.rb +13 -0
- data/spec/lib/pwn/plugins/doctor_spec.rb +23 -0
- data/spec/lib/pwn/plugins/exploit_dev_spec.rb +23 -0
- data/spec/lib/pwn/plugins/frida_spec.rb +13 -0
- data/spec/lib/pwn/plugins/gdb_spec.rb +13 -0
- data/spec/lib/pwn/plugins/jobs_spec.rb +13 -0
- data/spec/lib/pwn/plugins/nuclei_spec.rb +13 -0
- data/spec/lib/pwn/plugins/process_tube_spec.rb +13 -0
- data/spec/lib/pwn/plugins/radare2_spec.rb +13 -0
- data/spec/lib/pwn/plugins/recon_spec.rb +26 -0
- data/spec/lib/pwn/plugins/sqlmap_spec.rb +13 -0
- data/spec/lib/pwn/plugins/volatility_spec.rb +13 -0
- data/third_party/pwn_rdoc.jsonl +126 -5
- metadata +47 -3
- data/etc/default_skills/pwn/memory_index/references/urls.md +0 -4
- data/etc/default_skills/pwn/plugins/transparent_browser/references/urls.md +0 -3
|
@@ -44,7 +44,7 @@ module PWN
|
|
|
44
44
|
#
|
|
45
45
|
# PromptBuilder re-injects Extrospection.to_context on every turn.
|
|
46
46
|
# Persistence: ~/.pwn/extrospection.json across REPL restarts.
|
|
47
|
-
module Extrospection
|
|
47
|
+
module Extrospection # rubocop:disable Metrics/ModuleLength
|
|
48
48
|
EXTRO_FILE = File.join(Dir.home, '.pwn', 'extrospection.json')
|
|
49
49
|
MAX_OBSERVATIONS = 500
|
|
50
50
|
# CLI tools that accept a cheap, non-interactive --version / -V.
|
|
@@ -3630,65 +3630,190 @@ module PWN
|
|
|
3630
3630
|
# Display Usage for this Module
|
|
3631
3631
|
|
|
3632
3632
|
public_class_method def self.help
|
|
3633
|
-
puts
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3633
|
+
puts "USAGE:
|
|
3634
|
+
# Run load and return its result
|
|
3635
|
+
#{self}.load
|
|
3636
|
+
|
|
3637
|
+
# Run save and return its result
|
|
3638
|
+
#{self}.save(
|
|
3639
|
+
store: 'required - Hash returned by .load / mutated in place'
|
|
3640
|
+
)
|
|
3641
|
+
|
|
3642
|
+
# Run snapshot and return its result
|
|
3643
|
+
#{self}.snapshot(
|
|
3644
|
+
persist: 'optional - Boolean, write snapshot to disk & rotate previous (default true)',
|
|
3645
|
+
sections: 'optional - Array subset of [:host, :net, :toolchain, :repo, :env, :rf, :web, :osint, :serial, :telecomm, :packet, :vision, :voice] (default host/net/toolchain/repo/env/rf)'
|
|
3646
|
+
)
|
|
3647
|
+
|
|
3648
|
+
# Run observe and return its result
|
|
3649
|
+
#{self}.observe(
|
|
3650
|
+
source: 'required - where the observation came from (nmap, shodan, burp, cve, human, ...)',
|
|
3651
|
+
data: 'required - the observation payload (String or Hash)',
|
|
3652
|
+
category: 'optional - :recon, :vuln, :intel, :target, :network, :env, :rf, :web, :osint, :serial, :telecomm, :packet, :vision, :voice, :misc (default :misc)',
|
|
3653
|
+
target: 'optional - host/ip/url/asset the observation is about',
|
|
3654
|
+
tags: 'optional - Array of String labels',
|
|
3655
|
+
ttl: 'optional - seconds until this observation is considered stale (default nil = forever)'
|
|
3656
|
+
)
|
|
3657
|
+
|
|
3658
|
+
# Run observations and return its result
|
|
3659
|
+
#{self}.observations(
|
|
3660
|
+
limit: 'optional - max entries newest-first (default 50)',
|
|
3661
|
+
source: 'optional - filter by source substring',
|
|
3662
|
+
category: 'optional - filter by category',
|
|
3663
|
+
target: 'optional - filter by target substring',
|
|
3664
|
+
tag: 'optional - filter by tag substring',
|
|
3665
|
+
fresh_only: 'optional - drop entries whose ttl has expired (default false)'
|
|
3666
|
+
)
|
|
3667
|
+
|
|
3668
|
+
# Run drift and return its result
|
|
3669
|
+
#{self}.drift(
|
|
3670
|
+
live: 'optional - probe host NOW and diff vs stored snapshot (default true). When false, diff stored :snapshot vs stored :previous.'
|
|
3671
|
+
)
|
|
3672
|
+
|
|
3673
|
+
# Run intel and return its result
|
|
3674
|
+
#{self}.intel(
|
|
3675
|
+
query: 'required - keyword / product / CVE id to search external threat-intel for',
|
|
3676
|
+
feeds: 'optional - Array subset of [:nvd, :circl, :exploitdb] (default all)',
|
|
3677
|
+
limit: 'optional - max results per feed (default 5)',
|
|
3678
|
+
record: 'optional - also persist each hit as an observation (default false)'
|
|
3679
|
+
)
|
|
3680
|
+
|
|
3681
|
+
# Run verify and return its result
|
|
3682
|
+
#{self}.verify(
|
|
3683
|
+
claim: 'required - factual claim to fact-check against the live web',
|
|
3684
|
+
kind: 'optional - :cve | :version | :doc | :generic (default auto-detect)',
|
|
3685
|
+
url: 'optional - explicit URL the claim cites (forces kind: :doc)',
|
|
3686
|
+
commit: 'optional - write Mistakes/Memory/observe on refute/confirm (default true)',
|
|
3687
|
+
proxy: 'optional - upstream proxy for TransparentBrowser (e.g. tor) (defaults to web_config[:proxy])',
|
|
3688
|
+
in: 'optional - headless mode against a canonical source for the claim class',
|
|
3689
|
+
confidence: 'optional - confidence value consumed by #verify',
|
|
3690
|
+
evidence: 'required - [{url:, title:, excerpt:, dom_sha:, screenshot:}]',
|
|
3691
|
+
action_taken: 'required - :mistakes_record | :extro_observe | :learning_note | nil }'
|
|
3692
|
+
)
|
|
3693
|
+
|
|
3694
|
+
# Run watch and return its result
|
|
3695
|
+
#{self}.watch(
|
|
3696
|
+
url: 'required - URL to render and fingerprint',
|
|
3697
|
+
selector: 'optional - CSS selector whose innerText to hash (default full body)',
|
|
3698
|
+
ttl: 'optional - seconds until stale (default 7 days)',
|
|
3699
|
+
proxy: 'optional - upstream proxy for TransparentBrowser (defaults to web_config[:proxy])',
|
|
3700
|
+
tags: 'optional - Array tags value consumed by #watch'
|
|
3701
|
+
)
|
|
3702
|
+
|
|
3703
|
+
# Run rf tune and return its result
|
|
3704
|
+
#{self}.rf_tune(
|
|
3705
|
+
freq: 'required - frequency: 101.1, 101.1 FM, 101.100.000, 101_100_000, ...',
|
|
3706
|
+
host: 'optional - GQRX remote-control host (default 127.0.0.1)',
|
|
3707
|
+
port: 'optional - GQRX remote-control port (default 7356)',
|
|
3708
|
+
settle_secs: 'optional - seconds to sample RDS after tune (default 8)',
|
|
3709
|
+
rds: 'optional - force RDS on/off (default: auto when FM broadcast / band-plan decoder=:rds)',
|
|
3710
|
+
demodulator_mode: 'optional - e.g. :WFM_ST, :WFM, :FM, :AM (default from band-plan / FM range)',
|
|
3711
|
+
bandwidth: 'optional - passband Hz string, e.g. 200.000 (default from band-plan)',
|
|
3712
|
+
record: 'optional - also observe(category: :rf) so it hits EXTROSPECTION (default true)',
|
|
3713
|
+
ttl: 'optional - observation TTL seconds (default 300 - radio content is ephemeral)'
|
|
3714
|
+
)
|
|
3715
|
+
|
|
3716
|
+
# OSINT sense organ
|
|
3717
|
+
#{self}.osint(
|
|
3718
|
+
query: 'required - phone, IP, domain, email, person name, FCC ID, patent #, username, VIN, MAC, callsign, ...',
|
|
3719
|
+
kind: 'optional - auto|:ip|:geo|:dns|:whois|:rdap|:crtsh|:bgp|:shodan|:hunter|:phone|:fcc_id|:patent|:person|:username|:github|:wayback|:url|:company|:cik|:openfda|:vital_records|:threat|:vin|:mac|:callsign|:npi|:cve (default :auto)',
|
|
3720
|
+
feeds: 'optional - Array subset of DEFAULT_OSINT_FEEDS (default: auto-selected from kind)',
|
|
3721
|
+
limit: 'optional - max hits per feed (default 5)',
|
|
3722
|
+
record: 'optional - also observe(category: :osint) (default true)',
|
|
3723
|
+
ttl: 'optional - observation TTL seconds (default 86400)',
|
|
3724
|
+
api_keys: 'optional - Hash of {shodan:, hunter:, abuseipdb:, virustotal:, greynoise:, haveibeenpwned:, securitytrails:} overriding PWN::Env / ENV'
|
|
3725
|
+
)
|
|
3726
|
+
|
|
3727
|
+
# Serial sense organ
|
|
3728
|
+
#{self}.serial_sense(
|
|
3729
|
+
block_dev: 'optional - device path (default first ttyUSB/ttyACM or config)',
|
|
3730
|
+
baud: 'optional - baud rate (default 9600)',
|
|
3731
|
+
payload: 'optional - String or byte Array to write (e.g. ATI\\\\r or [0x41,0x54])',
|
|
3732
|
+
settle_secs: 'optional - seconds to read after write (default 1.5)',
|
|
3733
|
+
data_bits: 'optional - optional (default 8)',
|
|
3734
|
+
stop_bits: 'optional - optional (default 1)',
|
|
3735
|
+
parity: 'optional - optional :none|:even|:odd (default :none)',
|
|
3736
|
+
record: 'optional - observe(category: :serial) (default true)',
|
|
3737
|
+
ttl: 'optional - observation TTL (default 600)'
|
|
3738
|
+
)
|
|
3739
|
+
|
|
3740
|
+
# Telecomm sense organ (SIP / VoIP / PSTN via BareSIP)
|
|
3741
|
+
#{self}.telecomm(
|
|
3742
|
+
action: 'optional - :status|:dial|:hangup|:inventory (default :inventory)',
|
|
3743
|
+
target: 'optional - SIP URI / phone number for :dial (e.g. sip:alice@example.com or +13125551212)',
|
|
3744
|
+
host: 'optional - BareSIP HTTP control host (default 127.0.0.1)',
|
|
3745
|
+
port: 'optional - BareSIP HTTP control port (default 8000)',
|
|
3746
|
+
record: 'optional - observe(category: :telecomm) (default true)',
|
|
3747
|
+
ttl: 'optional - observation TTL (default 600)'
|
|
3748
|
+
)
|
|
3749
|
+
|
|
3750
|
+
# Packet sense organ
|
|
3751
|
+
#{self}.packet_sense(
|
|
3752
|
+
action: 'optional - :inventory|:capture|:summarize_pcap (default :inventory)',
|
|
3753
|
+
iface: 'optional - capture interface (default first non-lo or any)',
|
|
3754
|
+
filter: 'optional - BPF filter (e.g. tcp port 443)',
|
|
3755
|
+
count: 'optional - packets to capture (default 20, max 200)',
|
|
3756
|
+
timeout: 'optional - capture seconds (default 5, max 60)',
|
|
3757
|
+
path: 'optional - pcap path for :summarize_pcap',
|
|
3758
|
+
record: 'optional - observe(category: :packet) (default true)',
|
|
3759
|
+
ttl: 'optional - observation TTL (default 600)'
|
|
3760
|
+
)
|
|
3761
|
+
|
|
3762
|
+
# Vision / OCR sense organ
|
|
3763
|
+
#{self}.vision(
|
|
3764
|
+
file: 'required - path to image / screenshot / PDF-page render',
|
|
3765
|
+
action: 'optional - :ocr|:barcode|:inventory (default :ocr when file given, else :inventory)',
|
|
3766
|
+
lang: 'optional - tesseract language (default eng)',
|
|
3767
|
+
record: 'optional - observe(category: :vision) (default true)',
|
|
3768
|
+
ttl: 'optional - observation TTL (default 86400)'
|
|
3769
|
+
)
|
|
3770
|
+
|
|
3771
|
+
# Voice sense organ (TTS / STT / inventory)
|
|
3772
|
+
#{self}.voice_sense(
|
|
3773
|
+
action: 'optional - :inventory|:tts|:stt (default :inventory)',
|
|
3774
|
+
text: 'optional - text to speak for :tts (or text_path:)',
|
|
3775
|
+
text_path: 'optional - path to text file for :tts',
|
|
3776
|
+
audio: 'optional - path to audio file for :stt',
|
|
3777
|
+
out: 'optional - output audio path for :tts (wav)',
|
|
3778
|
+
engine: 'optional - :espeak|:festival|:spd_say|:whisper (auto)',
|
|
3779
|
+
model: 'optional - whisper model (default tiny)',
|
|
3780
|
+
record: 'optional - observe(category: :voice) (default true)',
|
|
3781
|
+
ttl: 'optional - observation TTL (default 3600)'
|
|
3782
|
+
)
|
|
3783
|
+
|
|
3784
|
+
# Run revalidate memory and return its result
|
|
3785
|
+
#{self}.revalidate_memory(
|
|
3786
|
+
limit: 'optional - max :fact entries to check (default 25)',
|
|
3787
|
+
proxy: 'optional - upstream proxy for TransparentBrowser (defaults to web_config[:proxy])',
|
|
3788
|
+
ruby: 'optional - PWN::AI::Agent::Extrospection.revalidate_memory'
|
|
3789
|
+
)
|
|
3790
|
+
|
|
3791
|
+
# Run correlate and return its result
|
|
3792
|
+
#{self}.correlate(
|
|
3793
|
+
limit: 'optional - max findings returned (default 10)'
|
|
3794
|
+
)
|
|
3795
|
+
|
|
3796
|
+
# Run to context and return its result
|
|
3797
|
+
#{self}.to_context(
|
|
3798
|
+
drift_limit: 'optional - max drift lines (default 4)',
|
|
3799
|
+
obs_limit: 'optional - max observation lines (default 4)'
|
|
3800
|
+
)
|
|
3801
|
+
|
|
3802
|
+
# Run stats and return its result
|
|
3803
|
+
#{self}.stats
|
|
3804
|
+
|
|
3805
|
+
# Called by Learning.auto_introspect when
|
|
3806
|
+
#{self}.auto_extrospect(
|
|
3807
|
+
session_id: 'optional - id of the just-completed session (for tagging)'
|
|
3808
|
+
)
|
|
3809
|
+
|
|
3810
|
+
# Run reset and return its result
|
|
3811
|
+
#{self}.reset
|
|
3812
|
+
|
|
3813
|
+
# Print the AUTHOR(S) string for this module.
|
|
3814
|
+
#{self}.authors
|
|
3815
|
+
"
|
|
3816
|
+
constants.sort
|
|
3692
3817
|
end
|
|
3693
3818
|
end
|
|
3694
3819
|
end
|
data/lib/pwn/ai/agent/gqrx.rb
CHANGED
|
@@ -41,13 +41,16 @@ module PWN
|
|
|
41
41
|
|
|
42
42
|
public_class_method def self.help
|
|
43
43
|
puts "USAGE:
|
|
44
|
-
|
|
44
|
+
# Run analyze and return its result
|
|
45
|
+
#{self}.analyze(
|
|
45
46
|
request: 'required - A string containing the signal data captured by GQRX that you want to analyze. This data should be in a format that can be interpreted by the AI for analysis, such as raw signal data, frequency information, or any relevant metadata associated with the capture.',
|
|
46
47
|
location: 'required - A string containing a city, state, country, or GPS coordinates where the signal data was captured. This information will be used to provide context for the analysis and to determine if the frequency is licensed or unlicensed based on FCC records.'
|
|
47
48
|
)
|
|
48
49
|
|
|
50
|
+
# Print the AUTHOR(S) string for this module.
|
|
49
51
|
#{self}.authors
|
|
50
52
|
"
|
|
53
|
+
constants.sort
|
|
51
54
|
end
|
|
52
55
|
end
|
|
53
56
|
end
|
|
@@ -51,13 +51,16 @@ module PWN
|
|
|
51
51
|
|
|
52
52
|
public_class_method def self.help
|
|
53
53
|
puts "USAGE:
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
# Run analyze and return its result
|
|
55
|
+
#{self}.analyze(
|
|
56
|
+
request: 'required - dataset to analyze, such as bounty program details, scope details, or hacktivity details',
|
|
56
57
|
type: 'required - type of analysis to perform, such as :bounty_programs, :scope_details, or :hacktivity'
|
|
57
58
|
)
|
|
58
59
|
|
|
60
|
+
# Print the AUTHOR(S) string for this module.
|
|
59
61
|
#{self}.authors
|
|
60
62
|
"
|
|
63
|
+
constants.sort
|
|
61
64
|
end
|
|
62
65
|
end
|
|
63
66
|
end
|
|
@@ -1771,31 +1771,148 @@ module PWN
|
|
|
1771
1771
|
# Display Usage for this Module
|
|
1772
1772
|
|
|
1773
1773
|
public_class_method def self.help
|
|
1774
|
-
puts
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
PWN::
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1774
|
+
puts "USAGE:
|
|
1775
|
+
# Run note outcome and return its result
|
|
1776
|
+
#{self}.note_outcome(
|
|
1777
|
+
task: 'required - short description of what was attempted',
|
|
1778
|
+
success: 'required - Boolean, did the attempt achieve its goal',
|
|
1779
|
+
details: 'optional - free-form notes / error / evidence',
|
|
1780
|
+
session_id: 'optional - PWN::Sessions id this outcome belongs to',
|
|
1781
|
+
tags: 'optional - Array of String labels for later retrieval',
|
|
1782
|
+
score: 'optional - score value consumed by #note_outcome',
|
|
1783
|
+
judge_source: 'required - judge source value consumed by #note_outcome',
|
|
1784
|
+
predicted: 'optional - predicted value consumed by #note_outcome',
|
|
1785
|
+
confidence: 'optional - confidence value consumed by #note_outcome',
|
|
1786
|
+
engine: 'optional - engine value consumed by #note_outcome'
|
|
1787
|
+
)
|
|
1788
|
+
|
|
1789
|
+
# Run outcomes and return its result
|
|
1790
|
+
#{self}.outcomes(
|
|
1791
|
+
limit: 'optional - max entries returned newest-first (default 50)',
|
|
1792
|
+
success: 'optional - filter by Boolean outcome',
|
|
1793
|
+
tag: 'optional - filter by tag substring'
|
|
1794
|
+
)
|
|
1795
|
+
|
|
1796
|
+
# Run stats and return its result
|
|
1797
|
+
#{self}.stats
|
|
1798
|
+
|
|
1799
|
+
# Run to context and return its result
|
|
1800
|
+
#{self}.to_context(
|
|
1801
|
+
limit: 'optional - number of recent outcomes to surface (default 5)'
|
|
1802
|
+
)
|
|
1803
|
+
|
|
1804
|
+
# Run exemplars for and return its result
|
|
1805
|
+
#{self}.exemplars_for(
|
|
1806
|
+
request: 'required - current user request',
|
|
1807
|
+
limit: 'optional - max exemplar traces to return (default 1)',
|
|
1808
|
+
max_msgs: 'optional - cap on messages per exemplar (default 6)'
|
|
1809
|
+
)
|
|
1810
|
+
|
|
1811
|
+
# Run export finetune and return its result
|
|
1812
|
+
#{self}.export_finetune(
|
|
1813
|
+
format: 'optional - format value consumed by #export_finetune (defaults to :sharegpt))',
|
|
1814
|
+
min_tools: 'optional - min tools value consumed by #export_finetune',
|
|
1815
|
+
min_score: 'optional - min score value consumed by #export_finetune',
|
|
1816
|
+
compress: 'optional - compress value consumed by #export_finetune',
|
|
1817
|
+
out: 'optional - out value consumed by #export_finetune'
|
|
1818
|
+
)
|
|
1819
|
+
|
|
1820
|
+
# Run distill skill and return its result
|
|
1821
|
+
#{self}.distill_skill(
|
|
1822
|
+
name: 'required - snake_case name for the new skill',
|
|
1823
|
+
session_id: 'optional - PWN::Sessions id to mine (uses its transcript)',
|
|
1824
|
+
content: 'optional - explicit markdown body; overrides transcript mining',
|
|
1825
|
+
references: 'optional - Array of reference URLs / CWE / CVE / ATT&CK ids',
|
|
1826
|
+
description: 'optional - description value consumed by #distill_skill'
|
|
1827
|
+
)
|
|
1828
|
+
|
|
1829
|
+
# Fold RL artefacts (mistakes / structured_fix / an explicit lesson)
|
|
1830
|
+
#{self}.update_skill(
|
|
1831
|
+
dry_run: 'optional - dry run value consumed by #update_skill',
|
|
1832
|
+
lesson: 'optional - lesson value consumed by #update_skill',
|
|
1833
|
+
signature: 'optional - signature value consumed by #update_skill',
|
|
1834
|
+
request: 'optional - request value consumed by #update_skill (defaults to opts[:query])',
|
|
1835
|
+
query: 'optional - search query string',
|
|
1836
|
+
name: 'required - binary or identifier name'
|
|
1837
|
+
)
|
|
1838
|
+
|
|
1839
|
+
# Run reflect and return its result
|
|
1840
|
+
#{self}.reflect(
|
|
1841
|
+
session_id: 'required - PWN::Sessions id to analyse',
|
|
1842
|
+
dry_run: 'optional - when true, do not write to Memory/Skills (default false)'
|
|
1843
|
+
)
|
|
1844
|
+
|
|
1845
|
+
# Called by Loop.run when PWN::Env[:ai][:agent][:auto_introspect] is
|
|
1846
|
+
#{self}.auto_introspect(
|
|
1847
|
+
session_id: 'required - id of the just-completed session',
|
|
1848
|
+
request: 'optional - original user request (for outcome logging)',
|
|
1849
|
+
final: 'optional - final assistant answer (for outcome logging)',
|
|
1850
|
+
inline: 'optional - inline value consumed by #auto_introspect',
|
|
1851
|
+
predicted: 'optional - predicted value consumed by #auto_introspect',
|
|
1852
|
+
plan: 'optional - plan value consumed by #auto_introspect',
|
|
1853
|
+
ts_state: 'optional - ts state value consumed by #auto_introspect'
|
|
1854
|
+
)
|
|
1855
|
+
|
|
1856
|
+
# Run flip last outcome and return its result
|
|
1857
|
+
#{self}.flip_last_outcome(
|
|
1858
|
+
session_id: 'optional - session id value consumed by #flip_last_outcome',
|
|
1859
|
+
reason: 'optional - reason value consumed by #flip_last_outcome'
|
|
1860
|
+
)
|
|
1861
|
+
|
|
1862
|
+
# Run consolidate and return its result
|
|
1863
|
+
#{self}.consolidate(
|
|
1864
|
+
max_entries: 'optional - hard cap on PWN::Memory size (default MAX_MEMORY_ENTRIES)'
|
|
1865
|
+
)
|
|
1866
|
+
|
|
1867
|
+
# Run reset and return its result
|
|
1868
|
+
#{self}.reset
|
|
1869
|
+
|
|
1870
|
+
# One-shot / on-load repair: rewrite tags+details where verdict label
|
|
1871
|
+
#{self}.reconcile_verdict_tags!(
|
|
1872
|
+
dry_run: 'optional - dry run value consumed by #reconcile_verdict_tags!'
|
|
1873
|
+
)
|
|
1874
|
+
|
|
1875
|
+
# Run prune outcomes and return its result
|
|
1876
|
+
#{self}.prune_outcomes!(
|
|
1877
|
+
dry_run: 'optional - Boolean (default false)',
|
|
1878
|
+
max_rows: 'optional - hard cap (default MAX_OUTCOME_ROWS)',
|
|
1879
|
+
retain_days: 'optional - age floor for low-value drop',
|
|
1880
|
+
recent_days: 'optional - always keep newer than this',
|
|
1881
|
+
details_max: 'optional - details max value consumed by #prune_outcomes!',
|
|
1882
|
+
gold_min_score: 'optional - gold min score value consumed by #prune_outcomes!'
|
|
1883
|
+
)
|
|
1884
|
+
|
|
1885
|
+
# Memory lean + outcome prune
|
|
1886
|
+
#{self}.lean!(
|
|
1887
|
+
dry_run: 'optional - dry run value consumed by #lean!',
|
|
1888
|
+
max_entries: 'optional - max entries value consumed by #lean!',
|
|
1889
|
+
max_rows: 'optional - max rows value consumed by #lean!',
|
|
1890
|
+
retain_days: 'optional - retain days value consumed by #lean!',
|
|
1891
|
+
recent_days: 'optional - recent days value consumed by #lean!',
|
|
1892
|
+
details_max: 'optional - details max value consumed by #lean!',
|
|
1893
|
+
gold_min_score: 'optional - gold min score value consumed by #lean!'
|
|
1894
|
+
)
|
|
1895
|
+
|
|
1896
|
+
# One-shot lean across memory + learning + mistakes + sessions
|
|
1897
|
+
#{self}.gc_stores!(
|
|
1898
|
+
dry_run: 'optional - Boolean (default false)',
|
|
1899
|
+
current_session_id: 'optional - never delete this sessions id',
|
|
1900
|
+
max_entries: 'optional - Memory consolidate cap',
|
|
1901
|
+
max_rows: 'optional - learning.jsonl cap',
|
|
1902
|
+
retain_days: 'optional - outcome / session age floor',
|
|
1903
|
+
recent_days: 'optional - recent days value consumed by #gc_stores!',
|
|
1904
|
+
details_max: 'optional - details max value consumed by #gc_stores!',
|
|
1905
|
+
gold_min_score: 'optional - gold min score value consumed by #gc_stores!',
|
|
1906
|
+
max_files: 'optional - max files value consumed by #gc_stores!'
|
|
1907
|
+
)
|
|
1908
|
+
|
|
1909
|
+
# One-shot GC of the pre-R1 garbage: drops every PWN::Memory entry
|
|
1910
|
+
#{self}.purge_noise
|
|
1911
|
+
|
|
1912
|
+
# Print the AUTHOR(S) string for this module.
|
|
1913
|
+
#{self}.authors
|
|
1914
|
+
"
|
|
1915
|
+
constants.sort
|
|
1799
1916
|
end
|
|
1800
1917
|
end
|
|
1801
1918
|
end
|
data/lib/pwn/ai/agent/loop.rb
CHANGED
|
@@ -3071,52 +3071,59 @@ module PWN
|
|
|
3071
3071
|
# Display Usage for this Module
|
|
3072
3072
|
|
|
3073
3073
|
public_class_method def self.help
|
|
3074
|
-
puts
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3074
|
+
puts "USAGE:
|
|
3075
|
+
# Run debug on and return its result
|
|
3076
|
+
#{self}.debug_on?(
|
|
3077
|
+
debug: 'optional - debug value consumed by #debug_on?'
|
|
3078
|
+
)
|
|
3079
|
+
|
|
3080
|
+
# True only when the ask needs a live host/file/browser effect. World-knowledge
|
|
3081
|
+
#{self}.catalog_lookup?(
|
|
3082
|
+
request: 'required - request value consumed by #catalog_lookup?'
|
|
3083
|
+
)
|
|
3084
|
+
|
|
3085
|
+
# Run world knowledge and return its result
|
|
3086
|
+
#{self}.world_knowledge?(
|
|
3087
|
+
request: 'required - request value consumed by #world_knowledge?'
|
|
3088
|
+
)
|
|
3089
|
+
|
|
3090
|
+
# Run needs host work and return its result
|
|
3091
|
+
#{self}.needs_host_work?(
|
|
3092
|
+
request: 'required - request value consumed by #needs_host_work?'
|
|
3093
|
+
)
|
|
3094
|
+
|
|
3095
|
+
# Run ollama wire messages and return its result
|
|
3096
|
+
#{self}.ollama_wire_messages(
|
|
3097
|
+
messages: 'required - in-memory OpenAI-ish messages (may have String args)'
|
|
3098
|
+
)
|
|
3099
|
+
|
|
3100
|
+
# Run openai wire messages and return its result
|
|
3101
|
+
#{self}.openai_wire_messages(
|
|
3102
|
+
messages: 'required - in-memory OpenAI-ish messages (may have Hash args / internal keys)'
|
|
3103
|
+
)
|
|
3104
|
+
|
|
3105
|
+
# Run request intent and return its result
|
|
3106
|
+
#{self}.request_intent(
|
|
3107
|
+
request: 'optional - request value consumed by #request_intent'
|
|
3108
|
+
)
|
|
3109
|
+
|
|
3110
|
+
# Run run and return its result
|
|
3111
|
+
#{self}.run(
|
|
3112
|
+
request: 'required - what the human typed',
|
|
3113
|
+
session_id: 'optional - PWN::Sessions id (transcript is appended to it)',
|
|
3114
|
+
enabled_toolsets: 'optional - subset of Registry.toolsets, or nil for all',
|
|
3115
|
+
on_tool: 'optional - ->(name, args, result) callback for live UI',
|
|
3116
|
+
system_role_content: 'optional - override default system prompt (built from session_id if not provided)',
|
|
3117
|
+
debug: 'optional - debug value consumed by #run',
|
|
3118
|
+
from: 'optional - sender account or address to bind as operator',
|
|
3119
|
+
account: 'optional - operator account id to bind',
|
|
3120
|
+
force_tools: 'optional - force tools value consumed by #run'
|
|
3121
|
+
)
|
|
3122
|
+
|
|
3123
|
+
# Print the AUTHOR(S) string for this module.
|
|
3124
|
+
#{self}.authors
|
|
3125
|
+
"
|
|
3126
|
+
constants.sort
|
|
3120
3127
|
end
|
|
3121
3128
|
end
|
|
3122
3129
|
end
|