Home General Computer Multimedia Business Lounge
|
Script sederhana buat upload source file ke pastebin
|
|
02-05-2012, 05:12 PM
|
|||
|
|||
|
Script sederhana buat upload source file ke pastebin
Misi om... Ane mo share script buat upload source file ke pastebin.com pake pastebin API.
Maaf klo berantakan, baru belajar Python soalnya. Mohon koreksinya. ![]() Namanya passtobin.py ![]() Berikut penampakannya : http://pastebin.com/f28PjK4z Code: #!/usr/bin/pythonContoh penggunaan : Code: python passtobin.py -f /path/to/file/upload.txtCode: Options:-h atau --help untuk menampilkan opsi dan cara penggunaan. -f FILE ( Required ! ) Lokasi file yang ingin diupload ke pastebin.com -u USER atau --user=USER ( Optional ) Username pastebin kamu. Klo tidak di set usernya, maka otomatis bakal nge-paste sebagai guest. -n NAME atau --name="Judul file" ( Optional ) Nama judul file yang bakal munjul di "title" pastebin. Klo ga diisi, maka judulnya akan nge-paste dengan judul "untitled" -t TYPE atau --type=TYPE ( Optional ) Untuk force syntax highlight yg digunakan. Jika tidak di set, maka script akan coba otomatis medeteksi dari ekstensi file tersebut. Untuk sementara support untuk auto detect ekstensi yang ada pada line 121 - 127. Secara default, jika file ekstensi tidak ada pada list diatas, maka akan menggunakan format text ( tanpa syntax highlight ) Untuk force type lebih lengkapnya bisa dilihat pada http://pastebin.com/api -e ( Optional ) Brapa lama file tersebut akan ada di pastebin.com. untuk expires option : Quote:N = Never ( Default ) -p atau --private Private paste. Max untuk 1 akun free pastebin 25 private paste. Nah misal saya ingin upload private file dengan format apache log ke pastebin menggunakan user ditatompel expires selama 1 hari dengan judul paste "Apache Log Jan 2012" Maka : Code: $ python passtobin.py -f /var/log/httpd/error_log -u ditatompel -t apache -e 1D -n "Apache Log Jan 2012" --privateNah, mungkin sampe disini dulu.. Silahkan klo mo diperbaiki / dikaembangkan karena script di atas masih sebatas upload saja. ![]() Akhir kata, /me Male, 17 thn tipe pria SIAGA (Siap Antem Pakai Gaya Apa Saja)
|
|||
Reputed by : hipokrit(+1) , eidelweiss(+1) , nanda(+1) , CitooZz(+1) , rusuh(+1) , ketek(+1) , schumbag(+1) |
|
02-05-2012, 05:22 PM
(This post was last modified: 02-05-2012 05:24 PM by Killu4.)
|
|||
|
|||
RE: Script sederhana buat upload source file ke pastebin
Quote:f FILE ( Required ! ) Yg ini maksudnya path filenya yaa,misal lokasi filenya ada di : B:\Python\Script XSS penulisannya lokasinya benar ga om kya gitu ? CMIIW ![]() |
|||
|
02-05-2012, 05:25 PM
|
|||
|
|||
RE: Script sederhana buat upload source file ke pastebin
(02-05-2012 05:22 PM)Killu4 Wrote:Iya gitu.. Masalahnya ane lom sempet coba di windus om..Quote:f FILE ( Required ! ) ![]() Jalan ga di windows?
|
|||
|
02-05-2012, 05:25 PM
|
|||
|
|||
|
RE: Script sederhana buat upload source file ke pastebin
o0o..
buat ini toh yg di tanya di sotbox tadi malem
|
|||
|
02-05-2012, 05:28 PM
|
|||
|
|||
| RE: Script sederhana buat upload source file ke pastebin | |||
|
02-05-2012, 05:41 PM
|
|||
|
|||
RE: Script sederhana buat upload source file ke pastebin
(02-05-2012 05:25 PM)eidelweiss Wrote: o0o.. Iya om.. ![]() (02-05-2012 05:28 PM)Killu4 Wrote:(02-05-2012 05:25 PM)ditatompel Wrote: Iya gitu.. Masalahnya ane lom sempet coba di windus om.. Oke om.. ![]() ditunggu reportnya..
|
|||
|
02-05-2012, 05:48 PM
|
|||
|
|||
|
RE: Script sederhana buat upload source file ke pastebin
download phyton runtime nya....
... lamaaaaaaaaaaaaaaaaaaaaa...............
|
|||
|
02-05-2012, 06:47 PM
(This post was last modified: 02-05-2012 06:48 PM by schumbag.)
|
|||
|
|||
|
RE: Script sederhana buat upload source file ke pastebin
baru ini regist ke pastebin karena emang pengen tau kayak gimana sih pastebin itu -___-
Code: schumbag@ngelux:~/whoami$ ./ditom.py -f serv.py -u anjaw -n server-socket.py -e15Dpilihannya cuma Quote:1H => 1 hourjadi nggak ada randomize misal mo di jadikan brapa hari untuk expire kayak 15D tadi gak bisa ![]() Quote:uummmmmm punya linggis gak??ntar om,kl udah di rumah koneksi stabil ane coba tambahin fitur buat expired nya ![]() masih ngedate ama darkslayer di ancol ____________ dari tadi nge-load gk kelar2
|
|||
|
02-05-2012, 07:29 PM
|
|||
|
|||
|
RE: Script sederhana buat upload source file ke pastebin
Ngga bisa kek klo Yg expire dibuat custom.. Soalnya ane baca di http://pastebin.com/api cuma ada 5 pilihan itu.
![]() No hp punya kek.. tp kaga inget.. ...
|
|||
|
02-05-2012, 07:35 PM
|
|||
|
|||
RE: Script sederhana buat upload source file ke pastebin
(02-05-2012 07:29 PM)ditatompel Wrote: Ngga bisa kek klo Yg expire dibuat custom.. Soalnya ane baca di http://pastebin.com/api cuma ada 5 pilihan itu. gw sih inget kalo mau
|
|||
|
« Next Oldest | Next Newest »
|
| Topic Tools | ||||||
| ||||||
| Users Browsing |
| 1 Guest(s) |





![[Image: passtobin.png]](http://blog.ditatompel.crayoncreative.net/wp-content/uploads/2012/02/passtobin.png)















