Porkchop

Software screenshot:
Porkchop
Software detaljer:
Version: 0.7.3
Upload dato: 15 Apr 15
Udvikler: Scott Smith
Licens: Gratis
Popularitet: 2

Rating: nan/5 (Total Votes: 0)

Porkchop er en simpel HTTP-baseret system information server skrevet i Python. & Nbsp; Du skriver plugins til det, og det reagerer med data baseret på din anmodning.
Her er et eksempel:
Scott @ Beatbox: ~% krøller http: // localhost: 5000 / cpuinfo
/ Cpuinfo / processor2 / FPU ja
/ Cpuinfo / processor2 / f00f_bug nej
/ Cpuinfo / processor2 / cache_alignment 64
/ Cpuinfo / processor2 / vendor_id AuthenticAMD
/ cpuinfo / processor2 / flag FPU
/ Cpuinfo / processor2 / bogomips 6384
/ Cpuinfo / processor2 / hlt_bug nej
/ Cpuinfo / processor2 / apicid 2
/ Cpuinfo / processor2 / fpu_exception ja
/ Cpuinfo / processor2 / stepping 3
/ Cpuinfo / processor2 / wp yes
/ Cpuinfo / processor2 / søskende 4
/ Cpuinfo / processor2 / model 4
/ Cpuinfo / processor2 / coma_bug nej
/ Cpuinfo / processor2 / fdiv_bug nej
/ Cpuinfo / processor3 / FPU ja
/ Cpuinfo / processor3 / f00f_bug nej
/ Cpuinfo / processor3 / cache_alignment 64
/ Cpuinfo / processor3 / vendor_id AuthenticAMD
/ cpuinfo / processor3 / flag FPU
/ Cpuinfo / processor3 / bogomips 6384
/ Cpuinfo / processor3 / hlt_bug nej
/ Cpuinfo / processor3 / apicid 3
/ Cpuinfo / processor3 / fpu_exception ja
/ Cpuinfo / processor3 / stepping 3
/ Cpuinfo / processor3 / wp yes
/ Cpuinfo / processor3 / søskende 4
/ Cpuinfo / processor3 / model 4
/ Cpuinfo / processor3 / coma_bug nej
/ Cpuinfo / processor3 / fdiv_bug nej
[Snip]
/ Tid 1311387215
Scott @ Beatbox: ~%
Det kan også reagere med JSON via .json filtype eller indstilling Accepter: application / JSON header.
Scott @ Beatbox: ~% krøller http: // localhost: 5000 / cpuinfo.json
{"Cpuinfo": {"processor2": {"FPU": "ja", "f00f_bug": "nej", "cache_alignment": "64", "vendor_id": "AuthenticAMD", "flag": "FPU" , "bogomips": "6384", "hlt_bug": "nej", "apicid": "2", "fpu_exception": "ja", "stepping": "3", "WP": "ja", " søskende ":" 4 "," model ":" 4 "," coma_bug ":" nej "," fdiv_bug ":" nej "}," processor3 ": {" FPU ":" ja "," f00f_bug ":" nej "," cache_alignment ":" 64 "," vendor_id ":" AuthenticAMD "," flag ":" FPU "," bogomips ":" 6384 "," hlt_bug ":" nej "," apicid ":" 3 " "fpu_exception": "ja", "stepping": "3", "wp": "ja", "søskende": "4", "model": "4", "coma_bug": "nej", " fdiv_bug ":" nej "}," processor0 ": {" FPU ":" ja "," f00f_bug ":" nej "," cache_alignment ":" 64 "," vendor_id ":" AuthenticAMD "," flag ":" FPU "," bogomips ":" 6382 "," hlt_bug ":" nej "," apicid ":" 0 "," fpu_exception ":" ja "," stepping ":" 3 "," WP ":" ja " , "søskende": "4", "model": "4", "coma_bug": "nej", "fdiv_bug": "nej"}, "processor1": {"FPU": "ja", "f00f_bug" : "nej", "cache_alignment": "64", "vendor_id": "AuthenticAMD", "flag": "FPU", "bogomips": "6384", "hlt_bug": "nej", "apicid": " 1 "," fpu_exception ":" ja "," stepping ":" 3 "," wp ":" ja "," søskende ":" 4 "," model ":" 4 "," coma_bug ":" nej " "fdiv_bug": "nej"}}, "tid": "1311389934"}
Scott @ Beatbox: ~%
Installation
pip installere porkchop
eller
python setup.py installere
skrive plugins
Det er temmelig let at skrive en ny plugin. De er bare Python moduler med nogle fælles egenskaber:
- Et plugin skal underklasse porkchop.plugin.PorkchopPlugin.
- Dette plugin klasse skal udvides med Plugin. Dens faktiske filnavn i plugin mappen skal også matche præfiks. For eksempel ville FooPlugin være i filen foo.py
- Dette plugin klasse skal indeholde en metode kaldet get_data der returnerer en ordbog over de oplysninger, der skal vises.
Som standard vil et plugin er get_data metode kun kaldes, hvis dataene er mere end 60 sekunder gammel. Dette kan ændres på en per-plugin basis ved at sætte self.refresh i klassens ___init___ metode.
. Disse plugins kan placeres i en hvilken som helst mappe, du vælger, og indlæst ved at føre d option til porkchop

Krav :

  • Python

Andre software developer Scott Smith

Decode Reply Tool
Decode Reply Tool

14 Apr 15

Tenderloin
Tenderloin

20 Feb 15

dvdauthor
dvdauthor

28 Sep 15

Kommentarer til Porkchop

Kommentarer ikke fundet
Tilføj kommentar
Tænd billeder!